From a7674482254ee996b1c4fee60f3064778be369aa Mon Sep 17 00:00:00 2001 From: Christophe JAILLET Date: Thu, 12 Jul 2012 22:10:17 +0200 Subject: Search for char instead of 1 char long string, when possible. It is faster and even avoid memory allocation somtimes. Change-Id: Ic12ff70e95953de44ef5798131150669d07a5445 --- oox/source/drawingml/chart/axisconverter.cxx | 2 +- oox/source/drawingml/chart/seriesconverter.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'oox') diff --git a/oox/source/drawingml/chart/axisconverter.cxx b/oox/source/drawingml/chart/axisconverter.cxx index d07d28c79ae8..2a0ea142a138 100644 --- a/oox/source/drawingml/chart/axisconverter.cxx +++ b/oox/source/drawingml/chart/axisconverter.cxx @@ -316,7 +316,7 @@ void AxisConverter::convertFromModel( const Reference< XCoordinateSystem >& rxCo if( (aScaleData.AxisType == cssc2::AxisType::REALNUMBER) || (aScaleData.AxisType == cssc2::AxisType::PERCENT) ) { - if( mrModel.maNumberFormat.maFormatCode.indexOfAsciiL("%",1) >= 0) + if( mrModel.maNumberFormat.maFormatCode.indexOf('%') >= 0) mrModel.maNumberFormat.mbSourceLinked = false; getFormatter().convertNumberFormat( aAxisProp, mrModel.maNumberFormat ); } diff --git a/oox/source/drawingml/chart/seriesconverter.cxx b/oox/source/drawingml/chart/seriesconverter.cxx index 052237675caa..6ad0d7439188 100644 --- a/oox/source/drawingml/chart/seriesconverter.cxx +++ b/oox/source/drawingml/chart/seriesconverter.cxx @@ -126,7 +126,7 @@ void lclConvertLabelFormatting( PropertySet& rPropSet, ObjectFormatter& rFormatt bool bShowPercent = !rDataLabel.mbDeleted && rDataLabel.mobShowPercent.get( false ) && (rTypeInfo.meTypeCategory == TYPECATEGORY_PIE); if( bShowValue && !bShowPercent && rTypeInfo.meTypeCategory == TYPECATEGORY_PIE && - rDataLabel.maNumberFormat.maFormatCode.indexOfAsciiL("%", 1) >= 0 ) + rDataLabel.maNumberFormat.maFormatCode.indexOf('%') >= 0 ) { bShowValue = false; bShowPercent = true; -- cgit