diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-01-20 11:35:10 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-01-20 11:35:10 +0100 |
commit | 2fb4d4800c3064c3c7b8573ad39c00d51d9bc41b (patch) | |
tree | 431419e56b4d5851fc57fe472186aa233af2d593 /i18npool/source/collator | |
parent | a5afd981e8c44de7aa122774a19cfe858c4f671a (diff) |
Replace suitable equalsAscii calls with equalsAsciiL.
Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'.
Diffstat (limited to 'i18npool/source/collator')
-rw-r--r-- | i18npool/source/collator/collatorImpl.cxx | 12 | ||||
-rw-r--r-- | i18npool/source/collator/collator_unicode.cxx | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx index 7576cc70fc8b..631160265c40 100644 --- a/i18npool/source/collator/collatorImpl.cxx +++ b/i18npool/source/collator/collatorImpl.cxx @@ -148,9 +148,9 @@ CollatorImpl::listCollatorOptions( const OUString& /*collatorAlgorithmName*/ ) t for (sal_Int32 i = 0; i < option_str.getLength(); i++) option_int[i] = - option_str[i].equalsAscii("IGNORE_CASE") ? CollatorOptions::CollatorOptions_IGNORE_CASE : - option_str[i].equalsAscii("IGNORE_KANA") ? CollatorOptions::CollatorOptions_IGNORE_KANA : - option_str[i].equalsAscii("IGNORE_WIDTH") ? CollatorOptions::CollatorOptions_IGNORE_WIDTH : 0; + option_str[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IGNORE_CASE")) ? CollatorOptions::CollatorOptions_IGNORE_CASE : + option_str[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IGNORE_KANA")) ? CollatorOptions::CollatorOptions_IGNORE_KANA : + option_str[i].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("IGNORE_WIDTH")) ? CollatorOptions::CollatorOptions_IGNORE_WIDTH : 0; return option_int; } @@ -213,9 +213,9 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS // load service with name <base>_<lang>_<country>_<algorithm> createCollator(rLocale, aBuf.append(rLocale.Language).append(under).append(rLocale.Country).append( under).append(rSortAlgorithm).makeStringAndClear(), rSortAlgorithm)) || - (l > 0 && c > 0 && a > 0 && rLocale.Language.equalsAscii("zh") && - (rLocale.Country.equalsAscii("HK") || - rLocale.Country.equalsAscii("MO")) && + (l > 0 && c > 0 && a > 0 && rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && + (rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HK")) || + rLocale.Country.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("MO"))) && // if the country code is HK or MO, one more step to try TW. createCollator(rLocale, aBuf.append(rLocale.Language).append(under).append(tw).append(under).append( rSortAlgorithm).makeStringAndClear(), rSortAlgorithm)) || diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index b6ebeecbd68f..cc87d9ad677e 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -95,7 +95,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: if (hModule) { const sal_uInt8* (*func)() = NULL; aBuf.appendAscii("get_").append(rLocale.Language).appendAscii("_"); - if (rLocale.Language.equalsAscii("zh")) { + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) { OUString func_base = aBuf.makeStringAndClear(); if (OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, @@ -103,11 +103,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: if (!func) func=(const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, (func_base + rAlgorithm).pData); } else { - if (rLocale.Language.equalsAscii("ja")) { + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja"))) { // replace algrithm name to implementation name. - if (rAlgorithm.equalsAscii("phonetic (alphanumeric first)") ) + if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric first)")) ) aBuf.appendAscii("phonetic_alphanumeric_first"); - else if (rAlgorithm.equalsAscii("phonetic (alphanumeric last)")) + else if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric last)"))) aBuf.appendAscii("phonetic_alphanumeric_last"); else aBuf.append(rAlgorithm); |