diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2012-07-14 18:00:06 +0200 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-07-16 11:33:05 +0100 |
commit | df645a2bd8a9b5463c74f261268f0d2de7245ccc (patch) | |
tree | 25d5df125c50111828d1e1f62edd47b716c11489 /chart2 | |
parent | fix 32bit build wrt. int vs. sal_Int32 comparison (diff) | |
download | core-df645a2bd8a9b5463c74f261268f0d2de7245ccc.tar.gz core-df645a2bd8a9b5463c74f261268f0d2de7245ccc.zip |
There is not need to allocate memory just for getting the 'indexOf'
a literal within a OUString.
Change-Id: I01ca30c68228f81b3d313dfca5b975448f3c4fc7
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx index 29ae9f82008b..7dffd57afb26 100644 --- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx +++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx @@ -505,11 +505,11 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) // "Area" "StackedArea" "PercentStackedArea" "ThreeDArea" // "StackedThreeDArea" "PercentStackedThreeDArea" - if( aName.indexOf( rtl::OUString("Area") ) != -1 ) + if( aName.indexOf( "Area" ) != -1 ) return rtl::OUString("com.sun.star.chart.AreaDiagram"); // "Pie" "PieAllExploded" "ThreeDPie" "ThreeDPieAllExploded" - if( aName.indexOf( rtl::OUString("Pie") ) != -1 ) + if( aName.indexOf( "Pie" ) != -1 ) return rtl::OUString("com.sun.star.chart.PieDiagram"); // "Column" "StackedColumn" "PercentStackedColumn" "ThreeDColumnDeep" @@ -518,33 +518,33 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) // "PercentStackedBar" "ThreeDBarDeep" "ThreeDBarFlat" // "StackedThreeDBarFlat" "PercentStackedThreeDBarFlat" "ColumnWithLine" // "StackedColumnWithLine" - if( aName.indexOf( rtl::OUString("Column") ) != -1 || aName.indexOf( rtl::OUString("Bar") ) != -1 ) + if( aName.indexOf( "Column" ) != -1 || aName.indexOf( "Bar" ) != -1 ) return rtl::OUString( "com.sun.star.chart.BarDiagram" ); // "Donut" "DonutAllExploded" "ThreeDDonut" "ThreeDDonutAllExploded" - if( aName.indexOf( rtl::OUString("Donut") ) != -1 ) + if( aName.indexOf( "Donut" ) != -1 ) return rtl::OUString( "com.sun.star.chart.DonutDiagram" ); // "ScatterLineSymbol" "ScatterLine" "ScatterSymbol" "ThreeDScatter" - if( aName.indexOf( rtl::OUString("Scatter") ) != -1 ) + if( aName.indexOf( "Scatter" ) != -1 ) return rtl::OUString( "com.sun.star.chart.XYDiagram" ); // "FilledNet" "StackedFilledNet" "PercentStackedFilledNet" - if( aName.indexOf( rtl::OUString("FilledNet") ) != -1 ) + if( aName.indexOf( "FilledNet" ) != -1 ) return rtl::OUString( "com.sun.star.chart.FilledNetDiagram" ); // "Net" "NetSymbol" "NetLine" "StackedNet" "StackedNetSymbol" // "StackedNetLine" "PercentStackedNet" "PercentStackedNetSymbol" // "PercentStackedNetLine" - if( aName.indexOf( rtl::OUString("Net") ) != -1 ) + if( aName.indexOf( "Net" ) != -1 ) return rtl::OUString( "com.sun.star.chart.NetDiagram" ); // "StockLowHighClose" "StockOpenLowHighClose" "StockVolumeLowHighClose" // "StockVolumeOpenLowHighClose" - if( aName.indexOf( rtl::OUString("Stock") ) != -1 ) + if( aName.indexOf( "Stock" ) != -1 ) return rtl::OUString( "com.sun.star.chart.StockDiagram" ); - if( aName.indexOf( rtl::OUString("Bubble") ) != -1 ) + if( aName.indexOf( "Bubble" ) != -1 ) return rtl::OUString( "com.sun.star.chart.BubbleDiagram" ); // Note: this must be checked after Bar, Net and Scatter @@ -553,7 +553,7 @@ OUString lcl_getDiagramType( const OUString & rTemplateServiceName ) // "PercentStackedLine" "LineSymbol" "StackedLineSymbol" // "PercentStackedLineSymbol" "ThreeDLine" "StackedThreeDLine" // "PercentStackedThreeDLine" "ThreeDLineDeep" - if( aName.indexOf( rtl::OUString("Line") ) != -1 || aName.indexOf( rtl::OUString("Symbol") ) != -1 ) + if( aName.indexOf( "Line" ) != -1 || aName.indexOf( "Symbol" ) != -1 ) return rtl::OUString( "com.sun.star.chart.LineDiagram" ); OSL_FAIL( "unknown template" ); |