summaryrefslogtreecommitdiff
path: root/chart2/source/inc
diff options
context:
space:
mode:
authorTomaž Vajngerl <quikee@gmail.com>2013-06-28 19:49:25 +0200
committerTomaž Vajngerl <quikee@gmail.com>2013-07-03 21:46:43 +0200
commit6085bd15740eb38de5f4c1079d11e8dd38fc166c (patch)
treedbb41f82e02f3e70988b4cf055095e7b0d66f81a /chart2/source/inc
parentdd5c0b2db451ff4d6fac7a72770758513583d468 (diff)
Force intercept for polynomial regression & dialog improvements
Change-Id: I2f712d8b95b5fdeb05b93b5247aab9772a00cc70
Diffstat (limited to 'chart2/source/inc')
-rw-r--r--chart2/source/inc/PolynomialRegressionCurveCalculator.hxx30
-rw-r--r--chart2/source/inc/RegressionCurveCalculator.hxx63
2 files changed, 49 insertions, 44 deletions
diff --git a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx
index b3b38a9d7eb7..803abb69f91b 100644
--- a/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx
+++ b/chart2/source/inc/PolynomialRegressionCurveCalculator.hxx
@@ -33,32 +33,30 @@ public:
protected:
virtual OUString ImplGetRepresentation(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xNumFormatter,
- ::sal_Int32 nNumberFormatKey ) const;
+ const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey ) const;
private:
// ____ XRegressionCurveCalculator ____
virtual void SAL_CALL recalculateRegression(
- const ::com::sun::star::uno::Sequence< double >& aXValues,
- const ::com::sun::star::uno::Sequence< double >& aYValues )
- throw (::com::sun::star::uno::RuntimeException);
+ const com::sun::star::uno::Sequence< double >& aXValues,
+ const com::sun::star::uno::Sequence< double >& aYValues )
+ throw (com::sun::star::uno::RuntimeException);
virtual double SAL_CALL getCurveValue( double x )
- throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ throw (com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > SAL_CALL getCurveValues(
+ virtual ::com::sun::star::uno::Sequence< com::sun::star::geometry::RealPoint2D > SAL_CALL getCurveValues(
double min,
double max,
- ::sal_Int32 nPointCount,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling >& xScalingX,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling >& xScalingY,
- ::sal_Bool bMaySkipPointsInCalculation )
- throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ sal_Int32 nPointCount,
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScalingX,
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScalingY,
+ sal_Bool bMaySkipPointsInCalculation )
+ throw (com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::uno::RuntimeException);
- double m_fSlope;
- double m_fIntercept;
std::vector<double> mResult;
};
diff --git a/chart2/source/inc/RegressionCurveCalculator.hxx b/chart2/source/inc/RegressionCurveCalculator.hxx
index 0829543dfb5d..a8cf124fbd97 100644
--- a/chart2/source/inc/RegressionCurveCalculator.hxx
+++ b/chart2/source/inc/RegressionCurveCalculator.hxx
@@ -28,64 +28,71 @@ namespace chart
{
class RegressionCurveCalculator : public
- ::cppu::WeakImplHelper1< ::com::sun::star::chart2::XRegressionCurveCalculator >
+ cppu::WeakImplHelper1< com::sun::star::chart2::XRegressionCurveCalculator >
{
public:
RegressionCurveCalculator();
virtual ~RegressionCurveCalculator();
static bool isLinearScaling(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling > & xScaling );
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScaling );
+
static bool isLogarithmicScaling(
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling > & xScaling );
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScaling );
protected:
virtual OUString ImplGetRepresentation(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xNumFormatter,
- ::sal_Int32 nNumberFormatKey ) const = 0;
+ const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey ) const = 0;
OUString getFormattedString(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter >& xNumFormatter,
- ::sal_Int32 nNumberFormatKey,
+ const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter >& xNumFormatter,
+ sal_Int32 nNumberFormatKey,
double fNumber ) const;
double m_fCorrelationCoeffitient;
- sal_Int32 mDegree;
- double mIntercept;
- sal_Int32 mPeriod;
+ sal_Int32 mDegree;
+ sal_Bool mForceIntercept;
+ double mInterceptValue;
+ sal_Int32 mPeriod;
// ____ XRegressionCurveCalculator ____
virtual void SAL_CALL setRegressionProperties(
sal_Int32 aDegree,
- double aIntercept,
+ sal_Bool aForceIntercept,
+ double aInterceptValue,
sal_Int32 aPeriod);
virtual void SAL_CALL recalculateRegression(
- const ::com::sun::star::uno::Sequence< double >& aXValues,
- const ::com::sun::star::uno::Sequence< double >& aYValues )
- throw (::com::sun::star::uno::RuntimeException) = 0;
+ const com::sun::star::uno::Sequence< double >& aXValues,
+ const com::sun::star::uno::Sequence< double >& aYValues )
+ throw (com::sun::star::uno::RuntimeException) = 0;
+
virtual double SAL_CALL getCurveValue( double x )
- throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException) = 0;
+ throw (com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::uno::RuntimeException) = 0;
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::geometry::RealPoint2D > SAL_CALL getCurveValues(
+ virtual com::sun::star::uno::Sequence< com::sun::star::geometry::RealPoint2D > SAL_CALL getCurveValues(
double min,
double max,
- ::sal_Int32 nPointCount,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling >& xScalingX,
- const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XScaling >& xScalingY,
- ::sal_Bool bMaySkipPointsInCalculation )
- throw (::com::sun::star::lang::IllegalArgumentException,
- ::com::sun::star::uno::RuntimeException);
+ sal_Int32 nPointCount,
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScalingX,
+ const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScalingY,
+ sal_Bool bMaySkipPointsInCalculation )
+ throw (com::sun::star::lang::IllegalArgumentException,
+ com::sun::star::uno::RuntimeException);
+
virtual double SAL_CALL getCorrelationCoefficient()
- throw (::com::sun::star::uno::RuntimeException);
+ throw (com::sun::star::uno::RuntimeException);
+
virtual OUString SAL_CALL getRepresentation()
- throw (::com::sun::star::uno::RuntimeException);
+ throw (com::sun::star::uno::RuntimeException);
+
virtual OUString SAL_CALL getFormattedRepresentation(
- const ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier >& xNumFmtSupplier,
- ::sal_Int32 nNumberFormatKey )
- throw (::com::sun::star::uno::RuntimeException);
+ const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >& xNumFmtSupplier,
+ sal_Int32 nNumberFormatKey )
+ throw (com::sun::star::uno::RuntimeException);
};
} // namespace chart