29#include <com/sun/star/beans/PropertyAttribute.hpp>
35using ::com::sun::star::beans::Property;
43 PROPERTY_EXTRAPOLATE_FORWARD,
44 PROPERTY_EXTRAPOLATE_BACKWARD,
45 PROPERTY_FORCE_INTERCEPT,
46 PROPERTY_INTERCEPT_VALUE,
48 PROPERTY_MOVING_AVERAGE_TYPE
51void lcl_AddPropertiesToVector(
52 std::vector< Property > & rOutProperties )
54 rOutProperties.emplace_back(
"PolynomialDegree",
57 beans::PropertyAttribute::BOUND |
58 beans::PropertyAttribute::MAYBEDEFAULT );
60 rOutProperties.emplace_back(
"MovingAveragePeriod",
63 beans::PropertyAttribute::BOUND |
64 beans::PropertyAttribute::MAYBEDEFAULT );
66 rOutProperties.emplace_back(
"MovingAverageType",
67 PROPERTY_MOVING_AVERAGE_TYPE,
69 beans::PropertyAttribute::BOUND |
70 beans::PropertyAttribute::MAYBEDEFAULT );
72 rOutProperties.emplace_back(
"ExtrapolateForward",
73 PROPERTY_EXTRAPOLATE_FORWARD,
75 beans::PropertyAttribute::BOUND |
76 beans::PropertyAttribute::MAYBEDEFAULT );
78 rOutProperties.emplace_back(
"ExtrapolateBackward",
79 PROPERTY_EXTRAPOLATE_BACKWARD,
81 beans::PropertyAttribute::BOUND |
82 beans::PropertyAttribute::MAYBEDEFAULT );
84 rOutProperties.emplace_back(
"ForceIntercept",
85 PROPERTY_FORCE_INTERCEPT,
87 beans::PropertyAttribute::BOUND
88 | beans::PropertyAttribute::MAYBEDEFAULT );
90 rOutProperties.emplace_back(
"InterceptValue",
91 PROPERTY_INTERCEPT_VALUE,
93 beans::PropertyAttribute::BOUND |
94 beans::PropertyAttribute::MAYBEDEFAULT );
96 rOutProperties.emplace_back(
"CurveName",
99 beans::PropertyAttribute::BOUND );
110 return aStaticDefaults;
115 static ::cppu::OPropertyArrayHelper aPropHelper =
118 lcl_AddPropertiesToVector( aProperties );
129uno::Reference< beans::XPropertySetInfo >& GetStaticRegressionCurveInfo()
131 static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
133 return xPropertySetInfo;
142 m_eRegressionCurveType( eCurveType ),
156 m_eRegressionCurveType( rOther.m_eRegressionCurveType ),
180 if( xEquationProperties.is())
206 return "com.sun.star.chart2.MeanValueRegressionCurve";
208 return "com.sun.star.chart2.LinearRegressionCurve";
210 return "com.sun.star.chart2.LogarithmicRegressionCurve";
212 return "com.sun.star.chart2.ExponentialRegressionCurve";
214 return "com.sun.star.chart2.PotentialRegressionCurve";
216 return "com.sun.star.chart2.PolynomialRegressionCurve";
218 return "com.sun.star.chart2.MovingAverageRegressionCurve";
263 tPropertyValueMap::const_iterator aFound( rStaticDefaults.find(
nHandle ) );
264 if( aFound == rStaticDefaults.end() )
267 rAny = (*aFound).second;
272 return GetStaticRegressionCurveInfoHelper();
278 return GetStaticRegressionCurveInfo();
301 return "com.sun.star.comp.chart2.MeanValueRegressionCurve";
311 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.MeanValueRegressionCurve" };
331 return "com.sun.star.comp.chart2.LinearRegressionCurve";
341 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.LinearRegressionCurve" };
361 return "com.sun.star.comp.chart2.LogarithmicRegressionCurve";
371 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.LogarithmicRegressionCurve" };
391 return "com.sun.star.comp.chart2.ExponentialRegressionCurve";
401 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.ExponentialRegressionCurve" };
421 return "com.sun.star.comp.chart2.PotentialRegressionCurve";
431 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.PotentialRegressionCurve" };
451 return "com.sun.star.comp.chart2.PolynomialRegressionCurve";
461 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.PolynomialRegressionCurve" };
481 return "com.sun.star.comp.chart2.MovingAverageRegressionCurve";
491 return {
"com.sun.star.chart2.RegressionCurve",
"com.sun.star.chart2.MovingAverageRegressionCurve" };
501extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
503 css::uno::Sequence<css::uno::Any>
const &)
505 return cppu::acquire(new ::chart::ExponentialRegressionCurve );
508extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
510 css::uno::Sequence<css::uno::Any>
const &)
512 return cppu::acquire(new ::chart::LinearRegressionCurve );
515extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
517 css::uno::Sequence<css::uno::Any>
const &)
519 return cppu::acquire(new ::chart::LogarithmicRegressionCurve );
522extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
524 css::uno::Sequence<css::uno::Any>
const &)
526 return cppu::acquire(new ::chart::MeanValueRegressionCurve );
529extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
531 css::uno::Sequence<css::uno::Any>
const &)
533 return cppu::acquire(new ::chart::PotentialRegressionCurve );
536extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
538 css::uno::Sequence<css::uno::Any>
const &)
540 return cppu::acquire(new ::chart::PolynomialRegressionCurve );
543extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
545 css::uno::Sequence<css::uno::Any>
const &)
547 return cppu::acquire(new ::chart::MovingAverageRegressionCurve );
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_PotentialRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_MovingAverageRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_PolynomialRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_ExponentialRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_LinearRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_MeanValueRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_LogarithmicRegressionCurve_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
PropertiesInfo aProperties
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
ExponentialRegressionCurve()
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~ExponentialRegressionCurve() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual ~LinearRegressionCurve() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
LogarithmicRegressionCurve()
virtual ~LogarithmicRegressionCurve() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual ~MeanValueRegressionCurve() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
MeanValueRegressionCurve()
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
This helper class serves as forwarder of modify events.
MovingAverageRegressionCurve()
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual ~MovingAverageRegressionCurve() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual ~PolynomialRegressionCurve() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
PolynomialRegressionCurve()
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual ~PotentialRegressionCurve() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
PotentialRegressionCurve()
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
void setPropertyMayHaveR2()
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getEquationProperties() override
@ CURVE_TYPE_MOVING_AVERAGE
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual css::uno::Reference< css::chart2::XRegressionCurveCalculator > SAL_CALL getCalculator() override
RegressionCurveModel(tCurveType eCurveType)
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
const tCurveType m_eRegressionCurveType
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
merge XInterface implementations
css::uno::Reference< css::beans::XPropertySet > m_xEquationProperties
virtual void SAL_CALL setEquationProperties(const css::uno::Reference< css::beans::XPropertySet > &xEquationProperties) override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual ~RegressionCurveModel() override
virtual OUString SAL_CALL getServiceName() override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual void firePropertyChangeEvent() override
implement this method in derived classes to get called when properties change.
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
void SAL_CALL disposing()
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
The same as setFastPropertyValue; nHandle is always valid.
OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap(::chart::tPropertyValueMap &rOutMap)
OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(std::vector< css::beans::Property > &rOutProperties)
void removeListener(const InterfaceRef &xObject, const css::uno::Reference< css::util::XModifyListener > &xListener)
void addListener(const InterfaceRef &xObject, const css::uno::Reference< css::util::XModifyListener > &xListener)
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference<::chart::RegressionCurveCalculator > createRegressionCurveCalculatorByServiceName(std::u16string_view aServiceName)
returns a calculator object for regression curves (used by the view)
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::lang::XServiceName, css::chart2::XRegressionCurve, css::util::XCloneable, css::util::XModifyBroadcaster, css::util::XModifyListener > RegressionCurveModel_Base
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
functor that clones a UNO-Reference