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 | |
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')
-rw-r--r-- | i18npool/source/breakiterator/breakiteratorImpl.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/calendar/calendar_gregorian.cxx | 8 | ||||
-rw-r--r-- | i18npool/source/collator/collatorImpl.cxx | 12 | ||||
-rw-r--r-- | i18npool/source/collator/collator_unicode.cxx | 8 | ||||
-rw-r--r-- | i18npool/source/indexentry/indexentrysupplier_asian.cxx | 8 | ||||
-rw-r--r-- | i18npool/source/isolang/isolang.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/localedata/LocaleNode.cxx | 40 | ||||
-rw-r--r-- | i18npool/source/localedata/filewriter.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 12 | ||||
-rw-r--r-- | i18npool/source/nativenumber/nativenumbersupplier.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/textconversion/textconversion_zh.cxx | 4 |
11 files changed, 53 insertions, 53 deletions
diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx b/i18npool/source/breakiterator/breakiteratorImpl.cxx index aabd980f9161..540bb63c68e6 100644 --- a/i18npool/source/breakiterator/breakiteratorImpl.cxx +++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx @@ -133,7 +133,7 @@ Boundary SAL_CALL BreakIteratorImpl::nextWord( const OUString& Text, sal_Int32 n } static inline sal_Bool SAL_CALL isCJK( const Locale& rLocale ) { - return rLocale.Language.equalsAscii("zh") || rLocale.Language.equalsAscii("ja") || rLocale.Language.equalsAscii("ko"); + return rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) || rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")) || rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")); } Boundary SAL_CALL BreakIteratorImpl::previousWord( const OUString& Text, sal_Int32 nStartPos, diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index c4ebade521ed..54041aa08553 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -795,9 +795,9 @@ static sal_Int16 SAL_CALL NatNumForCalendar(const com::sun::star::lang::Locale& nCalendarDisplayCode == CalendarDisplayCode::LONG_YEAR) && value >= 100) || nCalendarDisplayCode == CalendarDisplayCode::SHORT_QUARTER || nCalendarDisplayCode == CalendarDisplayCode::LONG_QUARTER; - sal_Bool isChinese = aLocale.Language.equalsAscii("zh"); - sal_Bool isJapanese = aLocale.Language.equalsAscii("ja"); - sal_Bool isKorean = aLocale.Language.equalsAscii("ko"); + sal_Bool isChinese = aLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")); + sal_Bool isJapanese = aLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja")); + sal_Bool isKorean = aLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko")); if (isChinese || isJapanese || isKorean) { switch (nNativeNumberMode) { @@ -983,7 +983,7 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 sprintf(aStr, "%d", value); // #100211# - checked break; case CalendarDisplayCode::LONG_YEAR: - if (aCalendar.Name.equalsAscii("gengou")) + if (aCalendar.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gengou"))) sprintf(aStr, "%02d", value); // #100211# - checked else sprintf(aStr, "%d", value); // #100211# - checked 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); diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index b29d20e8067a..644277e24156 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -68,7 +68,7 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, if (hModule) { OUString get(RTL_CONSTASCII_USTRINGPARAM("get_indexdata_")); sal_uInt16** (*func)(sal_Int16*)=NULL; - if (rLocale.Language.equalsAscii("zh") && OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString(RTL_CONSTASCII_USTRINGPARAM("_TW_"))+rAlgorithm).pData); if (!func) func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, (get+rLocale.Language+OUString('_')+rAlgorithm).pData); @@ -120,9 +120,9 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, if (hModule) { sal_uInt16 **(*func)(sal_Int16*)=NULL; const sal_Char *func_name=NULL; - if (rLocale.Language.equalsAscii("zh")) + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) func_name=(OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) ? "get_zh_zhuyin" : "get_zh_pinyin"; - else if (rLocale.Language.equalsAscii("ko")) + else if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko"))) func_name="get_ko_phonetic"; if (func_name) func=(sal_uInt16 **(*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData); @@ -137,7 +137,7 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, sal_uInt16 address = idx[0][ch>>8]; if (address != 0xFFFF) { address = idx[1][address + (ch & 0xFF)]; - if (i > 0 && rLocale.Language.equalsAscii("zh")) + if (i > 0 && rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) candidate.appendAscii(" "); if (idx[2]) candidate.append(&idx[2][address]); diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 520e0cd3e8c0..408688496971 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -889,7 +889,7 @@ LanguageType MsLangId::convertIsoNamesToLanguage( const rtl::OUString& rLang, while ( pEntry->mnLang != LANGUAGE_DONTKNOW ); // some eng countries should be mapped to a specific english language - if ( aLowerLang.equalsAscii( "en" ) ) + if ( aLowerLang.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "en" ) ) ) { const IsoLangEngEntry* pEngEntry = aImplIsoLangEngEntries; do diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 2796ba427ff6..67a2d06672b6 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -129,31 +129,31 @@ LocaleNode::~LocaleNode() LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttributeList > & attr) { - if (name.equalsAscii("LC_INFO")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INFO"))) return new LCInfoNode (name,attr); - if (name.equalsAscii("LC_CTYPE")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CTYPE"))) return new LCCTYPENode (name,attr); - if (name.equalsAscii("LC_FORMAT")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT"))) return new LCFormatNode (name,attr); - if (name.equalsAscii("LC_FORMAT_1")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT_1"))) return new LCFormatNode (name,attr); - if (name.equalsAscii("LC_CALENDAR")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CALENDAR"))) return new LCCalendarNode (name,attr); - if (name.equalsAscii("LC_CURRENCY")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CURRENCY"))) return new LCCurrencyNode (name,attr); - if (name.equalsAscii("LC_TRANSLITERATION")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_TRANSLITERATION"))) return new LCTransliterationNode (name,attr); - if (name.equalsAscii("LC_COLLATION")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_COLLATION"))) return new LCCollationNode (name,attr); - if (name.equalsAscii("LC_INDEX")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INDEX"))) return new LCIndexNode (name,attr); - if (name.equalsAscii("LC_SEARCH")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_SEARCH"))) return new LCSearchNode (name,attr); - if (name.equalsAscii("LC_MISC")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_MISC"))) return new LCMiscNode (name,attr); - if (name.equalsAscii("LC_NumberingLevel")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_NumberingLevel"))) return new LCNumberingLevelNode (name, attr); - if (name.equalsAscii("LC_OutLineNumberingLevel")) + if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_OutLineNumberingLevel"))) return new LCOutlineNumberingLevelNode (name, attr); return new LocaleNode(name,attr); @@ -437,7 +437,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const incError( "DateSeparator equals TimeSeparator."); if (aDecSep == aThoSep) incError( "DecimalSeparator equals ThousandSeparator."); - if (aThoSep.equalsAscii( " ")) + if (aThoSep.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( " "))) incError( "ThousandSeparator is an ' ' ordinary space, this should be a non-breaking space U+00A0 instead."); if (aListSep == aDecSep) fprintf( stderr, "Warning: %s\n", @@ -579,7 +579,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const of.writeParameter("FormatKey", str, formatCount); str = currNodeAttr.getValueByName("default"); - bool bDefault = str.equalsAscii( "true"); + bool bDefault = str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "true")); of.writeDefaultParameter("FormatElement", str, formatCount); aType = currNodeAttr.getValueByName("type"); @@ -1093,7 +1093,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode * calNode = getChildAt (i); OUString calendarID = calNode -> getAttr().getValueByName("unoid"); of.writeParameter( "calendarID", calendarID, i); - bool bGregorian = calendarID.equalsAscii( "gregorian"); + bool bGregorian = calendarID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "gregorian")); if (!bHasGregorian) bHasGregorian = bGregorian; str = calNode -> getAttr().getValueByName("default"); @@ -1125,7 +1125,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = daysNode -> getChildAt(j); OUString dayID( currNode->getChildAt(0)->getValue()); of.writeParameter("dayID", dayID, i, j); - if (j == 0 && bGregorian && !dayID.equalsAscii( "sun")) + if (j == 0 && bGregorian && !dayID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "sun"))) incError( "First day of a week of a Gregorian calendar must be <DayID>sun</DayID>"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); of.writeParameter(elementTag, "DefaultFullName",currNode->getChildAt(2)->getValue() , i, j); @@ -1157,7 +1157,7 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = monthsNode -> getChildAt(j); OUString monthID( currNode->getChildAt(0)->getValue()); of.writeParameter("monthID", monthID, i, j); - if (j == 0 && bGregorian && !monthID.equalsAscii( "jan")) + if (j == 0 && bGregorian && !monthID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "jan"))) incError( "First month of a year of a Gregorian calendar must be <MonthID>jan</MonthID>"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); of.writeParameter(elementTag, "DefaultFullName",currNode->getChildAt(2)->getValue() , i, j); @@ -1189,9 +1189,9 @@ void LCCalendarNode::generateCode (const OFileWriter &of) const LocaleNode *currNode = erasNode -> getChildAt(j); OUString eraID( currNode->getChildAt(0)->getValue()); of.writeParameter("eraID", eraID, i, j); - if (j == 0 && bGregorian && !eraID.equalsAscii( "bc")) + if (j == 0 && bGregorian && !eraID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "bc"))) incError( "First era of a Gregorian calendar must be <EraID>bc</EraID>"); - if (j == 1 && bGregorian && !eraID.equalsAscii( "ad")) + if (j == 1 && bGregorian && !eraID.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( "ad"))) incError( "Second era of a Gregorian calendar must be <EraID>ad</EraID>"); of.writeAsciiString("\n"); of.writeParameter(elementTag, "DefaultAbbrvName",currNode->getChildAt(1)->getValue() ,i, j); diff --git a/i18npool/source/localedata/filewriter.cxx b/i18npool/source/localedata/filewriter.cxx index abc24d10e857..9b81e3383d63 100644 --- a/i18npool/source/localedata/filewriter.cxx +++ b/i18npool/source/localedata/filewriter.cxx @@ -144,14 +144,14 @@ void OFileWriter::writeIntParameter(const sal_Char* pAsciiStr, const sal_Int16 c bool OFileWriter::writeDefaultParameter(const sal_Char* pAsciiStr, const ::rtl::OUString& str, sal_Int16 count) const { - bool bBool = (str.equalsAscii("true") ? 1 : 0); + bool bBool = (str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ? 1 : 0); fprintf(m_f,"static const sal_Unicode default%s%d[] = {%d};\n", pAsciiStr, count, bBool); return bBool; } bool OFileWriter::writeDefaultParameter(const sal_Char* pAsciiStr, const ::rtl::OUString& str) const { - bool bBool = (str.equalsAscii("true") ? 1 : 0); + bool bBool = (str.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("true")) ? 1 : 0); fprintf(m_f,"static const sal_Unicode default%s[] = {%d};\n", pAsciiStr, bBool); return bBool; } diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 08c54ae99ff2..78d404a697b8 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -519,7 +519,7 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset++; sal_Bool defaultCalendar = sal::static_int_cast<sal_Bool>( allCalendars[offset][0] ); offset++; - if (OUString(allCalendars[offset]).equalsAscii("ref")) { + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { days = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_DAYS); offset += 2; } else { @@ -530,7 +530,7 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset += 3; } } - if (OUString(allCalendars[offset]).equalsAscii("ref")) { + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { months = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_MONTHS); offset += 2; } else { @@ -541,7 +541,7 @@ LocaleData::getAllCalendars( const Locale& rLocale ) throw(RuntimeException) offset += 3; } } - if (OUString(allCalendars[offset]).equalsAscii("ref")) { + if (OUString(allCalendars[offset]).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ref"))) { eras = getCalendarItemByName(OUString(allCalendars[offset+1]), rLocale, calendarsSeq, i, REF_ERAS); offset += 2; } else { @@ -1314,9 +1314,9 @@ oslGenericFunction SAL_CALL LocaleData::getFunctionSymbol( const Locale& rLocale // load function with name <ase>_<lang>_<country> (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append( rLocale.Country).makeStringAndClear(), pFunction, &pCachedItem)) != 0) || - (l > 0 && c > 0 && rLocale.Language.equalsAscii("zh") && - (rLocale.Country.equalsAscii("HK") || - rLocale.Country.equalsAscii("MO")) && + (l > 0 && c > 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. (pSymbol = rLookupTable.getFunctionSymbolByName(aBuf.append(rLocale.Language).append(under).append(tw).makeStringAndClear(), pFunction, &pCachedItem)) != 0) || diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 5044b6cc1e2f..c367be0a092e 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -757,7 +757,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN sal_Int16 num = sal::static_int_cast<sal_Int16>( number.indexOf(aAttr.Format) ); - if (aAttr.Style.equalsAscii("short")) { + if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("short"))) { if (num == NumberChar_FullWidth) return NativeNumberMode::NATNUM3; else if (num == NumberChar_Hangul_ko) @@ -766,7 +766,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN return NativeNumberMode::NATNUM1; else if (natNumIn(num, natnum2, sizeof_natnum2)) return NativeNumberMode::NATNUM2; - } else if (aAttr.Style.equalsAscii("medium")) { + } else if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("medium"))) { if (num == NumberChar_Hangul_ko) return NativeNumberMode::NATNUM11; else if (num == NumberChar_he) @@ -775,7 +775,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN return NativeNumberMode::NATNUM7; else if (natNumIn(num, natnum2, sizeof_natnum2)) return NativeNumberMode::NATNUM8; - } else if (aAttr.Style.equalsAscii("long")) { + } else if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("long"))) { if (num == NumberChar_FullWidth) return NativeNumberMode::NATNUM6; else if (num == NumberChar_Hangul_ko) diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx index 177fbd160ba8..0d7f6b2f7e9e 100644 --- a/i18npool/source/textconversion/textconversion_zh.cxx +++ b/i18npool/source/textconversion/textconversion_zh.cxx @@ -242,7 +242,7 @@ TextConversion_zh::getConversion( const OUString& aText, sal_Int32 nStartPos, sa const Locale& rLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { - if (rLocale.Language.equalsAscii("zh") && + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && ( nConversionType == TextConversionType::TO_SCHINESE || nConversionType == TextConversionType::TO_TCHINESE) ) { @@ -266,7 +266,7 @@ TextConversion_zh::getConversionWithOffset( const OUString& aText, sal_Int32 nSt const Locale& rLocale, sal_Int16 nConversionType, sal_Int32 nConversionOptions, Sequence<sal_Int32>& offset) throw( RuntimeException, IllegalArgumentException, NoSupportException ) { - if (rLocale.Language.equalsAscii("zh") && + if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh")) && ( nConversionType == TextConversionType::TO_SCHINESE || nConversionType == TextConversionType::TO_TCHINESE) ) { |