summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarina Machalkova <bubli@bubli.org>2012-03-04 23:19:48 +0100
committerKatarina Machalkova <bubli@bubli.org>2012-03-04 23:26:02 +0100
commit05a0b08606ac77cf7d3e294998138610b53b1b6d (patch)
tree798bde66a405d38ba2c8bddffc328b7518f5ca74
parent07342a6aac8c32823fde4be163bb9132ed17d537 (diff)
fdo#37197: No legend entry for regression curve if not applicable
make the original check more general, to cover all chart types that don't support statistics
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 82cec0cc9bf3..8dfef2e4af28 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2303,8 +2303,9 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
aResult.push_back(aEntry);
}
- // regression curves
- if ( 3 == m_nDimension ) // #i63016#
+ // don't show legend entry of regression curve & friends if this type of chart
+ // doesn't support statistics #i63016#, fdo#37197
+ if (!ChartTypeHelper::isSupportingStatisticProperties( m_xChartTypeModel, m_nDimension ))
return aResult;
Reference< XRegressionCurveContainer > xRegrCont( rSeries.getModel(), uno::UNO_QUERY );