From d6bc02f8c4cd0f50f0a2631ac7634dab408efc1f Mon Sep 17 00:00:00 2001 From: Szabolcs Dezsi Date: Fri, 6 Apr 2012 19:49:53 +0200 Subject: Replaced equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(...)) with == operator --- cui/source/customize/cfg.cxx | 4 +--- cui/source/customize/cfgutil.cxx | 4 +--- cui/source/customize/selector.cxx | 8 +++----- cui/source/dialogs/about.cxx | 5 +---- cui/source/dialogs/hldocntp.cxx | 8 ++++---- cui/source/dialogs/scriptdlg.cxx | 4 +--- cui/source/tabpages/macroass.cxx | 2 +- 7 files changed, 12 insertions(+), 23 deletions(-) (limited to 'cui') diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index cf277504688b..5624c734d2b9 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -404,9 +404,7 @@ SvxConfigPage::CanConfig( const OUString& aModuleId ) { OSL_TRACE("SupportsDocumentConfig: %s", PRTSTR(aModuleId)); - if ( aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.script.BasicIDE" ) ) - || aModuleId.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.frame.Bibliography" ) ) - ) + if ( aModuleId == "com.sun.star.script.BasicIDE" || aModuleId == "com.sun.star.frame.Bibliography" ) { return sal_False; } diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx index 02055ae59142..f626d9e6992b 100644 --- a/cui/source/customize/cfgutil.cxx +++ b/cui/source/customize/cfgutil.cxx @@ -801,9 +801,7 @@ Image SfxConfigGroupListBox_Impl::GetImage( moduleDescr.getConstArray(); for ( sal_Int32 pos = moduleDescr.getLength(); pos--; ) { - if (pmoduleDescr[ pos ].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "ooSetupFactoryEmptyDocumentURL") )) + if ( pmoduleDescr[ pos ].Name == "ooSetupFactoryEmptyDocumentURL" ) { pmoduleDescr[ pos ].Value >>= factoryURL; OSL_TRACE("factory url for doc images is %s", diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx index de928ddc37d1..6343692a850c 100644 --- a/cui/source/customize/selector.cxx +++ b/cui/source/customize/selector.cxx @@ -315,7 +315,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows Sequence< Reference< browse::XBrowseNode > > children = _rxRootNode->getChildNodes(); - sal_Bool bIsRootNode = _rxRootNode->getName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Root")); + sal_Bool bIsRootNode = _rxRootNode->getName() == "Root"; /* To mimic current starbasic behaviour we need to make sure that only the current document @@ -586,7 +586,7 @@ Image SvxConfigGroupListBox_Impl::GetImage( Image aImage; if ( bIsRootNode ) { - if ( node->getName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "user" ) ) || node->getName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "share" ) ) ) + if ( node->getName() == "user" || node->getName() == "share" ) { aImage = m_hdImage; } @@ -619,9 +619,7 @@ Image SvxConfigGroupListBox_Impl::GetImage( moduleDescr.getConstArray(); for ( sal_Int32 pos = moduleDescr.getLength(); pos--; ) { - if (pmoduleDescr[ pos ].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "ooSetupFactoryEmptyDocumentURL") )) + if ( pmoduleDescr[ pos ].Name == "ooSetupFactoryEmptyDocumentURL" ) { pmoduleDescr[ pos ].Value >>= factoryURL; break; diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index f0bfdef0aaab..3ee3e8fad261 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -169,10 +169,7 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId) : rtl::OUStringBuffer sText(m_aVendorTextStr); sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n")); - sal_uInt32 nCopyrightId = - utl::ConfigManager::getProductName().equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("LibreOffice")) - ? ABOUT_STR_COPYRIGHT : ABOUT_STR_COPYRIGHT_DERIVED; + sal_uInt32 nCopyrightId = utl::ConfigManager::getProductName() == "LibreOffice" ? ABOUT_STR_COPYRIGHT : ABOUT_STR_COPYRIGHT_DERIVED; String aProductCopyrightTextStr(ResId(nCopyrightId, *rId.GetResMgr())); sText.append(aProductCopyrightTextStr); sText.appendAscii(RTL_CONSTASCII_STRINGPARAM("\n\n")); diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index 3531a203b230..0e3af3134610 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -197,15 +197,15 @@ void SvxHyperlinkNewDocTp::FillDocumentList () rDynamicMenuEntry[e].Value >>= aTargetName; } //#i96822# business cards, labels and database should not be inserted here - if( aDocumentUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "private:factory/swriter?slot=21051" ) ) || - aDocumentUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "private:factory/swriter?slot=21052" )) || - aDocumentUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( "private:factory/sdatabase?Interactive" ))) + if( aDocumentUrl == "private:factory/swriter?slot=21051" || + aDocumentUrl == "private:factory/swriter?slot=21052" || + aDocumentUrl == "private:factory/sdatabase?Interactive" ) continue; // Insert into listbox if ( !aDocumentUrl.isEmpty() ) { - if ( aDocumentUrl.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "private:factory/simpress?slot=6686" ) ) ) // SJ: #106216# do not start + if ( aDocumentUrl == "private:factory/simpress?slot=6686" ) // SJ: #106216# do not start aDocumentUrl = String( RTL_CONSTASCII_USTRINGPARAM( "private:factory/simpress" ) ); // the AutoPilot for impress // insert private-url and default-extension as user-data diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx index 09709513a5af..30be39a6782e 100644 --- a/cui/source/dialogs/scriptdlg.cxx +++ b/cui/source/dialogs/scriptdlg.cxx @@ -243,9 +243,7 @@ void SFTreeListBox::Init( const ::rtl::OUString& language ) moduleDescr.getConstArray(); for ( sal_Int32 pos = moduleDescr.getLength(); pos--; ) { - if (pmoduleDescr[ pos ].Name.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( - "ooSetupFactoryEmptyDocumentURL") )) + if ( pmoduleDescr[ pos ].Name == "ooSetupFactoryEmptyDocumentURL" ) { pmoduleDescr[ pos ].Value >>= factoryURL; break; diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 62f38c2eafab..ef344864afef 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -131,7 +131,7 @@ String ConvertToUIName_Impl( SvxMacro *pMacro ) { String aName( pMacro->GetMacName() ); String aEntry; - if ( ! pMacro->GetLanguage().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("JavaScript")) ) + if ( pMacro->GetLanguage() != "JavaScript" ) { sal_uInt16 nCount = comphelper::string::getTokenCount(aName, '.'); aEntry = aName.GetToken( nCount-1, '.' ); -- cgit v1.2.3