diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-23 13:16:31 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-26 14:51:15 +0100 |
commit | a3d0091d185f39eddabf4d372ebe0ac3061dbb89 (patch) | |
tree | 4d70cedc274972ccc21b6b8e7105f042090cf5d6 /i18npool | |
parent | af791fb775e35c11ad01c42a7085dd121ab9c7a6 (diff) |
New loplugin:stringliteralvar
See the comment at the top of compilerplugins/clang/stringliteralvar.cxx for
details.
(Turned some affected variables in included files into inline variables, to
avoid GCC warnings about unused variables.)
Change-Id: Ie77219e6adfdaaceaa8b4e590b08971f2f04c83a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108239
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'i18npool')
6 files changed, 7 insertions, 7 deletions
diff --git a/i18npool/source/collator/chaptercollator.cxx b/i18npool/source/collator/chaptercollator.cxx index fb4128a6c7c3..153f5ff3d38d 100644 --- a/i18npool/source/collator/chaptercollator.cxx +++ b/i18npool/source/collator/chaptercollator.cxx @@ -72,7 +72,7 @@ ChapterCollator::compareSubstring( const OUString& str1, sal_Int32 off1, sal_Int return res1.Value == res2.Value ? 0 : res1.Value > res2.Value ? 1 : -1; } -const char cChapCollator[] = "com.sun.star.i18n.ChapterCollator"; +const OUStringLiteral cChapCollator = u"com.sun.star.i18n.ChapterCollator"; OUString SAL_CALL ChapterCollator::getImplementationName() diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index dd273e687f21..f3ba3c062050 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -38,7 +38,7 @@ using namespace ::com::sun::star::uno; namespace i18npool { -const char implementationName[] = "com.sun.star.i18n.Collator_Unicode"; +const OUStringLiteral implementationName = u"com.sun.star.i18n.Collator_Unicode"; Collator_Unicode::Collator_Unicode() { diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index d352aec6f9de..fd98a6bc32e3 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -419,7 +419,7 @@ static void lcl_formatPersianWord( sal_Int32 nNumber, OUString& rsResult ) { OUStringBuffer aTemp(64); - static const sal_Unicode asPersianWord_conjunction_data[] = u" \u0648 "; + static const OUStringLiteral asPersianWord_conjunction_data = u" \u0648 "; OUString asPersianWord_conjunction( asPersianWord_conjunction_data ); unsigned char nSection = 0; diff --git a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx index 214893a901d4..b4a9f3e0cda6 100644 --- a/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_ja_phonetic.cxx @@ -63,7 +63,7 @@ sal_Int16 SAL_CALL IndexEntrySupplier_ja_phonetic::compareIndexEntry( return result; } -const char first[] = "phonetic (alphanumeric first)"; +const OUStringLiteral first = u"phonetic (alphanumeric first)"; sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_syllable::loadAlgorithm( const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/, sal_Int32 collatorOptions ) @@ -77,7 +77,7 @@ sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_first_by_consonant return collator->loadCollatorAlgorithm(first, rLocale, collatorOptions) == 0; } -const char last[] = "phonetic (alphanumeric last)"; +const OUStringLiteral last = u"phonetic (alphanumeric last)"; sal_Bool SAL_CALL IndexEntrySupplier_ja_phonetic_alphanumeric_last_by_syllable::loadAlgorithm( const css::lang::Locale& rLocale, const OUString& /*SortAlgorithm*/, sal_Int32 collatorOptions ) diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index dbd3f77b7b4c..a745396782df 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -1220,7 +1220,7 @@ OUString getCyrillicNativeNumberString(const OUString& aNumberString) return aNumberString; } -const char implementationName[] = "com.sun.star.i18n.NativeNumberSupplier"; +const OUStringLiteral implementationName = u"com.sun.star.i18n.NativeNumberSupplier"; OUString SAL_CALL NativeNumberSupplierService::getImplementationName() { diff --git a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx index 6f7f966cbe01..38732564fd0c 100644 --- a/i18npool/source/ordinalsuffix/ordinalsuffix.cxx +++ b/i18npool/source/ordinalsuffix/ordinalsuffix.cxx @@ -134,7 +134,7 @@ uno::Sequence< OUString > SAL_CALL OrdinalSuffixService::getOrdinalSuffix( sal_I return comphelper::containerToSequence(retVec); } -const char cOrdinalSuffix[] = "com.sun.star.i18n.OrdinalSuffix"; +const OUStringLiteral cOrdinalSuffix = u"com.sun.star.i18n.OrdinalSuffix"; OUString SAL_CALL OrdinalSuffixService::getImplementationName() { |