diff options
author | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-02-07 00:46:14 +0100 |
---|---|---|
committer | Ingrid Halama [iha] <Ingrid.Halama@oracle.com> | 2011-02-07 00:46:14 +0100 |
commit | 7fd459f91a4cdba4b6e51b477a2d049a441b39e6 (patch) | |
tree | c44b75544bf32e5719b02178c2190d7d137ec919 /chart2 | |
parent | 34da9193218bfbbb036ffcc3fc3b26f2251403fb (diff) |
chart52: #i68029# show mean value line in the legend
Diffstat (limited to 'chart2')
-rwxr-xr-x | chart2/source/tools/RegressionCurveHelper.cxx | 4 | ||||
-rwxr-xr-x | chart2/source/view/charttypes/VSeriesPlotter.cxx | 6 |
2 files changed, 4 insertions, 6 deletions
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx index df9c4bdadd65..254fce22f5e7 100755 --- a/chart2/source/tools/RegressionCurveHelper.cxx +++ b/chart2/source/tools/RegressionCurveHelper.cxx @@ -608,9 +608,7 @@ OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XR if( aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.MeanValueRegressionCurve" ))) { - OSL_ENSURE( false, "Meanvalue lines in legend not supported" ); - aResult = OUString(); - // aResult = ::chart::SchResId::getResString( STR_OBJECT_AVERAGE_LINE ); + aResult = ::chart::SchResId::getResString( STR_OBJECT_AVERAGE_LINE ); } else if( aServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "com.sun.star.chart2.LinearRegressionCurve" ))) diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx index 4866191333ec..669b034fa40b 100755 --- a/chart2/source/view/charttypes/VSeriesPlotter.cxx +++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx @@ -1929,7 +1929,7 @@ bool VSeriesPlotter::HasRegressionCurves( const VDataSeries& rSeries, bool& rbHa sal_Int32 i = 0, nCount = aCurves.getLength(); for( i=0; i<nCount; ++i ) { - if( aCurves[i].is() && !RegressionCurveHelper::isMeanValueLine( aCurves[i] ) ) + if( aCurves[i].is() ) { bHasRegressionCurves = true; if( HasDashedLines( uno::Reference< beans::XPropertySet >( aCurves[i], uno::UNO_QUERY ) ) ) @@ -2167,7 +2167,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( sal_Int32 i = 0, nCount = aCurves.getLength(); for( i=0; i<nCount; ++i ) { - if( aCurves[i].is() && !RegressionCurveHelper::isMeanValueLine( aCurves[i] ) ) + if( aCurves[i].is() ) { //label OUString aResStr( SchResId::getResString( STR_STATISTICS_IN_LEGEND )); @@ -2189,7 +2189,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries( { aEntry.aSymbol = uno::Reference< drawing::XShape >( xSymbolGroup, uno::UNO_QUERY ); - bool bAverageLine = false;//@todo find out wether this is an average line or a regression curve + bool bAverageLine = RegressionCurveHelper::isMeanValueLine( aCurves[i] ); ObjectType eObjectType = bAverageLine ? OBJECTTYPE_DATA_AVERAGE_LINE : OBJECTTYPE_DATA_CURVE; OUString aChildParticle( ObjectIdentifier::createChildParticleWithIndex( eObjectType, i ) ); aChildParticle = ObjectIdentifier::addChildParticle( aChildParticle, ObjectIdentifier::createChildParticleWithIndex( OBJECTTYPE_LEGEND_ENTRY, 0 ) ); |