diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-01-16 15:35:13 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-01-16 15:35:13 +0000 |
commit | 7298f8b028fab384f39e9b91115e7c9ccaca2eb7 (patch) | |
tree | fe6b98558d319b6c4b3a8acf6a22a581ce668c87 /basic | |
parent | 9f444f51049c06b400af00df73004facb7ea6d32 (diff) |
equalsAsciiL faster than equals
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/uno/namecont.cxx | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx index 88d3b6b00f5d..ae1634d4fb59 100644 --- a/basic/source/uno/namecont.cxx +++ b/basic/source/uno/namecont.cxx @@ -3118,8 +3118,8 @@ void SAL_CALL SfxLibrary::removeContainerListener( const Reference< XContainerLi //============================================================================ // Implementation class ScriptExtensionIterator -static rtl::OUString aBasicLibMediaType(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.basic-library")); -static rtl::OUString aDialogLibMediaType(RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.dialog-library")); +#define sBasicLibMediaType "application/vnd.sun.star.basic-library" +#define sDialogLibMediaType "application/vnd.sun.star.dialog-library" ScriptExtensionIterator::ScriptExtensionIterator( void ) : m_eState( USER_EXTENSIONS ) @@ -3270,11 +3270,11 @@ Reference< deployment::XPackage > ScriptSubPackageIterator::implDetectScriptPack { const Reference< deployment::XPackageTypeInfo > xPackageTypeInfo = xPackage->getPackageType(); rtl::OUString aMediaType = xPackageTypeInfo->getMediaType(); - if( aMediaType.equals( aBasicLibMediaType ) ) + if( aMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBasicLibMediaType)) ) { xScriptPackage = xPackage; } - else if( aMediaType.equals( aDialogLibMediaType ) ) + else if( aMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDialogLibMediaType)) ) { rbPureDialogLib = true; xScriptPackage = xPackage; @@ -3316,12 +3316,12 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetScriptPackageF const Reference< deployment::XPackage > xSubPkg = pSeq[ iPkg ]; const Reference< deployment::XPackageTypeInfo > xPackageTypeInfo = xSubPkg->getPackageType(); rtl::OUString aMediaType = xPackageTypeInfo->getMediaType(); - if( aMediaType.equals( aBasicLibMediaType ) ) + if( aMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBasicLibMediaType)) ) { xScriptPackage = xSubPkg; break; } - else if( aMediaType.equals( aDialogLibMediaType ) ) + else if( aMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDialogLibMediaType)) ) { rbPureDialogLib = true; xScriptPackage = xSubPkg; @@ -3333,11 +3333,11 @@ Reference< deployment::XPackage > ScriptExtensionIterator::implGetScriptPackageF { const Reference< deployment::XPackageTypeInfo > xPackageTypeInfo = xPackage->getPackageType(); rtl::OUString aMediaType = xPackageTypeInfo->getMediaType(); - if( aMediaType.equals( aBasicLibMediaType ) ) + if( aMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBasicLibMediaType)) ) { xScriptPackage = xPackage; } - else if( aMediaType.equals( aDialogLibMediaType ) ) + else if( aMediaType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sDialogLibMediaType)) ) { rbPureDialogLib = true; xScriptPackage = xPackage; |