diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2013-04-07 22:18:57 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2013-04-07 22:18:57 +0200 |
commit | 3f3980ff242203e45e10c8fb13f871f968377383 (patch) | |
tree | 65cfde7af94a6cf9cc53743c1f1858708428afe9 /chart2/source/controller/dialogs/ObjectNameProvider.cxx | |
parent | Fix variable reassigned before the old value has been used (diff) | |
download | core-3f3980ff242203e45e10c8fb13f871f968377383.tar.gz core-3f3980ff242203e45e10c8fb13f871f968377383.zip |
Some cppcheck cleaning
Change-Id: I425ed98a721ded162c2ae08d145aaa9dbf548632
Diffstat (limited to 'chart2/source/controller/dialogs/ObjectNameProvider.cxx')
-rw-r--r-- | chart2/source/controller/dialogs/ObjectNameProvider.cxx | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 6ef7bd9684d3..29a3f38be4be 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -509,9 +509,8 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe sal_Int32 nPointIndex( ObjectIdentifier::getParticleID(rObjectCID).toInt32() ); //replace data point index - sal_Int32 nIndex = -1; OUString aWildcard( "%POINTNUMBER" ); - nIndex = aRet.indexOf( aWildcard ); + sal_Int32 nIndex = aRet.indexOf( aWildcard ); if( nIndex != -1 ) { aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), OUString::valueOf(nPointIndex+1) ); @@ -569,9 +568,8 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe RegressionCurveHelper::initializeCurveCalculator( xCalculator, xSeries, xChartModel ); // replace formula - sal_Int32 nIndex = -1; OUString aWildcard( "%FORMULA" ); - nIndex = aRet.indexOf( aWildcard ); + sal_Int32 nIndex = aRet.indexOf( aWildcard ); if( nIndex != -1 ) aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), xCalculator->getRepresentation()); @@ -620,9 +618,8 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe sal_Unicode aDecimalSep( '.' ); - sal_Int32 nIndex = -1; OUString aWildcard( "%AVERAGE_VALUE" ); - nIndex = aRet.indexOf( aWildcard ); + sal_Int32 nIndex = aRet.indexOf( aWildcard ); // as the curve is constant, the value at any x-value is ok if( nIndex != -1 ) { |