From 27cea710fd1e4e8887bcb95e1d25a53d9eae9f22 Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 15:37:46 +0200 Subject: Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator Pattern used: find . -name "*.cxx" -exec sed -i 's/\( *\)\(else if\|if\) *( *\([^!()|&]*\)\.equalsAsciiL( *RTL_CONSTASCII_STRINGPARAM *( *\([^)]*\)) *) *) *{$/\1\2 ( \3 == \4 ) {/' \{\} \; --- i18npool/source/collator/collator_unicode.cxx | 4 ++-- i18npool/source/nativenumber/nativenumbersupplier.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 0488d59743de..f574cdfd430c 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -93,7 +93,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.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) { + if ( rLocale.Language == "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, @@ -101,7 +101,7 @@ 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.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ja"))) { + if ( rLocale.Language == "ja" ) { // replace algrithm name to implementation name. if (rAlgorithm.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("phonetic (alphanumeric first)")) ) aBuf.appendAscii("phonetic_alphanumeric_first"); diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 6f2684f0c119..2d09dabbfa63 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -766,7 +766,7 @@ sal_Int16 SAL_CALL NativeNumberSupplier::convertFromXmlAttributes( const NativeN sal_Int16 num = sal::static_int_cast( number.indexOf(aAttr.Format) ); - if (aAttr.Style.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("short"))) { + if ( aAttr.Style == "short" ) { if (num == NumberChar_FullWidth) return NativeNumberMode::NATNUM3; else if (num == NumberChar_Hangul_ko) @@ -775,7 +775,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.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("medium"))) { + } else if ( aAttr.Style == "medium" ) { if (num == NumberChar_Hangul_ko) return NativeNumberMode::NATNUM11; else if (num == NumberChar_he) @@ -784,7 +784,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.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("long"))) { + } else if ( aAttr.Style == "long" ) { if (num == NumberChar_FullWidth) return NativeNumberMode::NATNUM6; else if (num == NumberChar_Hangul_ko) -- cgit