summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-05 11:06:18 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 12:58:12 +0200
commit0a9ef5a18e148c7a5c9a088e153a7873d1564841 (patch)
tree3c3bc21e7ee4f836a1d056695175e0b1a91eda26 /svx
parent7944301424aac0943e4ecc0410f495b210ad3b79 (diff)
convert OUString 0==compareToAscii to equalsAscii
Convert code like: 0 == aStr.compareToAscii("XXX") to aStr.equalsAscii("XXX") which is both clearer and faster. Change-Id: I2e906d7d38494db38eb292702fadb781b1251e07
Diffstat (limited to 'svx')
-rw-r--r--svx/source/form/fmscriptingenv.cxx4
-rw-r--r--svx/source/form/fmshimp.cxx2
-rw-r--r--svx/source/form/fmsrccfg.cxx9
3 files changed, 5 insertions, 10 deletions
diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx
index 7696f882dc42..070cdb8dd60e 100644
--- a/svx/source/form/fmscriptingenv.cxx
+++ b/svx/source/form/fmscriptingenv.cxx
@@ -974,8 +974,8 @@ namespace svxform
{
// and it has such a prefix
sMacroLocation = sScriptCode.copy( 0, nPrefixLen );
- DBG_ASSERT( 0 == sMacroLocation.compareToAscii( "document" )
- || 0 == sMacroLocation.compareToAscii( "application" ),
+ DBG_ASSERT( sMacroLocation.equalsAscii( "document" )
+ || sMacroLocation.equalsAscii( "application" ),
"FormScriptingEnvironment::doFireScriptEvent: invalid (unknown) prefix!" );
// strip the prefix: the SfxObjectShell::CallScript knows nothing about such prefixes
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index a18e92969462..fbcc2675cf7c 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -3595,7 +3595,7 @@ void FmXFormShell::Notify( const com::sun::star::uno::Sequence< OUString >& _rPr
const OUString* pSearch = _rPropertyNames.getConstArray();
const OUString* pSearchTil = pSearch + _rPropertyNames.getLength();
for (;pSearch < pSearchTil; ++pSearch)
- if (0 == pSearch->compareToAscii("FormControlPilotsEnabled"))
+ if (pSearch->equalsAscii("FormControlPilotsEnabled"))
{
implAdjustConfigCache();
InvalidateSlot( SID_FM_USE_WIZARDS, sal_True );
diff --git a/svx/source/form/fmsrccfg.cxx b/svx/source/form/fmsrccfg.cxx
index c74e4df31265..a013b3b47dbb 100644
--- a/svx/source/form/fmsrccfg.cxx
+++ b/svx/source/form/fmsrccfg.cxx
@@ -109,18 +109,13 @@ namespace svxform
const Ascii2Int16* pSearch = _pMap;
while ( pSearch && pSearch->pAscii )
{
- if ( 0 == _rAsciiValue.compareToAscii( pSearch->pAscii ) )
+ if ( _rAsciiValue.equalsAscii( pSearch->pAscii ) )
// found
return pSearch->nValue;
++pSearch;
}
- OSL_FAIL(
- ( OString( "lcl_implMapAsciiValue: could not convert the ascii value " )
- += OString( _rAsciiValue.getStr(), _rAsciiValue.getLength(), RTL_TEXTENCODING_ASCII_US )
- += OString( " !" )
- ).getStr()
- );
+ OSL_FAIL("lcl_implMapAsciiValue: could not convert the ascii value " + _rAsciiValue + " !");
return -1;
}