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 /sc/source/ui/unoobj/dispuno.cxx | |
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 'sc/source/ui/unoobj/dispuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/dispuno.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index 4f125516222c..6ee045a55c9c 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -107,8 +107,8 @@ uno::Reference<frame::XDispatch> SAL_CALL ScDispatchProviderInterceptor::queryDi uno::Reference<frame::XDispatch> xResult; // create some dispatch ... if ( pViewShell && ( - !aURL.Complete.compareToAscii(cURLInsertColumns) || - !aURL.Complete.compareToAscii(cURLDocDataSource) ) ) + aURL.Complete.equalsAscii(cURLInsertColumns) || + aURL.Complete.equalsAscii(cURLDocDataSource) ) ) { if (!m_xMyDispatch.is()) m_xMyDispatch = new ScDispatch( pViewShell ); @@ -233,7 +233,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL, SolarMutexGuard aGuard; sal_Bool bDone = false; - if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) ) + if ( pViewShell && aURL.Complete.equalsAscii(cURLInsertColumns) ) { ScViewData* pViewData = pViewShell->GetViewData(); ScAddress aPos( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() ); @@ -290,7 +290,7 @@ void SAL_CALL ScDispatch::addStatusListener( aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.FeatureURL = aURL; - if ( !aURL.Complete.compareToAscii(cURLDocDataSource) ) + if ( aURL.Complete.equalsAscii(cURLDocDataSource) ) { uno::Reference<frame::XStatusListener>* pObj = new uno::Reference<frame::XStatusListener>( xListener ); @@ -321,7 +321,7 @@ void SAL_CALL ScDispatch::removeStatusListener( { SolarMutexGuard aGuard; - if ( !aURL.Complete.compareToAscii(cURLDocDataSource) ) + if ( aURL.Complete.equalsAscii(cURLDocDataSource) ) { sal_uInt16 nCount = aDataSourceListeners.size(); for ( sal_uInt16 n=nCount; n--; ) |