fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / inc / RegressionCurveCalculator.hxx
blob403eb01dc844baca5b7019075bace2991ccc1d5c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVECALCULATOR_HXX
20 #define INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVECALCULATOR_HXX
22 #include <cppuhelper/implbase1.hxx>
24 #include <com/sun/star/chart2/XRegressionCurveCalculator.hpp>
25 #include <com/sun/star/util/XNumberFormatter.hpp>
27 namespace chart
30 class RegressionCurveCalculator : public
31 cppu::WeakImplHelper1< com::sun::star::chart2::XRegressionCurveCalculator >
33 public:
34 RegressionCurveCalculator();
35 virtual ~RegressionCurveCalculator();
37 static bool isLinearScaling(
38 const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScaling );
40 static bool isLogarithmicScaling(
41 const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScaling );
43 protected:
44 virtual OUString ImplGetRepresentation(
45 const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter >& xNumFormatter,
46 sal_Int32 nNumberFormatKey ) const = 0;
48 static OUString getFormattedString(
49 const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatter >& xNumFormatter,
50 sal_Int32 nNumberFormatKey,
51 double fNumber );
53 double m_fCorrelationCoeffitient;
55 sal_Int32 mDegree;
56 bool mForceIntercept;
57 double mInterceptValue;
58 sal_Int32 mPeriod;
60 // ____ XRegressionCurveCalculator ____
61 virtual void SAL_CALL setRegressionProperties(
62 sal_Int32 aDegree,
63 sal_Bool aForceIntercept,
64 double aInterceptValue,
65 sal_Int32 aPeriod)
66 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
68 virtual void SAL_CALL recalculateRegression(
69 const com::sun::star::uno::Sequence< double >& aXValues,
70 const com::sun::star::uno::Sequence< double >& aYValues )
71 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
73 virtual double SAL_CALL getCurveValue( double x )
74 throw (com::sun::star::lang::IllegalArgumentException,
75 com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
77 virtual com::sun::star::uno::Sequence< com::sun::star::geometry::RealPoint2D > SAL_CALL getCurveValues(
78 double min,
79 double max,
80 sal_Int32 nPointCount,
81 const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScalingX,
82 const com::sun::star::uno::Reference< com::sun::star::chart2::XScaling >& xScalingY,
83 sal_Bool bMaySkipPointsInCalculation )
84 throw (com::sun::star::lang::IllegalArgumentException,
85 com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
87 virtual double SAL_CALL getCorrelationCoefficient()
88 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 virtual OUString SAL_CALL getRepresentation()
91 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 virtual OUString SAL_CALL getFormattedRepresentation(
94 const com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >& xNumFmtSupplier,
95 sal_Int32 nNumberFormatKey )
96 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 } // namespace chart
101 // INCLUDED_CHART2_SOURCE_INC_REGRESSIONCURVECALCULATOR_HXX
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */