diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-06-30 13:27:24 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-07-03 21:46:45 +0200 |
commit | 1b1dc3c926f4f59d0c2c27e9cc93389a115963d6 (patch) | |
tree | 521e18fe2d1d188450bcd972513f6a567e4d86b6 /chart2 | |
parent | 1c5c226698e94a17ea5216a1f78a48dd82f614e1 (diff) |
Add legend name for polynomial and moving average trendlines.
Change-Id: I111c82c66f1ee29dae50470fc08bb66c79da0652
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/controller/dialogs/Strings_Statistic.src | 8 | ||||
-rw-r--r-- | chart2/source/tools/RegressionCurveHelper.cxx | 17 |
2 files changed, 16 insertions, 9 deletions
diff --git a/chart2/source/controller/dialogs/Strings_Statistic.src b/chart2/source/controller/dialogs/Strings_Statistic.src index bdbd73677cdd..7469f6687c3f 100644 --- a/chart2/source/controller/dialogs/Strings_Statistic.src +++ b/chart2/source/controller/dialogs/Strings_Statistic.src @@ -57,6 +57,14 @@ String STR_REGRESSION_POWER { Text [ en-US ] = "Power (%SERIESNAME)" ; }; +String STR_REGRESSION_POLYNOMIAL +{ + Text [ en-US ] = "Polynomial (%SERIESNAME)" ; +}; +String STR_REGRESSION_MOVING_AVERAGE +{ + Text [ en-US ] = "Moving average (%SERIESNAME)" ; +}; String STR_REGRESSION_MEAN { diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index 551541befa44..a3b3cc806ea1 100644 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -593,7 +593,7 @@ OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XR { OUString aResult; Reference< lang::XServiceName > xServiceName( xRegressionCurve, uno::UNO_QUERY ); - if( ! xServiceName.is()) + if(!xServiceName.is()) return aResult; OUString aServiceName( xServiceName->getServiceName()); @@ -629,20 +629,19 @@ OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XR return aResult; } -::std::vector< Reference< chart2::XRegressionCurve > > +std::vector< Reference< chart2::XRegressionCurve > > RegressionCurveHelper::getAllRegressionCurvesNotMeanValueLine( const Reference< chart2::XDiagram > & xDiagram ) { - ::std::vector< Reference< chart2::XRegressionCurve > > aResult; - ::std::vector< Reference< chart2::XDataSeries > > aSeries( DiagramHelper::getDataSeriesFromDiagram( xDiagram )); - for( ::std::vector< Reference< chart2::XDataSeries > >::iterator aIt( aSeries.begin()); + std::vector< Reference< chart2::XRegressionCurve > > aResult; + std::vector< Reference< chart2::XDataSeries > > aSeries( DiagramHelper::getDataSeriesFromDiagram( xDiagram )); + for( std::vector< Reference< chart2::XDataSeries > >::iterator aIt( aSeries.begin()); aIt != aSeries.end(); ++aIt ) { - Reference< chart2::XRegressionCurveContainer > xCurveCnt( *aIt, uno::UNO_QUERY ); - if( xCurveCnt.is()) + Reference< chart2::XRegressionCurveContainer > xContainer( *aIt, uno::UNO_QUERY ); + if(xContainer.is()) { - uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves( - xCurveCnt->getRegressionCurves()); + uno::Sequence< uno::Reference< chart2::XRegressionCurve > > aCurves(xContainer->getRegressionCurves()); for( sal_Int32 i = 0; i < aCurves.getLength(); ++i ) { if( ! isMeanValueLine( aCurves[i] )) |