summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/inc/LinearRegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx3
-rw-r--r--chart2/source/tools/LinearRegressionCurveCalculator.cxx10
-rw-r--r--chart2/source/tools/RegressionCurveCalculator.cxx3
-rw-r--r--offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl16
-rw-r--r--xmloff/source/chart/SchXMLSeries2Context.cxx5
6 files changed, 30 insertions, 10 deletions
diff --git a/chart2/source/inc/LinearRegressionCurveCalculator.hxx b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
index 79c6d5da0dce..add9825a2fa2 100644
--- a/chart2/source/inc/LinearRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
@@ -36,7 +36,8 @@ private:
sal_Int32 aDegree,
sal_Bool aForceIntercept,
double aInterceptValue,
- sal_Int32 aPeriod);
+ sal_Int32 aPeriod)
+ throw (com::sun::star::uno::RuntimeException);
virtual com::sun::star::uno::Sequence< com::sun::star::geometry::RealPoint2D > SAL_CALL getCurveValues(
double min,
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index a8cf124fbd97..347492cdfe6e 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -62,7 +62,8 @@ protected:
sal_Int32 aDegree,
sal_Bool aForceIntercept,
double aInterceptValue,
- sal_Int32 aPeriod);
+ sal_Int32 aPeriod)
+ throw (com::sun::star::uno::RuntimeException);
virtual void SAL_CALL recalculateRegression(
const com::sun::star::uno::Sequence< double >& aXValues,
diff --git a/chart2/source/tools/LinearRegressionCurveCalculator.cxx b/chart2/source/tools/LinearRegressionCurveCalculator.cxx
index 07c19a4124a6..ec328926ce8b 100644
--- a/chart2/source/tools/LinearRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LinearRegressionCurveCalculator.cxx
@@ -26,7 +26,6 @@
using namespace ::com::sun::star;
-
namespace chart
{
@@ -38,10 +37,11 @@ LinearRegressionCurveCalculator::~LinearRegressionCurveCalculator()
{}
void LinearRegressionCurveCalculator::setRegressionProperties(
- sal_Int32 /*aDegree*/,
- sal_Bool aForceIntercept,
- double aInterceptValue,
- sal_Int32 aPeriod)
+ sal_Int32 /*aDegree*/,
+ sal_Bool aForceIntercept,
+ double aInterceptValue,
+ sal_Int32 aPeriod )
+ throw (uno::RuntimeException)
{
PolynomialRegressionCurveCalculator::setRegressionProperties(
1,
diff --git a/chart2/source/tools/RegressionCurveCalculator.cxx b/chart2/source/tools/RegressionCurveCalculator.cxx
index 8337d95581bf..771cf763f974 100644
--- a/chart2/source/tools/RegressionCurveCalculator.cxx
+++ b/chart2/source/tools/RegressionCurveCalculator.cxx
@@ -73,7 +73,8 @@ void RegressionCurveCalculator::setRegressionProperties(
sal_Int32 aDegree,
sal_Bool aForceIntercept,
double aInterceptValue,
- sal_Int32 aPeriod)
+ sal_Int32 aPeriod )
+ throw (uno::RuntimeException)
{
mDegree = aDegree;
mForceIntercept = aForceIntercept;
diff --git a/offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl b/offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl
index 506475a0c12e..efb57adcd085 100644
--- a/offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl
+++ b/offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl
@@ -36,7 +36,23 @@ module chart2
interface XRegressionCurveCalculator : com::sun::star::uno::XInterface
{
+ /** set calculation properties for curve calculation.
+ @param degree
+ Degree of polynomial regression curve, value should be greater than zero
+ If the curve is not polynomial, this property has no effect.
+
+ @param period
+ Period of a moving average regression curve, value should greater or equal to 2
+ If the curve is not moving average regression curve, this property has no effect.
+
+ @param forceIntercept
+ Should force the intercept value.
+
+ @param interceptValue
+ Intercept value.
+
+ */
void setRegressionProperties( [in] long degree,
[in] boolean forceIntercept,
[in] double interceptValue,
diff --git a/xmloff/source/chart/SchXMLSeries2Context.cxx b/xmloff/source/chart/SchXMLSeries2Context.cxx
index e01a8ae14b88..a955d321b013 100644
--- a/xmloff/source/chart/SchXMLSeries2Context.cxx
+++ b/xmloff/source/chart/SchXMLSeries2Context.cxx
@@ -871,7 +871,7 @@ void SchXMLSeries2Context::setStylesToRegressionCurves(
try
{
OUString aServiceName;
- XMLPropStyleContext* pPropStyleContext;
+ XMLPropStyleContext* pPropStyleContext = NULL;
if (!rCurrentStyleName.isEmpty())
{
@@ -910,7 +910,8 @@ void SchXMLSeries2Context::setStylesToRegressionCurves(
if( xRegCurve.is())
{
Reference< beans::XPropertySet > xCurveProperties( xRegCurve, uno::UNO_QUERY );
- pPropStyleContext->FillPropertySet( xCurveProperties );
+ if( pPropStyleContext != NULL)
+ pPropStyleContext->FillPropertySet( xCurveProperties );
xRegCurve->setEquationProperties( iStyle->m_xEquationProperties );
}