From 743f22045c4ec08c46c259fc0ba240194a391457 Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 15:05:52 +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/calendar/calendar_gregorian.cxx | 2 +- .../source/indexentry/indexentrysupplier_asian.cxx | 4 +-- i18npool/source/localedata/LocaleNode.cxx | 30 +++++++++++----------- 3 files changed, 18 insertions(+), 18 deletions(-) (limited to 'i18npool') diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx index 63b8dd5085b5..c912529e32a7 100644 --- a/i18npool/source/calendar/calendar_gregorian.cxx +++ b/i18npool/source/calendar/calendar_gregorian.cxx @@ -1043,7 +1043,7 @@ Calendar_gregorian::getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 sprintf(aStr, "%d", value); // #100211# - checked break; case CalendarDisplayCode::LONG_YEAR: - if (aCalendar.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("gengou"))) + if ( aCalendar.Name == "gengou" ) sprintf(aStr, "%02d", value); // #100211# - checked else sprintf(aStr, "%d", value); // #100211# - checked diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx index 1c88b9b8997e..b5ce82d80e1f 100644 --- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx +++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx @@ -118,9 +118,9 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, if (hModule) { sal_uInt16 **(*func)(sal_Int16*)=NULL; const sal_Char *func_name=NULL; - if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh"))) + if ( rLocale.Language == "zh" ) func_name=(OUString(RTL_CONSTASCII_USTRINGPARAM("TW HK MO")).indexOf(rLocale.Country) >= 0) ? "get_zh_zhuyin" : "get_zh_pinyin"; - else if (rLocale.Language.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ko"))) + else if ( rLocale.Language == "ko" ) func_name="get_ko_phonetic"; if (func_name) func=(sal_uInt16 **(*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData); diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx index 42cf5837fb36..840bf30529ae 100644 --- a/i18npool/source/localedata/LocaleNode.cxx +++ b/i18npool/source/localedata/LocaleNode.cxx @@ -128,31 +128,31 @@ LocaleNode::~LocaleNode() LocaleNode* LocaleNode::createNode (const OUString& name, const Reference< XAttributeList > & attr) { - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INFO"))) + if ( name == "LC_INFO" ) return new LCInfoNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CTYPE"))) + if ( name == "LC_CTYPE" ) return new LCCTYPENode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT"))) + if ( name == "LC_FORMAT" ) return new LCFormatNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_FORMAT_1"))) + if ( name == "LC_FORMAT_1" ) return new LCFormatNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CALENDAR"))) + if ( name == "LC_CALENDAR" ) return new LCCalendarNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_CURRENCY"))) + if ( name == "LC_CURRENCY" ) return new LCCurrencyNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_TRANSLITERATION"))) + if ( name == "LC_TRANSLITERATION" ) return new LCTransliterationNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_COLLATION"))) + if ( name == "LC_COLLATION" ) return new LCCollationNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_INDEX"))) + if ( name == "LC_INDEX" ) return new LCIndexNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_SEARCH"))) + if ( name == "LC_SEARCH" ) return new LCSearchNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_MISC"))) + if ( name == "LC_MISC" ) return new LCMiscNode (name,attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_NumberingLevel"))) + if ( name == "LC_NumberingLevel" ) return new LCNumberingLevelNode (name, attr); - if (name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LC_OutLineNumberingLevel"))) + if ( name == "LC_OutLineNumberingLevel" ) return new LCOutlineNumberingLevelNode (name, attr); return new LocaleNode(name,attr); @@ -447,7 +447,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const incError( "DateSeparator equals TimeSeparator."); if (aDecSep == aThoSep) incError( "DecimalSeparator equals ThousandSeparator."); - if (aThoSep.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM( " "))) + if ( aThoSep == " " ) incError( "ThousandSeparator is an ' ' ordinary space, this should be a non-breaking space U+00A0 instead."); if (aListSep == aDecSep) fprintf( stderr, "Warning: %s\n", @@ -624,7 +624,7 @@ void LCFormatNode::generateCode (const OFileWriter &of) const incErrorStr("replaceTo=\"%s\" needs FFFF to be adapted to the real LangID value.", str); of.writeParameter("replaceTo", str, mnSection); // Remember the replaceTo value for "[CURRENCY]" to check format codes. - if (strFrom.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "[CURRENCY]"))) + if ( strFrom == "[CURRENCY]" ) sTheCurrencyReplaceTo = str; // Remember the currency symbol if present. if (str.indexOfAsciiL( "[$", 2) == 0) -- cgit v1.2.3