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 | |
parent | don't leak PPDParsers (diff) | |
download | core-2fb4d4800c3064c3c7b8573ad39c00d51d9bc41b.tar.gz core-2fb4d4800c3064c3c7b8573ad39c00d51d9bc41b.zip |
Replace suitable equalsAscii calls with equalsAsciiL.
Done with sed -i 's%\(\.equalsAscii\)(\(\s\?"[^"]\+"\)\(\s\?\))%\1L(\3RTL_CONSTASCII_STRINGPARAM(\2\3)\3)%g'.
35 files changed, 250 insertions, 250 deletions
diff --git a/canvas/source/tools/parametricpolypolygon.cxx b/canvas/source/tools/parametricpolypolygon.cxx index 40fbdf9922f1..41b0fe29e11d 100644 --- a/canvas/source/tools/parametricpolypolygon.cxx +++ b/canvas/source/tools/parametricpolypolygon.cxx @@ -85,46 +85,46 @@ namespace canvas beans::PropertyValue aProp; if( (rArgs[i] >>= aProp) ) { - if( aProp.Name.equalsAscii("Colors") ) + if( aProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Colors")) ) { aProp.Value >>= colorSequence; } - else if( aProp.Name.equalsAscii("Stops") ) + else if( aProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Stops")) ) { aProp.Value >>= colorStops; } - else if( aProp.Name.equalsAscii("AspectRatio") ) + else if( aProp.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("AspectRatio")) ) { aProp.Value >>= fAspectRatio; } } } - if( rServiceName.equalsAscii("LinearGradient") ) + if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("LinearGradient")) ) { return createLinearHorizontalGradient(rDevice, colorSequence, colorStops); } - else if( rServiceName.equalsAscii("EllipticalGradient") ) + else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EllipticalGradient")) ) { return createEllipticalGradient(rDevice, colorSequence, colorStops, fAspectRatio); } - else if( rServiceName.equalsAscii("RectangularGradient") ) + else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("RectangularGradient")) ) { return createRectangularGradient(rDevice, colorSequence, colorStops, fAspectRatio); } - else if( rServiceName.equalsAscii("VerticalLineHatch") ) + else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("VerticalLineHatch")) ) { // TODO: NYI } - else if( rServiceName.equalsAscii("OrthogonalLinesHatch") ) + else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OrthogonalLinesHatch")) ) { // TODO: NYI } - else if( rServiceName.equalsAscii("ThreeCrossingLinesHatch") ) + else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ThreeCrossingLinesHatch")) ) { // TODO: NYI } - else if( rServiceName.equalsAscii("FourCrossingLinesHatch") ) + else if( rServiceName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FourCrossingLinesHatch")) ) { // TODO: NYI } diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx index 57744ba15807..db72a7df4079 100644 --- a/canvas/workben/canvasdemo.cxx +++ b/canvas/workben/canvasdemo.cxx @@ -657,8 +657,8 @@ void DemoApp::Main() { ::rtl::OUString aParam = GetCommandLineParam( i ); - if( aParam.equalsAscii( "--help" ) || - aParam.equalsAscii( "-h" ) ) + if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) || + aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) ) bHelp = true; } diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx index fc3093f24525..3b5e3c9ef652 100644 --- a/comphelper/source/misc/mimeconfighelper.cxx +++ b/comphelper/source/misc/mimeconfighelper.cxx @@ -204,7 +204,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAscii( "DocumentService" ) ) + if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) aFilterData[nInd].Value >>= aDocServiceName; } } @@ -240,7 +240,7 @@ uno::Reference< container::XNameAccess > MimeConfigurationHelper::GetMediaTypeCo for ( sal_Int32 nInd = 0; nInd < aType.getLength(); nInd++ ) { ::rtl::OUString aFilterName; - if ( aType[nInd].Name.equalsAscii( "PreferredFilter" ) + if ( aType[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aType[nInd].Value >>= aFilterName ) && aFilterName.getLength() ) { ::rtl::OUString aDocumentName = GetDocServiceNameFromFilter( aFilterName ); @@ -309,7 +309,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjPropsFromConfi { aResult[nInd + 1].Name = aObjPropNames[nInd]; - if ( aObjPropNames[nInd].equalsAscii( "ObjectVerbs" ) ) + if ( aObjPropNames[nInd].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectVerbs" ) ) ) { uno::Sequence< ::rtl::OUString > aVerbShortcuts; if ( xObjectProps->getByName( aObjPropNames[nInd] ) >>= aVerbShortcuts ) @@ -573,7 +573,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu ::rtl::OUString aFilterName; for ( sal_Int32 nInd = 0; nInd < aMediaDescr.getLength(); nInd++ ) - if ( aMediaDescr[nInd].Name.equalsAscii( "FilterName" ) ) + if ( aMediaDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) aMediaDescr[nInd].Value >>= aFilterName; if ( !aFilterName.getLength() ) @@ -595,7 +595,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu // get FilterName for ( sal_Int32 nInd = 0; nInd < aTempMD.getLength(); nInd++ ) - if ( aTempMD[nInd].Name.equalsAscii( "FilterName" ) ) + if ( aTempMD[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ) ) ) aTempMD[nInd].Value >>= aFilterName; if ( aFilterName.getLength() ) @@ -615,7 +615,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { for ( sal_Int32 nInd = 0; nInd < aTypes.getLength(); nInd++ ) { - if ( aTypes[nInd].Name.equalsAscii( "PreferredFilter" ) && ( aTypes[nInd].Value >>= aFilterName ) ) + if ( aTypes[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredFilter" ) ) && ( aTypes[nInd].Value >>= aFilterName ) ) { sal_Int32 nOldLen = aMediaDescr.getLength(); aMediaDescr.realloc( nOldLen + 1 ); @@ -637,7 +637,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu { ::rtl::OUString aDocName; for ( sal_Int32 nInd = 0; nInd < aObject.getLength(); nInd++ ) - if ( aObject[nInd].Name.equalsAscii( "ObjectDocumentServiceName" ) ) + if ( aObject[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ObjectDocumentServiceName" ) ) ) { aObject[nInd].Value >>= aDocName; break; @@ -648,7 +648,7 @@ uno::Sequence< beans::NamedValue > MimeConfigurationHelper::GetObjectPropsByDocu sal_Bool bNeedsAddition = sal_True; for ( sal_Int32 nMedInd = 0; nMedInd < aMediaDescr.getLength(); nMedInd++ ) - if ( aMediaDescr[nMedInd].Name.equalsAscii( "DocumentService" ) ) + if ( aMediaDescr[nMedInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DocumentService" ) ) ) { aMediaDescr[nMedInd].Value <<= aDocName; bNeedsAddition = sal_False; @@ -683,7 +683,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile( if ( aFilterAnyData >>= aFilterData ) { for ( sal_Int32 nInd = 0; nInd < aFilterData.getLength(); nInd++ ) - if ( aFilterData[nInd].Name.equalsAscii( "Flags" ) ) + if ( aFilterData[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Flags" ) ) ) { uno::Any aVal = aFilterData[nInd].Value; sal_Int32 nFlags = 0; 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) ) { diff --git a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx index 7bf855c7e4a3..09eae2f5d37e 100644 --- a/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx +++ b/svl/qa/complex/ConfigItems/helper/HistoryOptTest.cxx @@ -465,13 +465,13 @@ void HistoryOptTest::impl_clearList(const ::rtl::OUString& sList) css::uno::Reference< css::beans::XPropertySet > xFirstItem; css::uno::Sequence< ::rtl::OUString > sFileList; - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) m_xCfg->getByName(s_sPickList) >>= xListAccess; - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) m_xCfg->getByName(s_sURLHistory) >>= xListAccess; - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess; if (xListAccess.is()) @@ -502,13 +502,13 @@ sal_Bool HistoryOptTest::impl_isListEmpty(const ::rtl::OUString& sList) css::uno::Reference< css::container::XNameAccess > xOrderList; sal_Bool bRet = sal_True; - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) m_xCfg->getByName(s_sPickList) >>= xListAccess; - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) m_xCfg->getByName(s_sURLHistory) >>= xListAccess; - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) m_xCfg->getByName(s_sHelpBookmarks) >>= xListAccess; if (xListAccess.is()) @@ -540,7 +540,7 @@ void HistoryOptTest::impl_checkGetSize(const ::rtl::OUString& sList) sal_uInt32 nSize = 0; sal_uInt32 nSize_ = 0; - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) { nSize = aHistoryOpt.GetSize(ePICKLIST); @@ -553,7 +553,7 @@ void HistoryOptTest::impl_checkGetSize(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetSize(ePICKLIST) error!")), 0); } - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) { nSize = aHistoryOpt.GetSize(eHISTORY); @@ -567,7 +567,7 @@ void HistoryOptTest::impl_checkGetSize(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetSize(eHISTORY) error!")), 0); } - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) { nSize = aHistoryOpt.GetSize(eHELPBOOKMARKS); @@ -591,7 +591,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList) sal_uInt32 nSize = 0; sal_uInt32 nSize_ = 0; - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) { xSet->getPropertyValue(s_sPickListSize) >>= nSize; aHistoryOpt.SetSize(ePICKLIST, (nSize+1)); @@ -602,7 +602,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetSize(ePICKLIST) error!")), 0); } - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) { xSet->getPropertyValue(s_sURLHistorySize) >>= nSize; aHistoryOpt.SetSize(eHISTORY, (nSize+1)); @@ -613,7 +613,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SetSize(eHISTORY) error!")), 0); } - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) { xSet->getPropertyValue(s_sHelpBookmarksSize) >>= nSize; aHistoryOpt.SetSize(eHELPBOOKMARKS, (nSize+1)); @@ -629,7 +629,7 @@ void HistoryOptTest::impl_checkSetSize(const ::rtl::OUString& sList) // test SvtHistoryOptions::Clear() void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList) { - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) { aHistoryOpt.Clear(ePICKLIST); if ( !impl_isListEmpty(s_sPickList) ) @@ -637,7 +637,7 @@ void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Clear(ePICKLIST) error!")), 0); } - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) { aHistoryOpt.Clear(eHISTORY); if ( !impl_isListEmpty(s_sURLHistory) ) @@ -645,7 +645,7 @@ void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Clear(eHISTORY) error!")), 0); } - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) { aHistoryOpt.Clear(eHELPBOOKMARKS); if ( !impl_isListEmpty(s_sHelpBookmarks) ) @@ -658,7 +658,7 @@ void HistoryOptTest::impl_checkClear(const ::rtl::OUString& sList) // test SvtHistoryOptions::GetList() void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList) { - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) { impl_clearList(s_sPickList); aHistoryOpt.AppendItem( ePICKLIST , @@ -673,7 +673,7 @@ void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetList(ePICKLIST) error!")), 0); } - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) { impl_clearList(s_sURLHistory); aHistoryOpt.AppendItem( eHISTORY , @@ -688,7 +688,7 @@ void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("GetList(eHISTORY) error!")), 0); } - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) { impl_clearList(s_sHelpBookmarks); aHistoryOpt.AppendItem( eHELPBOOKMARKS , @@ -706,7 +706,7 @@ void HistoryOptTest::impl_checkGetList(const ::rtl::OUString& sList) void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList) { - if (sList.equalsAscii("PickList")) + if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PickList"))) { impl_clearList(s_sPickList); sal_Int32 nListSize = aHistoryOpt.GetSize(ePICKLIST); @@ -725,7 +725,7 @@ void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) ); } - else if (sList.equalsAscii("URLHistory")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("URLHistory"))) { impl_clearList(s_sURLHistory); sal_Int32 nListSize = aHistoryOpt.GetSize(eHISTORY); @@ -744,7 +744,7 @@ void HistoryOptTest::impl_checkAppendItem(const ::rtl::OUString& sList) ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("")) ); } - else if (sList.equalsAscii("HelpBookmarks")) + else if (sList.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("HelpBookmarks"))) { //impl_clearList(s_sHelpBookmarks); //sal_Int32 nListSize = aHistoryOpt.GetSize(eHELPBOOKMARKS); diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index f4dfd8e6f025..c596113f1658 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -159,7 +159,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA for ( sal_Int32 nInd = 0, nNumArgs = 1; nInd < aDescr.getLength(); nInd++ ) { - if ( aDescr[nInd].Name.equalsAscii( "InteractionHandler" ) ) + if ( aDescr[nInd].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InteractionHandler" ) ) ) { aPropsToSet.realloc( ++nNumArgs ); aPropsToSet[nNumArgs-1].Name = aDescr[nInd].Name; diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index 1af00462b3dc..2cde8847c7fb 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -948,9 +948,9 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, const css::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAscii( "WINDOW" ) ) + if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) pProps[i].Value >>= nWindowHandle; - else if( pProps[i].Name.equalsAscii( "XEMBED" ) ) + else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) pProps[i].Value >>= bXEmbed; } } @@ -1161,9 +1161,9 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( const css::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAscii( "WINDOW" ) ) + if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) pProps[i].Value >>= nWindowHandle; - else if( pProps[i].Name.equalsAscii( "XEMBED" ) ) + else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) pProps[i].Value >>= bXEmbed; } } diff --git a/toolkit/source/awt/vclxwindow1.cxx b/toolkit/source/awt/vclxwindow1.cxx index 259b86368cc7..156dbfc1eda0 100644 --- a/toolkit/source/awt/vclxwindow1.cxx +++ b/toolkit/source/awt/vclxwindow1.cxx @@ -75,9 +75,9 @@ void VCLXWindow::SetSystemParent_Impl( const com::sun::star::uno::Any& rHandle ) const com::sun::star::beans::NamedValue* pProps = aProps.getConstArray(); for( int i = 0; i < nProps; i++ ) { - if( pProps[i].Name.equalsAscii( "WINDOW" ) ) + if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "WINDOW" ) ) ) pProps[i].Value >>= nHandle; - else if( pProps[i].Name.equalsAscii( "XEMBED" ) ) + else if( pProps[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XEMBED" ) ) ) pProps[i].Value >>= bXEmbed; } } diff --git a/toolkit/source/layout/core/helper.cxx b/toolkit/source/layout/core/helper.cxx index 8a196e6bda7b..70d7df8fe51c 100644 --- a/toolkit/source/layout/core/helper.cxx +++ b/toolkit/source/layout/core/helper.cxx @@ -89,21 +89,21 @@ uno::Reference <awt::XLayoutContainer> WidgetFactory::createContainer (OUString { uno::Reference< awt::XLayoutContainer > xPeer; - if ( name.equalsAscii( "hbox" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hbox" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new HBox() ); - else if ( name.equalsAscii( "vbox" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vbox" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new VBox() ); - else if ( name.equalsAscii( "table" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "table" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Table() ); - else if ( name.equalsAscii( "flow" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "flow" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Flow() ); - else if ( name.equalsAscii( "bin" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bin" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Bin() ); - else if ( name.equalsAscii( "min-size" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "min-size" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new MinSize() ); - else if ( name.equalsAscii( "align" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "align" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new Align() ); - else if ( name.equalsAscii( "dialogbuttonhbox" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dialogbuttonhbox" ) ) ) xPeer = uno::Reference< awt::XLayoutContainer >( new DialogButtonHBox() ); return xPeer; @@ -191,7 +191,7 @@ WidgetFactory::createWidget (uno::Reference< awt::XToolkit > xToolkit, uno::Refe #if FIXED_INFO OUString tName = name; // FIXME - if ( name.equalsAscii( "fixedinfo" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "fixedinfo" ) ) ) tName = OUString(RTL_CONSTASCII_USTRINGPARAM("fixedtext")); xPeer = toolkitCreateWidget (xToolkit, xParent, tName, properties); #else @@ -388,7 +388,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren { ; } - if ( name.equalsAscii( "dialog" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "dialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -397,7 +397,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "modaldialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "modaldialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -406,7 +406,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "modelessdialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "modelessdialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -415,7 +415,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "sfxdialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sfxdialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -424,7 +424,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "sfxmodaldialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sfxmodaldialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -434,7 +434,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "sfxmodelessdialog" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sfxmodelessdialog" ) ) ) { if ( parent == NULL ) parent = DIALOG_NO_PARENT; @@ -443,95 +443,95 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren attributes ^= awt::WindowAttribute::SHOW; } - else if ( name.equalsAscii( "tabcontrol" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "tabcontrol" ) ) ) { window = new TabControl( parent, ImplGetWinBits( attributes, WINDOW_TABCONTROL ) ); *component = new layoutimpl::VCLXTabControl(); } - else if ( name.equalsAscii( "scroller" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "scroller" ) ) ) { // used FixedImage because I just want some empty non-intrusive widget window = new FixedImage( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXScroller(); } - else if ( name.equalsAscii( "hsplitter" ) || name.equalsAscii( "vsplitter" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hsplitter" ) ) || name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vsplitter" ) ) ) { window = new FixedImage( parent, ImplGetWinBits( attributes, 0 ) ); - *component = new layoutimpl::VCLXSplitter( name.equalsAscii( "hsplitter" ) ); + *component = new layoutimpl::VCLXSplitter( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hsplitter" ) ) ); } - else if ( name.equalsAscii( "hfixedline" ) || name.equalsAscii( "vfixedline" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hfixedline" ) ) || name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "vfixedline" ) ) ) { WinBits nStyle = ImplGetWinBits( attributes, 0 ); nStyle ^= WB_HORZ; - if ( name.equalsAscii( "hfixedline" ) ) + if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hfixedline" ) ) ) nStyle |= WB_HORZ; else nStyle |= WB_VERT; window = new FixedLine( parent, nStyle ); *component = new layoutimpl::VCLXFixedLine(); } - else if ( name.equalsAscii( "okbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "okbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXOKButton( window ); window->SetType (WINDOW_OKBUTTON); } - else if ( name.equalsAscii( "cancelbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cancelbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXCancelButton( window ); window->SetType (WINDOW_CANCELBUTTON); } - else if ( name.equalsAscii( "yesbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "yesbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXYesButton( window ); window->SetType (WINDOW_OKBUTTON); } - else if ( name.equalsAscii( "nobutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "nobutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); window->SetType (WINDOW_CANCELBUTTON); *component = new layoutimpl::VCLXNoButton( window ); } - else if ( name.equalsAscii( "retrybutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "retrybutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXRetryButton( window ); } - else if ( name.equalsAscii( "ignorebutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ignorebutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXIgnoreButton( window ); } - else if ( name.equalsAscii( "resetbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "resetbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXResetButton( window ); } - else if ( name.equalsAscii( "applybutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "applybutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXApplyButton( window ); } - else if ( name.equalsAscii( "helpbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXHelpButton( window ); window->SetType (WINDOW_HELPBUTTON); } - else if ( name.equalsAscii( "morebutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "morebutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXMoreButton( window ); window->SetType (WINDOW_MOREBUTTON); } - else if ( name.equalsAscii( "advancedbutton" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "advancedbutton" ) ) ) { window = new PushButton( parent, ImplGetWinBits( attributes, 0 ) ); *component = new layoutimpl::VCLXAdvancedButton( window ); } - else if ( name.equalsAscii( "plugin" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "plugin" ) ) ) { window = new Control( parent, ImplGetWinBits( attributes, 0 ) ); #ifndef __SUNPRO_CC @@ -539,7 +539,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren #endif *component = new layoutimpl::VCLXPlugin( window, ImplGetWinBits( attributes, 0 ) ); } - else if ( name.equalsAscii( "tabpage" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "tabpage" ) ) ) { if (layout::TabPage::global_parent) parent = layout::TabPage::global_parent; @@ -560,7 +560,7 @@ Window* WidgetFactory::layoutCreateWindow (VCLXWindow** component, Window *paren *component = new VCLXTabPage( window ); } } - else if ( name.equalsAscii( "string" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "string" ) ) ) { // FIXME: move <string>s.text to simple map<string> in root? attributes &= ~awt::WindowAttribute::SHOW; diff --git a/toolkit/workben/layout/test.cxx b/toolkit/workben/layout/test.cxx index 8d69baccd5f3..071d5c2d1f45 100644 --- a/toolkit/workben/layout/test.cxx +++ b/toolkit/workben/layout/test.cxx @@ -198,22 +198,22 @@ void LayoutTest::ParseCommandLine() for ( sal_uInt16 i = 0; i < GetCommandLineParamCount(); i++ ) { OUString aParam = OUString( GetCommandLineParam( i ) ); - if ( aParam.equalsAscii( "-h" ) || aParam.equalsAscii( "--help" ) ) + if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) || aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) ) usage(); - if ( aParam.equalsAscii( "--inst" ) ) + if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--inst" ) ) ) { if ( i >= GetCommandLineParamCount() - 1) usage(); mInstallDir = GetCommandLineParam( ++i ); setenv( "OOO_INSTALL_PREFIX", OUSTRING_CSTR( mInstallDir ), 1 ); } - else if ( aParam.equalsAscii( "--test" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--test" ) ) ) { mTestDialog = OUString(RTL_CONSTASCII_USTRINGPARAM("zoom")); if (i + 1 < GetCommandLineParamCount()) mTestDialog = GetCommandLineParam( ++i ); } - else if ( aParam.equalsAscii( "--editor" ) ) + else if ( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--editor" ) ) ) mEditMode = true; else mFiles.push_back( aParam ); @@ -264,17 +264,17 @@ void TestDialog( OUString const& name ) { if ( 0 ) ; - else if ( name.equalsAscii( "plugin" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "plugin" ) ) ) { PluginDialog plugin ( 0 ); RunDialog( plugin ); } - else if ( name.equalsAscii( "query" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "query" ) ) ) { QueryBox query ( 0, "Do you want to do?", "do"); RunDialog( query ); } - else if ( name.equalsAscii( "query-compat" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "query-compat" ) ) ) { QueryBox query ( 0, WinBits( WB_YES_NO | WB_DEF_YES ), @@ -282,25 +282,25 @@ void TestDialog( OUString const& name ) OUString(RTL_CONSTASCII_USTRINGPARAM ("Do you want to do?"))); RunDialog( query ); } - else if ( name.equalsAscii( "recover" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "recover" ) ) ) { SvxRecoverDialog recover ( 0 ); RunDialog( recover ); } #if SORT_DLG - else if ( name.equalsAscii( "sort" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sort" ) ) ) { LoadSC(); ScSortDlg sort (0, 0); RunDialog( sort ); } #endif /* SORT_DLG */ - else if ( name.equalsAscii( "wordcount" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "wordcount" ) ) ) { SwWordCountDialog words ( 0 ); RunDialog( words ); } - else if ( name.equalsAscii( "zoom" ) ) + else if ( name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "zoom" ) ) ) { SvxZoomDialog zoom( 0 ); RunDialog( zoom ); diff --git a/toolkit/workben/layout/uno.hxx b/toolkit/workben/layout/uno.hxx index d89024ff8468..94a70e9fdc1e 100644 --- a/toolkit/workben/layout/uno.hxx +++ b/toolkit/workben/layout/uno.hxx @@ -54,7 +54,7 @@ public: virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL createInstance( const rtl::OUString& aServiceSpecifier ) throw (com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException) { - if ( aServiceSpecifier.equalsAscii( "com.sun.star.awt.Layout" ) ) + if ( aServiceSpecifier.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.awt.Layout" ) ) ) { fprintf( stderr, "UnoBootstrapLayout: create service '%s'\n", rtl::OUStringToOString (aServiceSpecifier, RTL_TEXTENCODING_UTF8 ).getStr() ); diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index 408a208e7bee..4da4652e7d6b 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -327,40 +327,40 @@ OUString DefaultFontConfiguration::getUserInterfaceFont( const Locale& rLocale ) static const OUString aFallBackKorean( aFallBackKoreanLocalized ); // optimize font list for some locales, as long as Andale Sans UI does not support them - if( aLocale.Language.equalsAscii( "ar" ) || - aLocale.Language.equalsAscii( "he" ) || - aLocale.Language.equalsAscii( "iw" ) ) + if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ar" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "he" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "iw" ) ) ) { return aFallBackArabic; } - else if( aLocale.Language.equalsAscii( "th" ) ) + else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "th" ) ) ) { return aFallBackThai; } - else if( aLocale.Language.equalsAscii( "ko" ) ) + else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ko" ) ) ) { return aFallBackKorean; } - else if( aLocale.Language.equalsAscii( "cs" ) || - aLocale.Language.equalsAscii( "hu" ) || - aLocale.Language.equalsAscii( "pl" ) || - aLocale.Language.equalsAscii( "ro" ) || - aLocale.Language.equalsAscii( "rm" ) || - aLocale.Language.equalsAscii( "hr" ) || - aLocale.Language.equalsAscii( "sk" ) || - aLocale.Language.equalsAscii( "sl" ) || - aLocale.Language.equalsAscii( "sb" ) ) + else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cs" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hu" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "pl" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ro" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "rm" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "hr" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sk" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sl" ) ) || + aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "sb" ) ) ) { return aFallbackLatin2; } - else if( aLocale.Language.equalsAscii( "zh" ) ) + else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "zh" ) ) ) { - if( ! aLocale.Country.equalsAscii( "cn" ) ) + if( ! aLocale.Country.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "cn" ) ) ) return aFallBackChineseTRD; else return aFallBackChineseSIM; } - else if( aLocale.Language.equalsAscii( "ja" ) ) + else if( aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ja" ) ) ) { return aFallBackJapanese; } @@ -1216,7 +1216,7 @@ const FontNameAttr* FontSubstConfiguration::getSubstInfo( const String& rFontNam aLocale.Variant = OUString(); else if( aLocale.Country.getLength() ) aLocale.Country = OUString(); - else if( ! aLocale.Language.equalsAscii( "en" ) ) + else if( ! aLocale.Language.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "en" ) ) ) aLocale.Language = OUString( RTL_CONSTASCII_USTRINGPARAM( "en" ) ); else aLocale.Language = OUString(); diff --git a/vcl/aqua/source/gdi/salprn.cxx b/vcl/aqua/source/gdi/salprn.cxx index 28d554ba9054..f04664e0a719 100644 --- a/vcl/aqua/source/gdi/salprn.cxx +++ b/vcl/aqua/source/gdi/salprn.cxx @@ -500,7 +500,7 @@ static Size getPageSize( vcl::PrinterController& i_rController, sal_Int32 i_nPag Sequence< PropertyValue > aPageParms( i_rController.getPageParameters( i_nPage ) ); for( sal_Int32 nProperty = 0, nPropertyCount = aPageParms.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( aPageParms[ nProperty ].Name.equalsAscii( "PageSize" ) ) + if( aPageParms[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageSize" ) ) ) { awt::Size aSize; aPageParms[ nProperty].Value >>= aSize; diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index f29c7c87ac96..fd3158f1172c 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -118,7 +118,7 @@ void ImplInitSVData() { rtl::OUString aArg; osl_getCommandArg( i, &aArg.pData ); - if( aArg.equalsAscii( "-enableautomation" ) ) + if( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-enableautomation" ) ) ) { pImplSVData->mbIsTestTool = true; break; @@ -263,7 +263,7 @@ com::sun::star::uno::Any AccessBridgeCurrentContext::getValueByName( const rtl:: throw (com::sun::star::uno::RuntimeException) { com::sun::star::uno::Any ret; - if( Name.equalsAscii( "java-vm.interaction-handler" ) ) + if( Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "java-vm.interaction-handler" ) ) ) { // Currently, for accessbility no interaction handler shall be offered. // There may be introduced later on a handler using native toolkits diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index b740e71ea4a6..80bbbd1415cb 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -11673,7 +11673,7 @@ void PDFWriterImpl::ensureUniqueRadioOnValues() int nKidIndex = rGroupWidget.m_aKidsIndex[nKid]; PDFWidget& rKid = m_aWidgets[nKidIndex]; rKid.m_aOnValue = OUString::valueOf( sal_Int32(nKid+1) ); - if( ! rKid.m_aValue.equalsAscii( "Off" ) ) + if( ! rKid.m_aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Off" ) ) ) rKid.m_aValue = rKid.m_aOnValue; } } @@ -11700,7 +11700,7 @@ void PDFWriterImpl::ensureUniqueRadioOnValues() #endif } // update selected radio button - if( ! rKid.m_aValue.equalsAscii( "Off" ) ) + if( ! rKid.m_aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Off" ) ) ) { rGroupWidget.m_aValue = rKid.m_aValue; } diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index 30f098a746dd..6cacfe51aed2 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -149,11 +149,11 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, sal_Int32 i = 0; for ( i = 0; i < pFilterData->getLength(); i++ ) { - if ( (*pFilterData)[ i ].Name.equalsAscii( "Compression" ) ) + if ( (*pFilterData)[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Compression" ) ) ) (*pFilterData)[ i ].Value >>= mnCompLevel; - else if ( (*pFilterData)[ i ].Name.equalsAscii( "Interlaced" ) ) + else if ( (*pFilterData)[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Interlaced" ) ) ) (*pFilterData)[ i ].Value >>= mnInterlaced; - else if ( (*pFilterData)[ i ].Name.equalsAscii( "MaxChunkSize" ) ) + else if ( (*pFilterData)[ i ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MaxChunkSize" ) ) ) { sal_Int32 nVal = 0; if ( (*pFilterData)[ i ].Value >>= nVal ) diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index be7b72ec3213..494dffdf372f 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -774,21 +774,21 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons sal_Int32 nPaperBin = mnDefaultPaperBin; for( sal_Int32 nProperty = 0, nPropertyCount = i_rProps.getLength(); nProperty < nPropertyCount; ++nProperty ) { - if( i_rProps[ nProperty ].Name.equalsAscii( "PreferredPageSize" ) ) + if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PreferredPageSize" ) ) ) { i_rProps[ nProperty ].Value >>= aSetSize; } - else if( i_rProps[ nProperty ].Name.equalsAscii( "PageSize" ) ) + else if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageSize" ) ) ) { i_rProps[ nProperty ].Value >>= aIsSize; } - else if( i_rProps[ nProperty ].Name.equalsAscii( "PageIncludesNonprintableArea" ) ) + else if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PageIncludesNonprintableArea" ) ) ) { sal_Bool bVal = sal_False; i_rProps[ nProperty ].Value >>= bVal; aPageSize.bFullPaper = static_cast<bool>(bVal); } - else if( i_rProps[ nProperty ].Name.equalsAscii( "PrinterPaperTray" ) ) + else if( i_rProps[ nProperty ].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrinterPaperTray" ) ) ) { sal_Int32 nBin = -1; i_rProps[ nProperty ].Value >>= nBin; @@ -1342,7 +1342,7 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ for( int n = 0; n < aOptProp.getLength(); n++ ) { const beans::PropertyValue& rEntry( aOptProp[ n ] ); - if( rEntry.Name.equalsAscii( "Property" ) ) + if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Property" ) ) ) { PropertyValue aVal; rEntry.Value >>= aVal; @@ -1352,17 +1352,17 @@ void PrinterController::setUIOptions( const Sequence< beans::PropertyValue >& i_ aPropName = aVal.Name; bHaveProperty = true; } - else if( rEntry.Name.equalsAscii( "Enabled" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enabled" ) ) ) { sal_Bool bValue = sal_True; rEntry.Value >>= bValue; bIsEnabled = bValue; } - else if( rEntry.Name.equalsAscii( "DependsOnName" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnName" ) ) ) { rEntry.Value >>= aDep.maDependsOnName; } - else if( rEntry.Name.equalsAscii( "DependsOnEntry" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnEntry" ) ) ) { rEntry.Value >>= aDep.mnDependsOnEntry; } diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 887ca0ea8600..0cb19c5fa06c 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1111,55 +1111,55 @@ void PrintDialog::setupOptionalUI() for( int n = 0; n < aOptProp.getLength(); n++ ) { const beans::PropertyValue& rEntry( aOptProp[ n ] ); - if( rEntry.Name.equalsAscii( "Text" ) ) + if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Text" ) ) ) { rEntry.Value >>= aText; } - else if( rEntry.Name.equalsAscii( "ControlType" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ControlType" ) ) ) { rEntry.Value >>= aCtrlType; } - else if( rEntry.Name.equalsAscii( "Choices" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Choices" ) ) ) { rEntry.Value >>= aChoices; } - else if( rEntry.Name.equalsAscii( "Property" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Property" ) ) ) { PropertyValue aVal; rEntry.Value >>= aVal; aPropertyName = aVal.Name; } - else if( rEntry.Name.equalsAscii( "Enabled" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Enabled" ) ) ) { sal_Bool bValue = sal_True; rEntry.Value >>= bValue; bEnabled = bValue; } - else if( rEntry.Name.equalsAscii( "GroupingHint" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GroupingHint" ) ) ) { rEntry.Value >>= aGroupingHint; } - else if( rEntry.Name.equalsAscii( "DependsOnName" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnName" ) ) ) { rEntry.Value >>= aDependsOnName; } - else if( rEntry.Name.equalsAscii( "DependsOnEntry" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "DependsOnEntry" ) ) ) { rEntry.Value >>= nDependsOnValue; } - else if( rEntry.Name.equalsAscii( "AttachToDependency" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "AttachToDependency" ) ) ) { rEntry.Value >>= bUseDependencyRow; } - else if( rEntry.Name.equalsAscii( "MinValue" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MinValue" ) ) ) { rEntry.Value >>= nMinValue; } - else if( rEntry.Name.equalsAscii( "MaxValue" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "MaxValue" ) ) ) { rEntry.Value >>= nMaxValue; } - else if( rEntry.Name.equalsAscii( "HelpText" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HelpText" ) ) ) { if( ! (rEntry.Value >>= aHelpTexts) ) { @@ -1171,7 +1171,7 @@ void PrintDialog::setupOptionalUI() } } } - else if( rEntry.Name.equalsAscii( "HintNoLayoutPage" ) ) + else if( rEntry.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "HintNoLayoutPage" ) ) ) { sal_Bool bNoLayoutPage = sal_False; rEntry.Value >>= bNoLayoutPage; @@ -1186,7 +1186,7 @@ void PrintDialog::setupOptionalUI() bool bSwitchPage = false; if( aGroupingHint.getLength() ) bSwitchPage = true; - else if( aCtrlType.equalsAscii( "Subgroup" ) || (bOnStaticPage && ! bSubgroupOnStaticPage ) ) + else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Subgroup" ) ) || (bOnStaticPage && ! bSubgroupOnStaticPage ) ) bSwitchPage = true; if( bSwitchPage ) { @@ -1196,25 +1196,25 @@ void PrintDialog::setupOptionalUI() bOnStaticPage = false; bSubgroupOnStaticPage = false; - if( aGroupingHint.equalsAscii( "PrintRange" ) ) + if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) ) { pCurColumn = maJobPage.mxPrintRange.get(); pCurParent = &maJobPage; // set job page as current parent bOnStaticPage = true; } - else if( aGroupingHint.equalsAscii( "OptionsPage" ) ) + else if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OptionsPage" ) ) ) { pCurColumn = &maOptionsPage.maLayout; pCurParent = &maOptionsPage; // set options page as current parent bOnStaticPage = true; } - else if( aGroupingHint.equalsAscii( "OptionsPageOptGroup" ) ) + else if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OptionsPageOptGroup" ) ) ) { pCurColumn = maOptionsPage.mxOptGroup.get(); pCurParent = &maOptionsPage; // set options page as current parent bOnStaticPage = true; } - else if( aGroupingHint.equalsAscii( "LayoutPage" ) ) + else if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LayoutPage" ) ) ) { pCurColumn = &maNUpPage.maLayout; pCurParent = &maNUpPage; // set layout page as current parent @@ -1228,7 +1228,7 @@ void PrintDialog::setupOptionalUI() } } - if( aCtrlType.equalsAscii( "Group" ) || + if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Group" ) ) || ( ! pCurParent && ! (bOnStaticPage || aGroupingHint.getLength() ) ) ) { // add new tab page @@ -1254,16 +1254,16 @@ void PrintDialog::setupOptionalUI() bSubgroupOnStaticPage = false; bOnStaticPage = false; } - else if( aCtrlType.equalsAscii( "Subgroup" ) && (pCurParent || aGroupingHint.getLength() ) ) + else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Subgroup" ) ) && (pCurParent || aGroupingHint.getLength() ) ) { bSubgroupOnStaticPage = (aGroupingHint.getLength() != 0); // create group FixedLine - if( ! aGroupingHint.equalsAscii( "PrintRange" ) || + if( ! aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) || ! pCurColumn->countElements() == 0 ) { Window* pNewSub = NULL; - if( aGroupingHint.equalsAscii( "PrintRange" ) ) + if( aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintRange" ) ) ) pNewSub = new FixedText( pCurParent, WB_VCENTER ); else pNewSub = new FixedLine( pCurParent ); @@ -1287,9 +1287,9 @@ void PrintDialog::setupOptionalUI() pIndent->setChild( pCurColumn ); } // EVIL - else if( aCtrlType.equalsAscii( "Bool" ) && - aGroupingHint.equalsAscii( "LayoutPage" ) && - aPropertyName.equalsAscii( "PrintProspect" ) + else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Bool" ) ) && + aGroupingHint.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "LayoutPage" ) ) && + aPropertyName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintProspect" ) ) ) { maNUpPage.maBrochureBtn.SetText( aText ); @@ -1333,7 +1333,7 @@ void PrintDialog::setupOptionalUI() } } } - if( aCtrlType.equalsAscii( "Bool" ) && pCurParent ) + if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Bool" ) ) && pCurParent ) { // add a check box CheckBox* pNewBox = new CheckBox( pCurParent ); @@ -1363,7 +1363,7 @@ void PrintDialog::setupOptionalUI() // add checkbox to current column pDependencyRow->addWindow( pNewBox ); } - else if( aCtrlType.equalsAscii( "Radio" ) && pCurParent ) + else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Radio" ) ) && pCurParent ) { vcl::RowOrColumn* pRadioColumn = pCurColumn; if( aText.getLength() ) @@ -1418,9 +1418,9 @@ void PrintDialog::setupOptionalUI() pLabel->setLabel( pBtn ); } } - else if( ( aCtrlType.equalsAscii( "List" ) || - aCtrlType.equalsAscii( "Range" ) || - aCtrlType.equalsAscii( "Edit" ) + else if( ( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "List" ) ) || + aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Range" ) ) || + aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Edit" ) ) ) && pCurParent ) { // create a row in the current column @@ -1446,7 +1446,7 @@ void PrintDialog::setupOptionalUI() pLabel->setLabel( pHeading ); } - if( aCtrlType.equalsAscii( "List" ) ) + if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "List" ) ) ) { ListBox* pList = new ListBox( pCurParent, WB_DROPDOWN | WB_BORDER ); maControls.push_front( pList ); @@ -1479,7 +1479,7 @@ void PrintDialog::setupOptionalUI() else pFieldColumn->addWindow( pList ); } - else if( aCtrlType.equalsAscii( "Range" ) ) + else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Range" ) ) ) { NumericField* pField = new NumericField( pCurParent, WB_BORDER | WB_SPIN ); maControls.push_front( pField ); @@ -1512,7 +1512,7 @@ void PrintDialog::setupOptionalUI() else pFieldColumn->addWindow( pField ); } - else if( aCtrlType.equalsAscii( "Edit" ) ) + else if( aCtrlType.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Edit" ) ) ) { Edit* pField = new Edit( pCurParent, WB_BORDER ); maControls.push_front( pField ); @@ -2195,7 +2195,7 @@ void PrintDialog::updateWindowFromProperty( const rtl::OUString& i_rProperty ) { pBox->Check( bVal ); } - else if( i_rProperty.equalsAscii( "PrintProspect" ) ) + else if( i_rProperty.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PrintProspect" ) ) ) { // EVIL special case if( bVal ) diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx index 13b8e889d177..24a157723952 100644 --- a/vcl/unx/gtk/app/gtkdata.cxx +++ b/vcl/unx/gtk/app/gtkdata.cxx @@ -608,7 +608,7 @@ void GtkXLib::Init() osl_getCommandArg(i, &aParam.pData ); OString aBParam( OUStringToOString( aParam, aEnc ) ); - if( aParam.equalsAscii( "-display" ) || aParam.equalsAscii( "--display" ) ) + if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) || aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--display" ) ) ) { pCmdLineAry[i+1] = g_strdup( "--display" ); osl_getCommandArg(i+1, &aParam.pData ); diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx index 12b2af378966..881f63db1ffc 100644 --- a/vcl/unx/kde/kdedata.cxx +++ b/vcl/unx/kde/kdedata.cxx @@ -143,7 +143,7 @@ void KDEXLib::Init() for ( nIdx = 0; nIdx < nParams; ++nIdx ) { osl_getCommandArg( nIdx, &aParam.pData ); - if ( !m_pFreeCmdLineArgs && aParam.equalsAscii( "-display" ) && nIdx + 1 < nParams ) + if ( !m_pFreeCmdLineArgs && aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) && nIdx + 1 < nParams ) { osl_getCommandArg( nIdx + 1, &aParam.pData ); aDisplay = rtl::OUStringToOString( aParam, osl_getThreadTextEncoding() ); diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx index cc168a2fe3be..5c7d2a7cf58a 100644 --- a/vcl/unx/kde4/KDEXLib.cxx +++ b/vcl/unx/kde4/KDEXLib.cxx @@ -139,7 +139,7 @@ void KDEXLib::Init() for ( nIdx = 0; nIdx < nParams; ++nIdx ) { osl_getCommandArg( nIdx, &aParam.pData ); - if ( !m_pFreeCmdLineArgs && aParam.equalsAscii( "-display" ) && nIdx + 1 < nParams ) + if ( !m_pFreeCmdLineArgs && aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) && nIdx + 1 < nParams ) { osl_getCommandArg( nIdx + 1, &aParam.pData ); aDisplay = rtl::OUStringToOString( aParam, osl_getThreadTextEncoding() ); diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx index 2d27ec497ec9..7adfdefbf3b7 100644 --- a/vcl/unx/source/app/saldata.cxx +++ b/vcl/unx/source/app/saldata.cxx @@ -407,7 +407,7 @@ void SalXLib::Init() for (USHORT i=0; i<nParams; i++) { osl_getCommandArg(i, &aParam.pData); - if (aParam.equalsAscii("-display")) + if (aParam.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("-display"))) { osl_getCommandArg(i+1, &aParam.pData); aDisplay = rtl::OUStringToOString( diff --git a/vcl/unx/source/desktopdetect/desktopdetector.cxx b/vcl/unx/source/desktopdetect/desktopdetector.cxx index 3d2fb95866fc..268b225160be 100644 --- a/vcl/unx/source/desktopdetect/desktopdetector.cxx +++ b/vcl/unx/source/desktopdetect/desktopdetector.cxx @@ -293,12 +293,12 @@ VCL_DLLPUBLIC rtl::OUString get_desktop_environment() for( int i = 0; i < nParams; i++ ) { osl_getCommandArg( i, &aParam.pData ); - if( aParam.equalsAscii( "-headless" ) ) + if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-headless" ) ) ) { pDisplayStr = NULL; break; } - if( i < nParams-1 && (aParam.equalsAscii( "-display" ) || aParam.equalsAscii( "--display" )) ) + if( i < nParams-1 && (aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-display" ) ) || aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--display" ) )) ) { osl_getCommandArg( i+1, &aParam.pData ); aBParm = OUStringToOString( aParam, osl_getThreadTextEncoding() ); diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx index ad8d198f7598..9578f5be6fed 100644 --- a/vcl/unx/source/fontmanager/fontmanager.cxx +++ b/vcl/unx/source/fontmanager/fontmanager.cxx @@ -3966,53 +3966,53 @@ bool PrintFontManager::readOverrideMetrics() const NamedValue* pProps = aMetrics.getConstArray(); for( sal_Int32 n = 0; n < nProps; n++ ) { - if( pProps[n].Name.equalsAscii( "FamilyName" ) ) + if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FamilyName" ) ) ) pFont->m_nFamilyName = m_pAtoms->getAtom( ATOM_FAMILYNAME, getString(pProps[n].Value), sal_True ); - else if( pProps[n].Name.equalsAscii( "PSName" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "PSName" ) ) ) pFont->m_nPSName = m_pAtoms->getAtom( ATOM_PSNAME, getString(pProps[n].Value), sal_True ); - else if( pProps[n].Name.equalsAscii( "StyleName" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "StyleName" ) ) ) pFont->m_aStyleName = getString(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Italic" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Italic" ) ) ) pFont->m_eItalic = static_cast<italic::type>(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Width" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Width" ) ) ) pFont->m_eWidth = static_cast<width::type>(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Weight" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Weight" ) ) ) pFont->m_eWeight = static_cast<weight::type>(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Pitch" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Pitch" ) ) ) pFont->m_ePitch = static_cast<pitch::type>(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "Encoding" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Encoding" ) ) ) pFont->m_aEncoding = static_cast<rtl_TextEncoding>(getInt(pProps[n].Value)); - else if( pProps[n].Name.equalsAscii( "FontEncodingOnly" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FontEncodingOnly" ) ) ) pFont->m_bFontEncodingOnly = getBool(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricXWidth" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricXWidth" ) ) ) pFont->m_aGlobalMetricX.width = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricXHeight" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricXHeight" ) ) ) pFont->m_aGlobalMetricX.height = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricYWidth" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricYWidth" ) ) ) pFont->m_aGlobalMetricY.width = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "GlobalMetricYHeight" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "GlobalMetricYHeight" ) ) ) pFont->m_aGlobalMetricY.height = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Ascend" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Ascend" ) ) ) pFont->m_nAscend = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Descend" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Descend" ) ) ) pFont->m_nDescend = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "Leading" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Leading" ) ) ) pFont->m_nLeading = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "XMin" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XMin" ) ) ) pFont->m_nXMin = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "YMin" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "YMin" ) ) ) pFont->m_nYMin = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "XMax" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XMax" ) ) ) pFont->m_nXMax = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "YMax" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "YMax" ) ) ) pFont->m_nYMax = getInt(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "VerticalSubstitutes" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "VerticalSubstitutes" ) ) ) pFont->m_bHaveVerticalSubstitutedGlyphs = getBool(pProps[n].Value); - else if( pProps[n].Name.equalsAscii( "EncodingVector" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "EncodingVector" ) ) ) { Sequence< NamedValue > aEncoding; pProps[n].Value >>= aEncoding; @@ -4025,7 +4025,7 @@ bool PrintFontManager::readOverrideMetrics() pFont->m_aEncodingVector[ cCode ] = nGlyph; } } - else if( pProps[n].Name.equalsAscii( "NonEncoded" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "NonEncoded" ) ) ) { Sequence< NamedValue > aEncoding; pProps[n].Value >>= aEncoding; @@ -4038,7 +4038,7 @@ bool PrintFontManager::readOverrideMetrics() pFont->m_aNonEncoded[ cCode ] = OUStringToOString(aGlyphName,RTL_TEXTENCODING_ASCII_US); } } - else if( pProps[n].Name.equalsAscii( "CharacterMetrics" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "CharacterMetrics" ) ) ) { // fill pFont->m_pMetrics->m_aMetrics // expect triples of int: int -> CharacterMetric.{ width, height } @@ -4052,7 +4052,7 @@ bool PrintFontManager::readOverrideMetrics() pFont->m_pMetrics->m_aMetrics[ pInts[m] ].height = static_cast<short int>(pInts[m+2]); } } - else if( pProps[n].Name.equalsAscii( "XKernPairs" ) ) + else if( pProps[n].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "XKernPairs" ) ) ) { // fill pFont->m_pMetrics->m_aXKernPairs // expection name: <unicode1><unicode2> value: ((height << 16)| width) diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index fb1709b98765..0d38ff519987 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -923,8 +923,8 @@ int GrindApp::Main() { ::rtl::OUString aParam = GetCommandLineParam( i ); - if( aParam.equalsAscii( "--help" ) || - aParam.equalsAscii( "-h" ) ) + if( aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "--help" ) ) || + aParam.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ) ) ) bHelp = true; } |