diff options
author | Noel Grandin <noel@peralex.com> | 2013-11-05 14:39:55 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-11-11 12:58:13 +0200 |
commit | fcd1637d5101b9142e6808edfb77b01122857901 (patch) | |
tree | 5fd09f97de80cf2a9481bd55a798015db35f1d0c /oox/source/ppt | |
parent | ef90021abe3735fba57145598fd7c3d359d2718e (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 'oox/source/ppt')
-rw-r--r-- | oox/source/ppt/animationtypes.cxx | 4 | ||||
-rw-r--r-- | oox/source/ppt/commonbehaviorcontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/pptfilterhelpers.cxx | 2 | ||||
-rw-r--r-- | oox/source/ppt/timenodelistcontext.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/ppt/animationtypes.cxx b/oox/source/ppt/animationtypes.cxx index a6ba78872f76..4992fdd338f4 100644 --- a/oox/source/ppt/animationtypes.cxx +++ b/oox/source/ppt/animationtypes.cxx @@ -34,7 +34,7 @@ namespace oox { namespace ppt { Any GetTime( const OUString & val ) { Any aDuration; - if( val.compareToAscii( "indefinite" ) == 0 ) + if( val.equalsAscii( "indefinite" ) ) { aDuration <<= Timing_INDEFINITE; } @@ -50,7 +50,7 @@ Any GetTime( const OUString & val ) Any GetTimeAnimateValueTime( const OUString & val ) { Any aPercent; - if( val.compareToAscii( "indefinite" ) == 0 ) + if( val.equalsAscii( "indefinite" ) ) { aPercent <<= Timing_INDEFINITE; } diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx index dd19deef6259..5cc23c562a08 100644 --- a/oox/source/ppt/commonbehaviorcontext.cxx +++ b/oox/source/ppt/commonbehaviorcontext.cxx @@ -89,7 +89,7 @@ namespace oox { namespace ppt { const ImplAttributeNameConversion *attrConv = gImplConversionList; while( attrConv->mpMSName != NULL ) { - if(msCurrentAttribute.compareToAscii( attrConv->mpMSName ) == 0 ) + if(msCurrentAttribute.equalsAscii( attrConv->mpMSName ) ) { Attribute attr; attr.name = OUString::intern( attrConv->mpAPIName, diff --git a/oox/source/ppt/pptfilterhelpers.cxx b/oox/source/ppt/pptfilterhelpers.cxx index 97e3e62858ec..e4f45fbcafa9 100644 --- a/oox/source/ppt/pptfilterhelpers.cxx +++ b/oox/source/ppt/pptfilterhelpers.cxx @@ -77,7 +77,7 @@ namespace oox { namespace ppt { while( p->mpName ) { - if( rName.compareToAscii( p->mpName ) == 0 ) + if( rName.equalsAscii( p->mpName ) ) return p; p++; diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 5e7227a95f0b..ca7f1cde248b 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -269,7 +269,7 @@ namespace oox { namespace ppt { { nCommand = EffectCommands::PLAY; } - else if( msCommand.compareToAscii( "playFrom" ) == 0 ) + else if( msCommand.equalsAscii( "playFrom" ) ) { const OUString aMediaTime( msCommand.copy( 9, msCommand.getLength() - 10 ) ); rtl_math_ConversionStatus eStatus; |