From 410bc1e5a466531cfe052f7c25f50f97262d80c1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 17 Jan 2011 11:11:14 +0000 Subject: equalsAsciiL faster than equalsAscii --- framework/source/uiconfiguration/moduleuicfgsupplier.cxx | 2 +- framework/source/uiconfiguration/windowstateconfiguration.cxx | 2 +- framework/source/uifactory/menubarfactory.cxx | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'framework') diff --git a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx index db799fd39a..1043a26510 100644 --- a/framework/source/uiconfiguration/moduleuicfgsupplier.cxx +++ b/framework/source/uiconfiguration/moduleuicfgsupplier.cxx @@ -211,7 +211,7 @@ throw ( NoSuchElementException, RuntimeException) xCont->getByName(ModuleIdentifier) >>= lProps; for (sal_Int32 i=0; i>= sShort; break; diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index b2429d5619..e4f2de761c 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -1393,7 +1393,7 @@ WindowStateConfiguration::WindowStateConfiguration( const Reference< XMultiServi ::rtl::OUString aWindowStateFileStr; for ( sal_Int32 y = 0; y < aSeq.getLength(); y++ ) { - if ( aSeq[y].Name.equalsAscii("ooSetupFactoryWindowStateConfigRef") ) + if ( aSeq[y].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ooSetupFactoryWindowStateConfigRef")) ) { aSeq[y].Value >>= aWindowStateFileStr; break; diff --git a/framework/source/uifactory/menubarfactory.cxx b/framework/source/uifactory/menubarfactory.cxx index ce062788de..4ae733e4e1 100644 --- a/framework/source/uifactory/menubarfactory.cxx +++ b/framework/source/uifactory/menubarfactory.cxx @@ -133,17 +133,17 @@ void MenuBarFactory::CreateUIElement(const ::rtl::OUString& ResourceURL for ( sal_Int32 n = 0; n < Args.getLength(); n++ ) { - if ( Args[n].Name.equalsAscii( "ConfigurationSource" )) + if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ConfigurationSource")) ) Args[n].Value >>= xConfigSource; - else if ( Args[n].Name.equalsAscii( "Frame" )) + else if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")) ) Args[n].Value >>= xFrame; - else if ( Args[n].Name.equalsAscii( "ResourceURL" )) + else if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ResourceURL")) ) Args[n].Value >>= aResourceURL; - else if ( Args[n].Name.equalsAscii( "Persistent" )) + else if ( Args[n].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Persistent")) ) Args[n].Value >>= bPersistent; else if ( _pExtraMode && Args[n].Name.equalsAscii( _pExtraMode )) Args[n].Value >>= bExtraMode; - } // for ( sal_Int32 n = 0; n < Args.getLength(); n++ ) + } if ( aResourceURL.indexOf( rtl::OUString::createFromAscii(_pAsciiName)) != 0 ) throw IllegalArgumentException(); -- cgit v1.2.3