summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 14:39:55 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:13 +0200
commitfcd1637d5101b9142e6808edfb77b01122857901 (patch)
tree5fd09f97de80cf2a9481bd55a798015db35f1d0c /svl
parentef90021abe3735fba57145598fd7c3d359d2718e (diff)
convert OUString compareToAscii == 0 to equalsAscii
Convert code like aStr.compareToAscii("XXX") == 0 to aStr.equalsAscii("XXX") which is both easier to read and faster. Change-Id: I448abf58f2fa0e7715dba53f8e8825ca0587c83f
Diffstat (limited to 'svl')
-rw-r--r--svl/source/fsstor/fsfactory.cxx2
-rw-r--r--svl/source/numbers/numfmuno.cxx8
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx4
-rw-r--r--svl/source/uno/pathservice.cxx2
4 files changed, 8 insertions, 8 deletions
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index 8a42548912e7..2cb491be78e4 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -189,7 +189,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL fsstorage_component_getFactory (
if (pServiceManager)
{
uno::Reference< lang::XSingleServiceFactory > xFactory;
- if (FSStorageFactory::impl_staticGetImplementationName().compareToAscii (pImplementationName) == 0)
+ if (FSStorageFactory::impl_staticGetImplementationName().equalsAscii(pImplementationName))
{
xFactory = cppu::createOneInstanceFactory (
reinterpret_cast< lang::XMultiServiceFactory* >(pServiceManager),
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 317abfa7fa17..daa5bfbe3c45 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -384,7 +384,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::getImplementationName()
sal_Bool SAL_CALL SvNumberFormatterServiceObj::supportsService( const OUString& ServiceName )
throw(uno::RuntimeException)
{
- return ( ServiceName.compareToAscii(SERVICENAME_NUMBERFORMATTER) == 0 );
+ return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMATTER);
}
uno::Sequence<OUString> SAL_CALL SvNumberFormatterServiceObj::getSupportedServiceNames()
@@ -676,7 +676,7 @@ OUString SAL_CALL SvNumberFormatsObj::getImplementationName()
sal_Bool SAL_CALL SvNumberFormatsObj::supportsService( const OUString& ServiceName )
throw(uno::RuntimeException)
{
- return ( ServiceName.compareToAscii(SERVICENAME_NUMBERFORMATS) == 0 );
+ return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMATS);
}
uno::Sequence<OUString> SAL_CALL SvNumberFormatsObj::getSupportedServiceNames()
@@ -933,7 +933,7 @@ OUString SAL_CALL SvNumberFormatObj::getImplementationName()
sal_Bool SAL_CALL SvNumberFormatObj::supportsService( const OUString& ServiceName )
throw(uno::RuntimeException)
{
- return ( ServiceName.compareToAscii(SERVICENAME_NUMBERFORMAT) == 0 );
+ return ServiceName.equalsAscii(SERVICENAME_NUMBERFORMAT);
}
uno::Sequence<OUString> SAL_CALL SvNumberFormatObj::getSupportedServiceNames()
@@ -1092,7 +1092,7 @@ OUString SAL_CALL SvNumberFormatSettingsObj::getImplementationName()
sal_Bool SAL_CALL SvNumberFormatSettingsObj::supportsService( const OUString& ServiceName )
throw(uno::RuntimeException)
{
- return ( ServiceName.compareToAscii(SERVICENAME_NUMBERSETTINGS) == 0 );
+ return ServiceName.equalsAscii(SERVICENAME_NUMBERSETTINGS);
}
uno::Sequence<OUString> SAL_CALL SvNumberFormatSettingsObj::getSupportedServiceNames()
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 293ad9fb347c..8d47e2b27079 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -1368,7 +1368,7 @@ OUString SAL_CALL PasswordContainer::getImplementationName( ) throw(uno::Runtim
sal_Bool SAL_CALL PasswordContainer::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
{
- if ( ServiceName.compareToAscii("com.sun.star.task.PasswordContainer") == 0 )
+ if ( ServiceName.equalsAscii("com.sun.star.task.PasswordContainer") )
return sal_True;
else
return sal_False;
@@ -1461,7 +1461,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL passwordcontainer_component_getFactory (
if (pServiceManager)
{
Reference< XSingleServiceFactory > xFactory;
- if (PasswordContainer::impl_getStaticImplementationName().compareToAscii (pImplementationName) == 0)
+ if (PasswordContainer::impl_getStaticImplementationName().equalsAscii(pImplementationName))
{
xFactory = PasswordContainer::impl_createFactory (
reinterpret_cast< XMultiServiceFactory* >(pServiceManager));
diff --git a/svl/source/uno/pathservice.cxx b/svl/source/uno/pathservice.cxx
index 07b57a1257b5..f20611f6e0b6 100644
--- a/svl/source/uno/pathservice.cxx
+++ b/svl/source/uno/pathservice.cxx
@@ -46,7 +46,7 @@ public:
const OUString & rName)
throw(css::uno::RuntimeException)
{
- return (rName.compareToAscii("com.sun.star.config.SpecialConfigManager") == 0);
+ return rName.equalsAscii("com.sun.star.config.SpecialConfigManager");
}
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()