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

Tomaž Vajngerl quikee at gmail.com
Wed Jul 3 13:47:40 PDT 2013


 chart2/source/inc/LinearRegressionCurveCalculator.hxx     |    3 +-
 chart2/source/inc/RegressionCurveCalculator.hxx           |    3 +-
 chart2/source/tools/LinearRegressionCurveCalculator.cxx   |   10 ++++----
 chart2/source/tools/RegressionCurveCalculator.cxx         |    3 +-
 offapi/com/sun/star/chart2/XRegressionCurveCalculator.idl |   16 ++++++++++++++
 xmloff/source/chart/SchXMLSeries2Context.cxx              |    5 ++--
 6 files changed, 30 insertions(+), 10 deletions(-)

New commits:
commit 27a4d5597c0757611d0e2e682d0c05441859cc4e
Author: Tomaž Vajngerl <quikee at gmail.com>
Date:   Wed Jul 3 22:44:22 2013 +0200

    Fixes to compiler errors, setRegressionProperties description.
    
    Change-Id: I40ef93746e5f2a43ce58f0080db0b643e22404a1

diff --git a/chart2/source/inc/LinearRegressionCurveCalculator.hxx b/chart2/source/inc/LinearRegressionCurveCalculator.hxx
index 79c6d5d..add9825 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 a8cf124..347492c 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 07c19a4..ec32892 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 8337d95..771cf76 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 506475a..efb57ad 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 e01a8ae1..a955d32 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 );
                 }


More information about the Libreoffice-commits mailing list