fdo#35712 Correct update of equation in status bar

Change-Id: I6db5628bbad337f70e3a39a4c65afbd0f6c30a9d
Reviewed-on: https://gerrit.libreoffice.org/6658
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Laurent Balland-Poirier
2013-11-12 20:55:21 +01:00
committed by Tomaž Vajngerl
parent 40b2a899d5
commit 06d2d3290a

View File

@@ -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