summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-01-30 16:38:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-01-31 08:56:20 +0000
commit1c3e84d8192218befebcddae2ed9842d081dc6c7 (patch)
treef4fc5cddd181d6d49bf55f74e6d3d107b8ae8d18 /i18npool
parente1e6cdbb1e9ff37f0bb740a70045c66953bec50c (diff)
teach lolugin:stringconstant about calling constructors
so we can remove unnecessary calls to the OUString(literal) constructor when calling constructors like this: Foo(OUString("xxx"), 1) Change-Id: I1de60ef561437c86b27dc9cb095a5deb2e103b36 Reviewed-on: https://gerrit.libreoffice.org/33698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/calendar/calendar_gregorian.cxx2
-rw-r--r--i18npool/source/characterclassification/characterclassificationImpl.cxx2
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx2
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_default.cxx2
-rw-r--r--i18npool/source/localedata/localedata.cxx3
-rw-r--r--i18npool/source/textconversion/textconversion_ko.cxx4
6 files changed, 6 insertions, 9 deletions
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index a95c8676dda5..78fd7457927c 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -187,7 +187,7 @@ Calendar_hanja::getDisplayName( sal_Int16 displayIndex, sal_Int16 idx, sal_Int16
{
if ( displayIndex == CalendarDisplayIndex::AM_PM ) {
// Am/Pm string for Korean Hanja calendar will refer to Japanese locale
- css::lang::Locale jaLocale(OUString("ja"), OUString(), OUString());
+ css::lang::Locale jaLocale("ja", OUString(), OUString());
if (idx == 0) return LocaleDataImpl::get()->getLocaleItem(jaLocale).timeAM;
else if (idx == 1) return LocaleDataImpl::get()->getLocaleItem(jaLocale).timePM;
else throw ERROR;
diff --git a/i18npool/source/characterclassification/characterclassificationImpl.cxx b/i18npool/source/characterclassification/characterclassificationImpl.cxx
index cb3c4fb047eb..03566456cd0c 100644
--- a/i18npool/source/characterclassification/characterclassificationImpl.cxx
+++ b/i18npool/source/characterclassification/characterclassificationImpl.cxx
@@ -179,7 +179,7 @@ CharacterClassificationImpl::getLocaleSpecificCharacterClassification(const Loca
return cachedItem->xCI;
else if (xUCI.is())
{
- lookupTable.push_back( cachedItem = new lookupTableItem( rLocale, OUString("Unicode"), xUCI));
+ lookupTable.push_back( cachedItem = new lookupTableItem( rLocale, "Unicode", xUCI));
return cachedItem->xCI;
}
}
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index 7a42587bf6c3..276a2ce15f9c 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -958,7 +958,7 @@ OUString DefaultNumberingProvider::makeNumberingIdentifier(sal_Int16 index)
return OUString(aSupportedTypes[index].cSymbol, strlen(aSupportedTypes[index].cSymbol), RTL_TEXTENCODING_UTF8);
else {
OUString result;
- Locale aLocale(OUString("en"), OUString(), OUString());
+ Locale aLocale("en", OUString(), OUString());
Sequence<beans::PropertyValue> aProperties(2);
aProperties[0].Name = "NumberingType";
aProperties[0].Value <<= aSupportedTypes[index].nType;
diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index 8db03e04afef..e88cabf47465 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -160,7 +160,7 @@ OUString Index::getIndexDescription(const OUString& rIndexEntry)
return OUString(&indexChar, 1);
}
-#define LOCALE_EN lang::Locale(OUString("en"), OUString(), OUString())
+#define LOCALE_EN lang::Locale("en", OUString(), OUString())
void Index::makeIndexKeys(const lang::Locale &rLocale, const OUString &algorithm)
{
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 617ce25267ba..1e6728e864bb 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -630,8 +630,7 @@ Sequence< CalendarItem2 > &LocaleDataImpl::getCalendarItemByName(const OUString&
}
// Referred locale not found, return name for en_US locale.
if (index == cals.getLength()) {
- cals = getAllCalendars2(
- Locale(OUString("en"), OUString("US"), OUString()));
+ cals = getAllCalendars2( Locale("en", "US", OUString()) );
if (cals.getLength() > 0)
ref_cal = cals[0];
else
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index 0acad9dbe0c9..fba410ca58c5 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -57,9 +57,7 @@ TextConversion_ko::TextConversion_ko( const Reference < XComponentContext >& xCo
// get maximum length of word in dictionary
if (xCDL.is()) {
- Locale loc(OUString("ko"),
- OUString("KR"),
- OUString());
+ Locale loc("ko", "KR", OUString());
maxLeftLength = xCDL->queryMaxCharCount(loc,
ConversionDictionaryType::HANGUL_HANJA,
ConversionDirection_FROM_LEFT);