LibreOffice Module chart2 (master) 1
Functions
chart::RegressionCurveHelper Namespace Reference

Functions

rtl::Reference<::chart::RegressionCurveModelcreateMeanValueLine ()
 returns a model mean-value line More...
 
rtl::Reference<::chart::RegressionCurveModelcreateRegressionCurveByServiceName (std::u16string_view aServiceName)
 returns a model regression curve More...
 
OOO_DLLPUBLIC_CHARTTOOLS bool hasMeanValueLine (const css::uno::Reference< css::chart2::XRegressionCurveContainer > &xRegCnt)
 
OOO_DLLPUBLIC_CHARTTOOLS bool hasMeanValueLine (const rtl::Reference<::chart::DataSeries > &xRegCnt)
 
OOO_DLLPUBLIC_CHARTTOOLS bool isMeanValueLine (const css::uno::Reference< css::chart2::XRegressionCurve > &xRegCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS bool isMeanValueLine (const rtl::Reference<::chart::RegressionCurveModel > &xRegCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModelgetMeanValueLine (const css::uno::Reference< css::chart2::XRegressionCurveContainer > &xRegCnt)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModelgetMeanValueLine (const rtl::Reference<::chart::DataSeries > &xRegCnt)
 
OOO_DLLPUBLIC_CHARTTOOLS void addMeanValueLine (css::uno::Reference< css::chart2::XRegressionCurveContainer > const &xRegCnt, const css::uno::Reference< css::beans::XPropertySet > &xSeriesProp)
 creates a mean-value line and adds it to the container. More...
 
OOO_DLLPUBLIC_CHARTTOOLS void addMeanValueLine (rtl::Reference<::chart::DataSeries > const &xRegCnt, const css::uno::Reference< css::beans::XPropertySet > &xSeriesProp)
 
OOO_DLLPUBLIC_CHARTTOOLS void removeMeanValueLine (css::uno::Reference< css::chart2::XRegressionCurveContainer > const &xRegCnt)
 
OOO_DLLPUBLIC_CHARTTOOLS void removeMeanValueLine (rtl::Reference<::chart::DataSeries > const &xRegCnt)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModelgetFirstCurveNotMeanValueLine (const css::uno::Reference< css::chart2::XRegressionCurveContainer > &xCurveContainer)
 Returns the first regression curve found that is not of type mean-value line. More...
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModelgetFirstCurveNotMeanValueLine (const rtl::Reference<::chart::DataSeries > &xCurveContainer)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModelgetRegressionCurveAtIndex (const rtl::Reference<::chart::DataSeries > &xCurveContainer, sal_Int32 aIndex)
 Returns the regression curve found at the index provided. More...
 
OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getFirstRegressTypeNotMeanValueLine (const css::uno::Reference< css::chart2::XRegressionCurveContainer > &xCurveContainer)
 Returns the type of the first regression curve found that is not of type mean-value line. More...
 
OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getRegressionType (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModeladdRegressionCurve (SvxChartRegress eType, css::uno::Reference< css::chart2::XRegressionCurveContainer > 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 rtl::Reference<::chart::RegressionCurveModeladdRegressionCurve (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 (rtl::Reference<::chart::DataSeries > const &xCurveContainer)
 
OOO_DLLPUBLIC_CHARTTOOLS void removeEquations (rtl::Reference<::chart::DataSeries > const &xCurveContainer)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModelchangeRegressionCurveType (SvxChartRegress eType, css::uno::Reference< css::chart2::XRegressionCurveContainer > const &xRegressionCurveContainer, css::uno::Reference< css::chart2::XRegressionCurve > const &xRegressionCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveCalculatorcreateRegressionCurveCalculatorByServiceName (std::u16string_view aServiceName)
 returns a calculator object for regression curves (used by the view) More...
 
void initializeCurveCalculator (const css::uno::Reference< css::chart2::XRegressionCurveCalculator > &xOutCurveCalculator, const css::uno::Reference< css::chart2::data::XDataSource > &xSource, bool bUseXValuesIfAvailable)
 recalculates the regression parameters according to the data given in the data source. More...
 
OOO_DLLPUBLIC_CHARTTOOLS void initializeCurveCalculator (const css::uno::Reference< css::chart2::XRegressionCurveCalculator > &xOutCurveCalculator, const rtl::Reference<::chart::DataSeries > &xSeries, const rtl::Reference<::chart::ChartModel > &xModel)
 Same method as above, but uses the given XModel to determine the parameter bUseXValuesIfAvailable in the above function. More...
 
OOO_DLLPUBLIC_CHARTTOOLS OUString getUINameForRegressionCurve (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveName (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveGenericName (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS OUString getRegressionCurveSpecificName (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 
OOO_DLLPUBLIC_CHARTTOOLS void resetEquationPosition (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 
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)
 
OOO_DLLPUBLIC_CHARTTOOLS bool MayHaveCorrelationCoefficient (const css::uno::Reference< css::chart2::XRegressionCurve > &xCurve)
 

Function Documentation

◆ addMeanValueLine() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::addMeanValueLine ( css::uno::Reference< css::chart2::XRegressionCurveContainer > const &  xRegCnt,
const css::uno::Reference< css::beans::XPropertySet > &  xSeriesProp 
)

creates a mean-value line and adds it to the container.

Parameters
xSeriesPropIf set, this property-set will be used to apply a line color

Referenced by chart::wrapper::StatisticsItemConverter::ApplySpecialItem().

◆ addMeanValueLine() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::addMeanValueLine ( rtl::Reference<::chart::DataSeries > const &  xRegCnt,
const css::uno::Reference< css::beans::XPropertySet > &  xSeriesProp 
)

◆ addRegressionCurve() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::addRegressionCurve ( SvxChartRegress  eType,
css::uno::Reference< css::chart2::XRegressionCurveContainer > 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 >() 
)
Parameters
xPropertySourceis taken as source to copy all properties from if not null
xEquationPropertiesis set at the new regression curve as equation properties if not null

Referenced by chart::ChartController::executeDispatch_InsertTrendline().

◆ addRegressionCurve() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::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 >() 
)

◆ changeRegressionCurveType()

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::changeRegressionCurveType ( SvxChartRegress  eType,
css::uno::Reference< css::chart2::XRegressionCurveContainer > const &  xRegressionCurveContainer,
css::uno::Reference< css::chart2::XRegressionCurve > const &  xRegressionCurve 
)

◆ createMeanValueLine()

rtl::Reference< RegressionCurveModel > chart::RegressionCurveHelper::createMeanValueLine ( )

returns a model mean-value line

Definition at line 99 of file RegressionCurveHelper.cxx.

◆ createRegressionCurveByServiceName()

rtl::Reference< RegressionCurveModel > chart::RegressionCurveHelper::createRegressionCurveByServiceName ( std::u16string_view  aServiceName)

returns a model regression curve

Definition at line 104 of file RegressionCurveHelper.cxx.

References u.

◆ createRegressionCurveCalculatorByServiceName()

rtl::Reference< RegressionCurveCalculator > chart::RegressionCurveHelper::createRegressionCurveCalculatorByServiceName ( std::u16string_view  aServiceName)

returns a calculator object for regression curves (used by the view)

Definition at line 138 of file RegressionCurveHelper.cxx.

References u.

Referenced by chart::RegressionCurveModel::getCalculator(), chart::VDataSeries::getXMeanValue(), and chart::VDataSeries::getYMeanValue().

◆ getFirstCurveNotMeanValueLine() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::getFirstCurveNotMeanValueLine ( const css::uno::Reference< css::chart2::XRegressionCurveContainer > &  xCurveContainer)

Returns the first regression curve found that is not of type mean-value line.

Referenced by chart::ChartController::execute_Command(), and chart::ChartController::executeDispatch_InsertTrendlineEquation().

◆ getFirstCurveNotMeanValueLine() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::getFirstCurveNotMeanValueLine ( const rtl::Reference<::chart::DataSeries > &  xCurveContainer)

◆ getFirstRegressTypeNotMeanValueLine()

OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress chart::RegressionCurveHelper::getFirstRegressTypeNotMeanValueLine ( const css::uno::Reference< css::chart2::XRegressionCurveContainer > &  xCurveContainer)

Returns the type of the first regression curve found that is not of type mean-value line.

Referenced by chart::wrapper::StatisticsItemConverter::FillSpecialItem().

◆ getMeanValueLine() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::getMeanValueLine ( const css::uno::Reference< css::chart2::XRegressionCurveContainer > &  xRegCnt)

◆ getMeanValueLine() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::getMeanValueLine ( const rtl::Reference<::chart::DataSeries > &  xRegCnt)

◆ getRegressionCurveAtIndex()

OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveModel > chart::RegressionCurveHelper::getRegressionCurveAtIndex ( const rtl::Reference<::chart::DataSeries > &  xCurveContainer,
sal_Int32  aIndex 
)

Returns the regression curve found at the index provided.

Referenced by chart::ObjectNameProvider::getHelpText(), and chart::ObjectNameProvider::getNameForCID().

◆ getRegressionCurveGenericName()

OOO_DLLPUBLIC_CHARTTOOLS OUString chart::RegressionCurveHelper::getRegressionCurveGenericName ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ getRegressionCurveIndex()

OOO_DLLPUBLIC_CHARTTOOLS sal_Int32 chart::RegressionCurveHelper::getRegressionCurveIndex ( const rtl::Reference<::chart::DataSeries > &  xContainer,
const rtl::Reference<::chart::RegressionCurveModel > &  xCurve 
)
Returns
the index of the given curve in the given container. -1 if not contained

Referenced by chart::ChartController::executeDispatch_InsertTrendline().

◆ getRegressionCurveName()

OOO_DLLPUBLIC_CHARTTOOLS OUString chart::RegressionCurveHelper::getRegressionCurveName ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ getRegressionCurveSpecificName()

OOO_DLLPUBLIC_CHARTTOOLS OUString chart::RegressionCurveHelper::getRegressionCurveSpecificName ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ getRegressionType()

OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress chart::RegressionCurveHelper::getRegressionType ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ getUINameForRegressionCurve()

OOO_DLLPUBLIC_CHARTTOOLS OUString chart::RegressionCurveHelper::getUINameForRegressionCurve ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ hasEquation()

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::hasEquation ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ hasMeanValueLine() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::hasMeanValueLine ( const css::uno::Reference< css::chart2::XRegressionCurveContainer > &  xRegCnt)

◆ hasMeanValueLine() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::hasMeanValueLine ( const rtl::Reference<::chart::DataSeries > &  xRegCnt)

◆ initializeCurveCalculator() [1/2]

void chart::RegressionCurveHelper::initializeCurveCalculator ( const css::uno::Reference< css::chart2::XRegressionCurveCalculator > &  xOutCurveCalculator,
const css::uno::Reference< css::chart2::data::XDataSource > &  xSource,
bool  bUseXValuesIfAvailable 
)

recalculates the regression parameters according to the data given in the data source.

A sequence having the role "values-x" will be used as x-values for the calculation if found. Otherwise a sequence (1, 2, 3, ...) of category indexes will be used for the recalculateRegression() method of the regression curve.

The first sequence having the role "values-y" will be used as y-values for the recalculateRegression() method of the regression curve.

Parameters
bUseXValuesIfAvailableIf false, the sequence (1, 2, 3, ...) will always be used, even if there is a data-sequence with role "values-x"

Referenced by chart::ObjectNameProvider::getHelpText().

◆ initializeCurveCalculator() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::initializeCurveCalculator ( const css::uno::Reference< css::chart2::XRegressionCurveCalculator > &  xOutCurveCalculator,
const rtl::Reference<::chart::DataSeries > &  xSeries,
const rtl::Reference<::chart::ChartModel > &  xModel 
)

Same method as above, but uses the given XModel to determine the parameter bUseXValuesIfAvailable in the above function.

It is also necessary that the data::XDataSource is an XDataSeries, thus this parameter also changed.

◆ isMeanValueLine() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::isMeanValueLine ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xRegCurve)

◆ isMeanValueLine() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::isMeanValueLine ( const rtl::Reference<::chart::RegressionCurveModel > &  xRegCurve)

◆ MayHaveCorrelationCoefficient()

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::MayHaveCorrelationCoefficient ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)

◆ removeAllExceptMeanValueLine()

OOO_DLLPUBLIC_CHARTTOOLS bool chart::RegressionCurveHelper::removeAllExceptMeanValueLine ( rtl::Reference<::chart::DataSeries > const &  xCurveContainer)

◆ removeEquations()

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::removeEquations ( rtl::Reference<::chart::DataSeries > const &  xCurveContainer)

◆ removeMeanValueLine() [1/2]

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::removeMeanValueLine ( css::uno::Reference< css::chart2::XRegressionCurveContainer > const &  xRegCnt)

◆ removeMeanValueLine() [2/2]

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::removeMeanValueLine ( rtl::Reference<::chart::DataSeries > const &  xRegCnt)

◆ resetEquationPosition()

OOO_DLLPUBLIC_CHARTTOOLS void chart::RegressionCurveHelper::resetEquationPosition ( const css::uno::Reference< css::chart2::XRegressionCurve > &  xCurve)