[Libreoffice-commits] core.git: chart2/source

Laurent Balland-Poirier laurent.balland-poirier at laposte.net
Sat Nov 16 03:16:39 PST 2013


 chart2/source/controller/dialogs/ObjectNameProvider.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 06d2d3290acb5dd3200481b85baf7c5718ea177c
Author: Laurent Balland-Poirier <laurent.balland-poirier at laposte.net>
Date:   Tue Nov 12 20:55:21 2013 +0100

    fdo#35712 Correct update of equation in status bar
    
    Change-Id: I6db5628bbad337f70e3a39a4c65afbd0f6c30a9d
    Reviewed-on: https://gerrit.libreoffice.org/6658
    Tested-by: Tomaž Vajngerl <quikee at gmail.com>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 9b0fdc9..7491316 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -559,6 +559,18 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
                     try
                     {
                         Reference< chart2::XRegressionCurveCalculator > xCalculator( xCurve->getCalculator(), uno::UNO_QUERY_THROW );
+                        sal_Int32 aDegree = 2;
+                        sal_Bool aForceIntercept = false;
+                        double aInterceptValue = 0.0;
+                        uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY );
+                        if ( xProperties.is())
+                        {
+                                xProperties->getPropertyValue( "PolynomialDegree") >>= aDegree;
+                                xProperties->getPropertyValue( "ForceIntercept") >>= aForceIntercept;
+                                if (aForceIntercept)
+                                        xProperties->getPropertyValue( "InterceptValue") >>= aInterceptValue;
+                        }
+                        xCalculator->setRegressionProperties(aDegree, aForceIntercept, aInterceptValue, 2);
                         RegressionCurveHelper::initializeCurveCalculator( xCalculator, xSeries, xChartModel );
 
                         // replace formula


More information about the Libreoffice-commits mailing list