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>
This commit is contained in:
committed by
Noel Grandin
parent
e7bb3a5206
commit
8dacc3e636
@@ -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
|
||||
|
@@ -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];
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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);
|
||||
|
@@ -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 };
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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 };
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -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))
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user