diff options
author | Tomaž Vajngerl <quikee@gmail.com> | 2013-12-10 21:55:15 +0100 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2013-12-11 08:09:48 +0100 |
commit | 2300cdcb637face2bd63935ac923817565370466 (patch) | |
tree | f484ed5c5153cf84637f42698a30ee9ead6831fc | |
parent | d25b92607db73913d042d359f97503c16ea68698 (diff) |
Show name of the trendline in tooltip (at hovering).
Change-Id: Iaaef26fdb5f1f46b6e0ffece484cf884cc29c84c
-rw-r--r-- | chart2/source/controller/dialogs/ObjectNameProvider.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx index 39a776ff317a..1ceba0663a11 100644 --- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx +++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx @@ -615,8 +615,21 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe } else { - // non-verbose - aRet = ObjectNameProvider::getName( eObjectType, false ); + Reference< chart2::XDataSeries > xSeries( ObjectIdentifier::getDataSeriesForCID(rObjectCID , xChartModel)); + Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY ); + aRet += getName(eObjectType, false); + + if( xCurveCnt.is()) + { + sal_Int32 nCurveIndex = ObjectIdentifier::getIndexFromParticleOrCID( rObjectCID ); + Reference< chart2::XRegressionCurve > xCurve( RegressionCurveHelper::getRegressionCurveAtIndex(xCurveCnt, nCurveIndex) ); + if( xCurve.is()) + { + aRet += " ("; + aRet += RegressionCurveHelper::getRegressionCurveName(xCurve); + aRet += " )"; + } + } } } else if( OBJECTTYPE_DATA_AVERAGE_LINE == eObjectType ) |