[Libreoffice-commits] .: chart2/source

Katarina Machalkova bubli at kemper.freedesktop.org
Sun Mar 4 14:32:42 PST 2012


 chart2/source/view/charttypes/VSeriesPlotter.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 05a0b08606ac77cf7d3e294998138610b53b1b6d
Author: Katarina Machalkova <bubli at bubli.org>
Date:   Sun Mar 4 23:19:48 2012 +0100

    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

diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 82cec0c..8dfef2e 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 );


More information about the Libreoffice-commits mailing list