summaryrefslogtreecommitdiff
path: root/chart2/source/tools/RegressionCurveHelper.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/tools/RegressionCurveHelper.cxx')
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index 8d9ba75962e9..65e6b13ac0a0 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -898,6 +898,20 @@ bool RegressionCurveHelper::hasEquation( const Reference< chart2::XRegressionCur
return bHasEquation;
}
+bool RegressionCurveHelper::MayHaveCorrelationCoefficient( const Reference< chart2::XRegressionCurve > & xCurve )
+{
+ bool bMayHaveCorrelationCoefficient = true;
+ if( xCurve.is())
+ {
+ uno::Reference< beans::XPropertySet > xEquationProp( xCurve->getEquationProperties() );
+ if( xEquationProp.is() )
+ {
+ xEquationProp->getPropertyValue( "MayHaveCorrelationCoefficient") >>= bMayHaveCorrelationCoefficient;
+ }
+ }
+ return bMayHaveCorrelationCoefficient;
+}
+
} //namespace chart
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */