diff options
Diffstat (limited to 'chart2/source/inc/RegressionCurveHelper.hxx')
-rw-r--r-- | chart2/source/inc/RegressionCurveHelper.hxx | 96 |
1 files changed, 61 insertions, 35 deletions
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx index 83fc72e65649..fc0c2abcd5b7 100644 --- a/chart2/source/inc/RegressionCurveHelper.hxx +++ b/chart2/source/inc/RegressionCurveHelper.hxx @@ -18,8 +18,10 @@ */ #pragma once +#include <config_options.h> #include <svx/chrtitem.hxx> #include "charttoolsdllapi.hxx" +#include <rtl/ref.hxx> #include <vector> @@ -31,59 +33,78 @@ namespace com::sun::star::chart2 { class XRegressionCurveCalculator; } namespace com::sun::star::chart2 { class XRegressionCurveContainer; } namespace com::sun::star::chart2::data { class XDataSource; } namespace com::sun::star::frame { class XModel; } +namespace chart { class ChartModel; } +namespace chart { class DataSeries; } +namespace chart { class RegressionCurveModel; } +namespace chart { class RegressionCurveCalculator; } namespace chart::RegressionCurveHelper { /// returns a model mean-value line - css::uno::Reference<css::chart2::XRegressionCurve> createMeanValueLine(); + rtl::Reference<::chart::RegressionCurveModel> createMeanValueLine(); /// returns a model regression curve - css::uno::Reference<css::chart2::XRegressionCurve> + rtl::Reference<::chart::RegressionCurveModel> createRegressionCurveByServiceName( std::u16string_view aServiceName ); - OOO_DLLPUBLIC_CHARTTOOLS bool hasMeanValueLine( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasMeanValueLine( const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasMeanValueLine( + const rtl::Reference<::chart::DataSeries> & xRegCnt ); - OOO_DLLPUBLIC_CHARTTOOLS bool isMeanValueLine( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool isMeanValueLine( const css::uno::Reference<css::chart2::XRegressionCurve> & xRegCurve ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool isMeanValueLine( + const rtl::Reference<::chart::RegressionCurveModel> & xRegCurve ); - OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve> + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> getMeanValueLine( const css::uno::Reference<css::chart2::XRegressionCurveContainer> & xRegCnt ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> + getMeanValueLine( + const rtl::Reference<::chart::DataSeries> & xRegCnt ); /** creates a mean-value line and adds it to the container. @param xSeriesProp If set, this property-set will be used to apply a line color */ - OOO_DLLPUBLIC_CHARTTOOLS void addMeanValueLine( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void addMeanValueLine( css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegCnt, const css::uno::Reference<css::beans::XPropertySet>& xSeriesProp ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void addMeanValueLine( + rtl::Reference<::chart::DataSeries> const & xRegCnt, + const css::uno::Reference<css::beans::XPropertySet>& xSeriesProp ); - OOO_DLLPUBLIC_CHARTTOOLS void removeMeanValueLine( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeMeanValueLine( css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegCnt ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeMeanValueLine( + rtl::Reference<::chart::DataSeries> const & xRegCnt ); /** Returns the first regression curve found that is not of type mean-value line */ - OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve> + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> getFirstCurveNotMeanValueLine( const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> + getFirstCurveNotMeanValueLine( + const rtl::Reference<::chart::DataSeries>& xCurveContainer ); /** Returns the regression curve found at the index provided. */ - OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve> + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> getRegressionCurveAtIndex( - const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer, + const rtl::Reference<::chart::DataSeries>& xCurveContainer, sal_Int32 aIndex); /** Returns the type of the first regression curve found that is not of type mean-value line */ - OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getFirstRegressTypeNotMeanValueLine( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SvxChartRegress getFirstRegressTypeNotMeanValueLine( const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer ); - OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getRegressionType( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) SvxChartRegress getRegressionType( const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); /** @param xPropertySource is taken as source to copy all properties from if @@ -91,7 +112,7 @@ namespace chart::RegressionCurveHelper @param xEquationProperties is set at the new regression curve as equation properties if not null */ - OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve> + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> addRegressionCurve( SvxChartRegress eType, css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer, @@ -99,21 +120,29 @@ namespace chart::RegressionCurveHelper css::uno::Reference<css::beans::XPropertySet>(), const css::uno::Reference<css::beans::XPropertySet>& xEquationProperties = css::uno::Reference<css::beans::XPropertySet>() ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> + addRegressionCurve( + SvxChartRegress eType, + rtl::Reference<::chart::DataSeries> const & xCurveContainer, + const css::uno::Reference<css::beans::XPropertySet >& xPropertySource = + css::uno::Reference<css::beans::XPropertySet>(), + const css::uno::Reference<css::beans::XPropertySet>& xEquationProperties = + css::uno::Reference<css::beans::XPropertySet>() ); - OOO_DLLPUBLIC_CHARTTOOLS bool removeAllExceptMeanValueLine( - css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool removeAllExceptMeanValueLine( + rtl::Reference<::chart::DataSeries> const & xCurveContainer ); - OOO_DLLPUBLIC_CHARTTOOLS void removeEquations( - css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xCurveContainer ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void removeEquations( + rtl::Reference<::chart::DataSeries> const & xCurveContainer ); - OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurve> + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveModel> changeRegressionCurveType( SvxChartRegress eType, css::uno::Reference<css::chart2::XRegressionCurveContainer> const & xRegressionCurveContainer, css::uno::Reference<css::chart2::XRegressionCurve> const & xRegressionCurve ); /// returns a calculator object for regression curves (used by the view) - OOO_DLLPUBLIC_CHARTTOOLS css::uno::Reference<css::chart2::XRegressionCurveCalculator> + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) rtl::Reference<::chart::RegressionCurveCalculator> createRegressionCurveCalculatorByServiceName( std::u16string_view aServiceName ); /** recalculates the regression parameters according to the data given in @@ -141,36 +170,33 @@ namespace chart::RegressionCurveHelper necessary that the data::XDataSource is an XDataSeries, thus this parameter also changed. */ - OOO_DLLPUBLIC_CHARTTOOLS void initializeCurveCalculator( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void initializeCurveCalculator( const css::uno::Reference<css::chart2::XRegressionCurveCalculator>& xOutCurveCalculator, - const css::uno::Reference<css::chart2::XDataSeries>& xSeries, - const css::uno::Reference<css::frame::XModel>& xModel ); + const rtl::Reference<::chart::DataSeries>& xSeries, + const rtl::Reference<::chart::ChartModel>& xModel ); - OOO_DLLPUBLIC_CHARTTOOLS OUString getUINameForRegressionCurve( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getUINameForRegressionCurve( const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); - OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveName( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveName( const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); - OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveGenericName( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveGenericName( const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); - OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveSpecificName( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) OUString getRegressionCurveSpecificName( const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); - OOO_DLLPUBLIC_CHARTTOOLS std::vector<css::uno::Reference<css::chart2::XRegressionCurve> > - getAllRegressionCurvesNotMeanValueLine( - const css::uno::Reference<css::chart2::XDiagram>& xDiagram ); - - OOO_DLLPUBLIC_CHARTTOOLS void resetEquationPosition( + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) void resetEquationPosition( const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); /// @return the index of the given curve in the given container. -1 if not contained - OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 getRegressionCurveIndex( - const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xContainer, - const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) sal_Int32 getRegressionCurveIndex( + const rtl::Reference<::chart::DataSeries>& xContainer, + const rtl::Reference<::chart::RegressionCurveModel>& xCurve ); - OOO_DLLPUBLIC_CHARTTOOLS bool hasEquation(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool hasEquation(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); + UNLESS_MERGELIBS(OOO_DLLPUBLIC_CHARTTOOLS) bool MayHaveCorrelationCoefficient(const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve ); } // namespace chart |