27#include <unonames.hxx>
30#include <com/sun/star/uno/Sequence.hxx>
31#include <com/sun/star/drawing/FillStyle.hpp>
32#include <com/sun/star/drawing/LineStyle.hpp>
33#include <com/sun/star/beans/PropertyAttribute.hpp>
34#include <com/sun/star/chart2/RelativePosition.hpp>
35#include <com/sun/star/awt/Size.hpp>
43using ::com::sun::star::uno::Reference;
44using ::com::sun::star::beans::Property;
45using ::osl::MutexGuard;
55 PROP_EQUATION_SHOW_CORRELATION_COEFF,
56 PROP_EQUATION_MAY_HAVE_CORRELATION_COEFF,
57 PROP_EQUATION_REF_PAGE_SIZE,
58 PROP_EQUATION_REL_POS,
59 PROP_EQUATION_NUMBER_FORMAT
62void lcl_AddPropertiesToVector(
63 std::vector< Property > & rOutProperties )
65 rOutProperties.emplace_back(
"ShowEquation",
68 beans::PropertyAttribute::BOUND
69 | beans::PropertyAttribute::MAYBEDEFAULT );
71 rOutProperties.emplace_back(
"XName",
74 beans::PropertyAttribute::BOUND
75 | beans::PropertyAttribute::MAYBEDEFAULT );
77 rOutProperties.emplace_back(
"YName",
80 beans::PropertyAttribute::BOUND
81 | beans::PropertyAttribute::MAYBEDEFAULT );
83 rOutProperties.emplace_back(
"ShowCorrelationCoefficient",
84 PROP_EQUATION_SHOW_CORRELATION_COEFF,
86 beans::PropertyAttribute::BOUND
87 | beans::PropertyAttribute::MAYBEDEFAULT );
89 rOutProperties.emplace_back(
"MayHaveCorrelationCoefficient",
90 PROP_EQUATION_MAY_HAVE_CORRELATION_COEFF,
92 beans::PropertyAttribute::BOUND
93 | beans::PropertyAttribute::MAYBEDEFAULT );
95 rOutProperties.emplace_back(
"ReferencePageSize",
96 PROP_EQUATION_REF_PAGE_SIZE,
98 beans::PropertyAttribute::BOUND
99 | beans::PropertyAttribute::MAYBEVOID );
101 rOutProperties.emplace_back(
"RelativePosition",
102 PROP_EQUATION_REL_POS,
104 beans::PropertyAttribute::BOUND
105 | beans::PropertyAttribute::MAYBEVOID );
108 PROP_EQUATION_NUMBER_FORMAT,
110 beans::PropertyAttribute::BOUND
111 | beans::PropertyAttribute::MAYBEVOID );
134 float fDefaultCharHeight = 10.0;
140 return aStaticDefaults;
145 static ::cppu::OPropertyArrayHelper aPropHelper =
148 lcl_AddPropertiesToVector( aProperties );
162const uno::Reference< beans::XPropertySetInfo > & GetStaticRegressionEquationInfo()
164 static uno::Reference< beans::XPropertySetInfo > xPropertySetInfo(
166 return xPropertySetInfo;
196 const tPropertyValueMap& rStaticDefaults = GetStaticRegressionEquationDefaults();
197 tPropertyValueMap::const_iterator aFound( rStaticDefaults.find(
nHandle ) );
198 if( aFound == rStaticDefaults.end() )
201 rAny = (*aFound).second;
206 return GetStaticRegressionEquationInfoHelper();
212 return GetStaticRegressionEquationInfo();
271 return "com.sun.star.comp.chart2.RegressionEquation";
281 return {
"com.sun.star.chart2.RegressionEquation",
282 "com.sun.star.beans.PropertySet",
283 "com.sun.star.drawing.FillProperties",
284 "com.sun.star.drawing.LineProperties",
285 "com.sun.star.style.CharacterProperties" };
294extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
296 css::uno::Sequence<css::uno::Any>
const &)
298 return cppu::acquire(new ::chart::RegressionEquation);
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_chart2_RegressionEquation_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
PropertiesInfo aProperties
This helper class serves as forwarder of modify events.
virtual void firePropertyChangeEvent() override
implement this method in derived classes to get called when properties change.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > m_aStrings
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual OUString SAL_CALL getImplementationName() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
implement this method to provide default values for all properties supporting defaults.
virtual void SAL_CALL setText(const css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > &Strings) override
virtual ~RegressionEquation() override
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
virtual css::uno::Sequence< css::uno::Reference< css::chart2::XFormattedString > > SAL_CALL getText() override
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
mutable::osl::Mutex m_aMutex
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
void SAL_CALL disposing()
OOO_DLLPUBLIC_CHARTTOOLS void AddDefaultsToMap(::chart::tPropertyValueMap &rOutMap)
@ PROP_CHAR_COMPLEX_CHAR_HEIGHT
@ PROP_CHAR_ASIAN_CHAR_HEIGHT
OOO_DLLPUBLIC_CHARTTOOLS void AddPropertiesToVector(std::vector< css::beans::Property > &rOutProperties)
void removeListenerFromAllElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void addListenerToAllElements(const Container &rContainer, const css::uno::Reference< css::util::XModifyListener > &xListener)
void setPropertyValueDefault(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Calls setPropertyValue() but asserts that the given property hasn't been set before.
void setPropertyValue(tPropertyValueMap &rOutMap, tPropertyValueMapKey key, const Value &value)
Set a property to a certain value in the given map.
::cppu::WeakImplHelper< css::lang::XServiceInfo, css::util::XCloneable, css::util::XModifyBroadcaster, css::util::XModifyListener, css::chart2::XTitle > RegressionEquation_Base
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
DstType sequenceToContainer(const css::uno::Sequence< SrcType > &i_Sequence)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
constexpr OUStringLiteral CHART_UNONAME_NUMFMT