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 --- basic/source/basmgr/basmgr.cxx | 2 +- basic/source/uno/namecont.cxx | 4 ++-- basic/source/uno/scriptcont.cxx | 12 ++++-------- 3 files changed, 7 insertions(+), 11 deletions(-) (limited to 'basic') diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx index 2395296b3e92..81e006bec1ff 100644 --- a/basic/source/basmgr/basmgr.cxx +++ b/basic/source/basmgr/basmgr.cxx @@ -758,7 +758,7 @@ void BasicManager::SetLibraryContainerInfo( const LibraryContainerInfo& rInfo ) { Any aLibAny = xScriptCont->getByName( *pScriptLibName ); - if ( pScriptLibName->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Standard")) ) + if ( *pScriptLibName == "Standard" ) xScriptCont->loadLibrary( *pScriptLibName ); BasMgrContainerListenerImpl::insertLibraryImpl diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 9bb8782cd016..18bf9739440e 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -1220,7 +1220,7 @@ void SfxLibraryContainer::implScanExtensions( void ) bool bPureDialogLib = false; while ( !(aLibURL = aScriptIt.nextBasicOrDialogLibrary( bPureDialogLib )).isEmpty()) { - if( bPureDialogLib && maInfoFileName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "script" ) ) ) + if( bPureDialogLib && maInfoFileName == "script" ) continue; // Extract lib name @@ -1771,7 +1771,7 @@ void SfxLibraryContainer::storeLibraries_Impl( const uno::Reference< embed::XSto if ( bStorage ) { // Don't write if only empty standard lib exists - if ( ( nNameCount == 1 ) && ( aNames[0].equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) ) ) + if ( ( nNameCount == 1 ) && ( aNames[0] == "Standard" ) ) { Any aLibAny = maNameContainer.getByName( aNames[0] ); Reference< XNameAccess > xNameAccess; diff --git a/basic/source/uno/scriptcont.cxx b/basic/source/uno/scriptcont.cxx index 9dd01a129b85..fff3a33d1001 100644 --- a/basic/source/uno/scriptcont.cxx +++ b/basic/source/uno/scriptcont.cxx @@ -326,24 +326,20 @@ Any SAL_CALL SfxScriptLibraryContainer::importLibraryElement script::ModuleInfo aModInfo; aModInfo.ModuleType = ModuleType::UNKNOWN; - if( aMod.aModuleType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("normal") )) + if( aMod.aModuleType == "normal" ) { aModInfo.ModuleType = ModuleType::NORMAL; } - else if( aMod.aModuleType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("class") )) + else if( aMod.aModuleType == "class" ) { aModInfo.ModuleType = ModuleType::CLASS; } - else if( aMod.aModuleType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("form") )) + else if( aMod.aModuleType == "form" ) { aModInfo.ModuleType = ModuleType::FORM; aModInfo.ModuleObject = mxOwnerDocument; } - else if( aMod.aModuleType.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM("document") )) + else if( aMod.aModuleType == "document" ) { aModInfo.ModuleType = ModuleType::DOCUMENT; -- cgit