summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorArnaud VERSINI <arnaud.versini@libreoffice.org>2024-04-08 11:13:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-08 23:18:31 +0200
commit8dacc3e636ff85f7f2edb971ff6e269ed031aaaf (patch)
tree825e9c385b583e19fa0f4e8612f69b7059c8fe0a /i18npool
parente7bb3a52067c426eedffddf86e7d5f0903562da2 (diff)
i18npool : use OUString literal
Change-Id: I202f09303fd385cfcaa468411d0fae8b1707cf88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165884 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/inc/breakiterator_unicode.hxx3
-rw-r--r--i18npool/inc/calendar_gregorian.hxx2
-rw-r--r--i18npool/source/breakiterator/breakiterator_cjk.cxx10
-rw-r--r--i18npool/source/breakiterator/breakiterator_th.cxx2
-rw-r--r--i18npool/source/breakiterator/breakiterator_unicode.cxx7
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx19
-rw-r--r--i18npool/source/calendar/calendar_hijri.cxx2
-rw-r--r--i18npool/source/calendar/calendar_jewish.cxx2
8 files changed, 23 insertions, 24 deletions
diff --git a/i18npool/inc/breakiterator_unicode.hxx b/i18npool/inc/breakiterator_unicode.hxx
index d468a2ebf941..d2cf5339f7d8 100644
--- a/i18npool/inc/breakiterator_unicode.hxx
+++ b/i18npool/inc/breakiterator_unicode.hxx
@@ -70,7 +70,8 @@ public:
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
protected:
- const char *cBreakIterator, *lineRule;
+ OUString cBreakIterator;
+ const char *lineRule;
/** Used as map value. */
struct BI_ValueData
diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx
index 1ee7cabaab1e..e19698875f85 100644
--- a/i18npool/inc/calendar_gregorian.hxx
+++ b/i18npool/inc/calendar_gregorian.hxx
@@ -102,7 +102,7 @@ protected:
const Era *eraArray;
std::unique_ptr<icu::Calendar> body;
rtl::Reference<NativeNumberSupplierService> mxNatNum;
- const char* cCalendar;
+ OUString cCalendar;
css::lang::Locale aLocale;
sal_uInt32 fieldSet;
sal_Int16 fieldValue[FIELD_INDEX_COUNT];
diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx
index 00dc5e9db0f6..22ac459a72a4 100644
--- a/i18npool/source/breakiterator/breakiterator_cjk.cxx
+++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx
@@ -34,7 +34,7 @@ namespace i18npool {
BreakIterator_CJK::BreakIterator_CJK()
{
- cBreakIterator = "com.sun.star.i18n.BreakIterator_CJK";
+ cBreakIterator = u"com.sun.star.i18n.BreakIterator_CJK"_ustr;
}
Boundary SAL_CALL
@@ -146,7 +146,7 @@ BreakIterator_zh::BreakIterator_zh()
m_oDict.emplace("zh");
assert(hangingCharacters.pData);
hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "CN"));
- cBreakIterator = "com.sun.star.i18n.BreakIterator_zh";
+ cBreakIterator = u"com.sun.star.i18n.BreakIterator_zh"_ustr;
}
// ----------------------------------------------------
@@ -157,7 +157,7 @@ BreakIterator_zh_TW::BreakIterator_zh_TW()
m_oDict.emplace("zh");
assert(hangingCharacters.pData);
hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "TW"));
- cBreakIterator = "com.sun.star.i18n.BreakIterator_zh_TW";
+ cBreakIterator = u"com.sun.star.i18n.BreakIterator_zh_TW"_ustr;
}
// ----------------------------------------------------
@@ -169,7 +169,7 @@ BreakIterator_ja::BreakIterator_ja()
m_oDict->setJapaneseWordBreak();
assert(hangingCharacters.pData);
hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("ja", "JP"));
- cBreakIterator = "com.sun.star.i18n.BreakIterator_ja";
+ cBreakIterator = u"com.sun.star.i18n.BreakIterator_ja"_ustr;
}
// ----------------------------------------------------
@@ -179,7 +179,7 @@ BreakIterator_ko::BreakIterator_ko()
{
assert(hangingCharacters.pData);
hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("ko", "KR"));
- cBreakIterator = "com.sun.star.i18n.BreakIterator_ko";
+ cBreakIterator = u"com.sun.star.i18n.BreakIterator_ko"_ustr;
}
}
diff --git a/i18npool/source/breakiterator/breakiterator_th.cxx b/i18npool/source/breakiterator/breakiterator_th.cxx
index 531107b2a102..8d9245a4bf62 100644
--- a/i18npool/source/breakiterator/breakiterator_th.cxx
+++ b/i18npool/source/breakiterator/breakiterator_th.cxx
@@ -34,7 +34,7 @@ namespace i18npool {
*/
BreakIterator_th::BreakIterator_th()
{
- cBreakIterator = "com.sun.star.i18n.BreakIterator_th";
+ cBreakIterator = u"com.sun.star.i18n.BreakIterator_th"_ustr;
// to improve performance, alloc big enough memory in construct.
m_aNextCellIndex.assign(512, 0);
m_aPreviousCellIndex.assign(512, 0);
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
index 4927a82293fc..0caca6ab31ce 100644
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
@@ -48,7 +48,7 @@ namespace i18npool {
thread_local static BreakIterator_Unicode::BIMap theBIMap;
BreakIterator_Unicode::BreakIterator_Unicode()
- : cBreakIterator( "com.sun.star.i18n.BreakIterator_Unicode" ) // implementation name
+ : cBreakIterator( u"com.sun.star.i18n.BreakIterator_Unicode"_ustr ) // implementation name
, lineRule( "line" )
, icuBI( nullptr )
{
@@ -579,7 +579,7 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak(
OUString SAL_CALL
BreakIterator_Unicode::getImplementationName()
{
- return OUString::createFromAscii(cBreakIterator);
+ return cBreakIterator;
}
sal_Bool SAL_CALL
@@ -591,8 +591,7 @@ BreakIterator_Unicode::supportsService(const OUString& rServiceName)
uno::Sequence< OUString > SAL_CALL
BreakIterator_Unicode::getSupportedServiceNames()
{
- uno::Sequence< OUString > aRet { OUString::createFromAscii(cBreakIterator) };
- return aRet;
+ return{ cBreakIterator };
}
}
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index 0dbe964e5ba0..72ac63e30fdb 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -157,7 +157,7 @@ Calendar_gregorian::Calendar_gregorian(const Era *_earArray)
void
Calendar_gregorian::init(const Era *_eraArray)
{
- cCalendar = "com.sun.star.i18n.Calendar_gregorian";
+ cCalendar = u"com.sun.star.i18n.Calendar_gregorian"_ustr;
fieldSet = 0;
@@ -199,7 +199,7 @@ Calendar_gregorian::~Calendar_gregorian()
Calendar_hanja::Calendar_hanja()
{
- cCalendar = "com.sun.star.i18n.Calendar_hanja";
+ cCalendar = u"com.sun.star.i18n.Calendar_hanja"_ustr;
}
OUString SAL_CALL
@@ -219,7 +219,7 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16
Calendar_hanja_yoil::Calendar_hanja_yoil()
{
- cCalendar = "com.sun.star.i18n.Calendar_hanja_yoil";
+ cCalendar = u"com.sun.star.i18n.Calendar_hanja_yoil"_ustr;
}
OUString SAL_CALL
@@ -247,7 +247,7 @@ const Era gengou_eraArray[] = {
};
Calendar_gengou::Calendar_gengou() : Calendar_gregorian(gengou_eraArray)
{
- cCalendar = "com.sun.star.i18n.Calendar_gengou";
+ cCalendar = u"com.sun.star.i18n.Calendar_gengou"_ustr;
}
const Era ROC_eraArray[] = {
@@ -256,7 +256,7 @@ const Era ROC_eraArray[] = {
};
Calendar_ROC::Calendar_ROC() : Calendar_gregorian(ROC_eraArray)
{
- cCalendar = "com.sun.star.i18n.Calendar_ROC";
+ cCalendar = u"com.sun.star.i18n.Calendar_ROC"_ustr;
}
/**
@@ -269,7 +269,7 @@ const Era dangi_eraArray[] = {
};
Calendar_dangi::Calendar_dangi() : Calendar_gregorian(dangi_eraArray)
{
- cCalendar = "com.sun.star.i18n.Calendar_dangi";
+ cCalendar = u"com.sun.star.i18n.Calendar_dangi"_ustr;
}
const Era buddhist_eraArray[] = {
@@ -278,7 +278,7 @@ const Era buddhist_eraArray[] = {
};
Calendar_buddhist::Calendar_buddhist() : Calendar_gregorian(buddhist_eraArray)
{
- cCalendar = "com.sun.star.i18n.Calendar_buddhist";
+ cCalendar = u"com.sun.star.i18n.Calendar_buddhist"_ustr;
}
void SAL_CALL
@@ -1061,7 +1061,7 @@ Calendar_buddhist::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 n
OUString SAL_CALL
Calendar_gregorian::getImplementationName()
{
- return OUString::createFromAscii(cCalendar);
+ return cCalendar;
}
sal_Bool SAL_CALL
@@ -1073,8 +1073,7 @@ Calendar_gregorian::supportsService(const OUString& rServiceName)
Sequence< OUString > SAL_CALL
Calendar_gregorian::getSupportedServiceNames()
{
- Sequence< OUString > aRet { OUString::createFromAscii(cCalendar) };
- return aRet;
+ return { cCalendar };
}
}
diff --git a/i18npool/source/calendar/calendar_hijri.cxx b/i18npool/source/calendar/calendar_hijri.cxx
index c1223cc3f767..0e9396d4a2ce 100644
--- a/i18npool/source/calendar/calendar_hijri.cxx
+++ b/i18npool/source/calendar/calendar_hijri.cxx
@@ -42,7 +42,7 @@ constexpr sal_Int32 GregRef = 1422;
Calendar_hijri::Calendar_hijri()
{
- cCalendar = "com.sun.star.i18n.Calendar_hijri";
+ cCalendar = u"com.sun.star.i18n.Calendar_hijri"_ustr;
}
#define FIELDS ((1 << CalendarFieldIndex::ERA) | (1 << CalendarFieldIndex::YEAR) | (1 << CalendarFieldIndex::MONTH) | (1 << CalendarFieldIndex::DAY_OF_MONTH))
diff --git a/i18npool/source/calendar/calendar_jewish.cxx b/i18npool/source/calendar/calendar_jewish.cxx
index faeb7f74b13a..17645b8d903f 100644
--- a/i18npool/source/calendar/calendar_jewish.cxx
+++ b/i18npool/source/calendar/calendar_jewish.cxx
@@ -33,7 +33,7 @@ namespace i18npool {
Calendar_jewish::Calendar_jewish()
{
- cCalendar = "com.sun.star.i18n.Calendar_jewish";
+ cCalendar = u"com.sun.star.i18n.Calendar_jewish"_ustr;
}
// The following C++ code is translated from the Lisp code in