diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 11:32:52 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:12 +0200 |
commit | ef90021abe3735fba57145598fd7c3d359d2718e (patch) | |
tree | 9da3ef32700774f56e0225ea28f3bc4ceaffe80c /extensions | |
parent | 0a9ef5a18e148c7a5c9a088e153a7873d1564841 (diff) |
convert OUString !compareToAscii to equalsAscii
Convert code like
if( ! aStr.compareToAscii("XXX") )
to
if( aStr.equalsAscii("XXX") )
which is both clearer and faster.
Change-Id: I267511bccab52f5225b291acbfa4e388b5a5302b
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/bibliography/bibload.cxx | 2 | ||||
-rw-r--r-- | extensions/source/plugin/base/xplugin.cxx | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/extensions/source/bibliography/bibload.cxx b/extensions/source/bibliography/bibload.cxx index 590ee389de63..94e5e0ad92cc 100644 --- a/extensions/source/bibliography/bibload.cxx +++ b/extensions/source/bibliography/bibload.cxx @@ -196,7 +196,7 @@ extern "C" const sal_Char * pImplName, XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; - if (!BibliographyLoader::getImplementationName_Static().compareToAscii( pImplName ) ) + if (BibliographyLoader::getImplementationName_Static().equalsAscii( pImplName ) ) { // create the factory Reference< XSingleServiceFactory > xFactory = diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx index 1f9fd137ff02..18e62a59d235 100644 --- a/extensions/source/plugin/base/xplugin.cxx +++ b/extensions/source/plugin/base/xplugin.cxx @@ -311,7 +311,7 @@ void XPlugin_Impl::handleSpecialArgs() { // special handling for real audio which needs a lot of parameters // or won't function at all - if( ! m_aDescription.Mimetype.compareToAscii( "audio/x-pn-realaudio-plugin" ) && m_nArgs < 1 ) + if( m_aDescription.Mimetype.equalsAscii( "audio/x-pn-realaudio-plugin" ) && m_nArgs < 1 ) { OUString aURL; if( m_xModel.is() ) @@ -355,7 +355,7 @@ void XPlugin_Impl::handleSpecialArgs() } } // #69333# special for pdf - else if( ! m_aDescription.Mimetype.compareToAscii( "application/pdf" ) ) + else if( m_aDescription.Mimetype.equalsAscii( "application/pdf" ) ) m_aPluginMode = PluginMode::FULL; // see if we have a TYPE tag @@ -839,7 +839,7 @@ void XPlugin_Impl::propertyChange( const com::sun::star::beans::PropertyChangeEv { Guard< Mutex > aGuard( m_aMutex ); - if( ! rEvent.PropertyName.compareToAscii( "URL" ) ) + if( rEvent.PropertyName.equalsAscii( "URL" ) ) { OUString aStr; rEvent.NewValue >>= aStr; |