summaryrefslogtreecommitdiff
path: root/desktop
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 /desktop
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 'desktop')
-rw-r--r--desktop/source/app/appinit.cxx2
-rw-r--r--desktop/source/offacc/acceptor.cxx6
2 files changed, 4 insertions, 4 deletions
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 465b266be0e2..065bb3d0caab 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -231,7 +231,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
{
// special case stop all acceptors
AcceptorMap &rMap = acceptorMap::get();
- if (aAcceptString.compareToAscii("all") == 0) {
+ if (aAcceptString.equalsAscii("all")) {
rMap.clear();
} else {
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 194d32e91e09..5d11e0f9cebb 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -230,15 +230,15 @@ Reference<XInterface> AccInstanceProvider::getInstance (const OUString& aName )
Reference<XInterface> rInstance;
- if ( aName.compareToAscii( "StarOffice.ServiceManager" ) == 0)
+ if ( aName.equalsAscii( "StarOffice.ServiceManager" ) )
{
rInstance = Reference< XInterface >( m_rContext->getServiceManager() );
}
- else if(aName.compareToAscii( "StarOffice.ComponentContext" ) == 0 )
+ else if(aName.equalsAscii( "StarOffice.ComponentContext" ) )
{
rInstance = m_rContext;
}
- else if ( aName.compareToAscii("StarOffice.NamingService" ) == 0 )
+ else if ( aName.equalsAscii("StarOffice.NamingService" ) )
{
Reference< XNamingService > rNamingService(
m_rContext->getServiceManager()->createInstanceWithContext("com.sun.star.uno.NamingService", m_rContext),