27#include <com/sun/star/beans/PropertyAttribute.hpp>
28#include <com/sun/star/drawing/LineStyle.hpp>
29#include <com/sun/star/uno/XComponentContext.hpp>
36using ::com::sun::star::beans::Property;
37using ::com::sun::star::uno::Sequence;
38using ::com::sun::star::uno::Reference;
45 PROP_AREA_TEMPLATE_DIMENSION
48void lcl_AddPropertiesToVector(
49 std::vector< Property > & rOutProperties )
51 rOutProperties.emplace_back(
"Dimension",
52 PROP_AREA_TEMPLATE_DIMENSION,
54 beans::PropertyAttribute::BOUND
55 | beans::PropertyAttribute::MAYBEDEFAULT );
60 static ::cppu::OPropertyArrayHelper aPropHelper = []()
63 lcl_AddPropertiesToVector( aProperties );
80 uno::XComponentContext >
const & xContext,
81 const OUString & rServiceName,
99 ::chart::PropertyHelper::setPropertyValueDefault< sal_Int32 >( aTmp, PROP_AREA_TEMPLATE_DIMENSION, 2 );
102 tPropertyValueMap::const_iterator aFound( aStaticDefaults.find(
nHandle ) );
103 if( aFound == aStaticDefaults.end() )
106 rAny = (*aFound).second;
111 return StaticAreaChartTypeTemplateInfoHelper();
119 return xPropertySetInfo;
131 catch(
const beans::UnknownPropertyException & )
147 ::sal_Int32 nChartTypeIndex,
148 ::sal_Int32 nSeriesIndex,
149 ::sal_Int32 nSeriesCount )
158 std::vector< rtl::Reference< ::chart::DataSeries > > aSeriesVec(
159 xDiagram->getDataSeries());
160 uno::Any aLineStyleAny( drawing::LineStyle_NONE );
161 for (
auto const& series : aSeriesVec)
163 if( series->getPropertyValue(
"BorderStyle") == aLineStyleAny )
165 series->setPropertyToDefault(
"BorderStyle");
const StackMode m_eStackMode
PropertiesInfo aProperties
virtual rtl::Reference< ::chart::ChartType > getChartTypeForIndex(sal_Int32 nChartTypeIndex) override
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual ~AreaChartTypeTemplate() override
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
merge XInterface implementations
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount) override
virtual StackMode getStackMode(sal_Int32 nChartTypeIndex) const override
returns StackMode::NONE by default.
AreaChartTypeTemplate(css::uno::Reference< css::uno::XComponentContext > const &xContext, const OUString &rServiceName, StackMode eStackMode, sal_Int32 nDim=2)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual sal_Int32 getDimension() const override
returns 2 by default. Supported are 2 and 3
virtual rtl::Reference< ::chart::ChartType > getChartTypeForNewSeries2(const std::vector< rtl::Reference< ::chart::ChartType > > &aFormerlyUsedChartTypes) override
For creating diagrams and modifying existing diagrams.
static void copyPropertiesFromOldToNewCoordinateSystem(const std::vector< rtl::Reference< ChartType > > &rOldChartTypesSeq, const rtl::Reference< ChartType > &xNewChartType)
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount)
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram)
static css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL createPropertySetInfo(IPropertyArrayHelper &rProperties)
virtual void SAL_CALL getFastPropertyValue(css::uno::Any &rValue, sal_Int32 nHandle) const override
The same as getFastPropertyValue, but return the value through rValue and nHandle is always valid.
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
The same as setFastPropertyValue; nHandle is always valid.
#define DBG_UNHANDLED_EXCEPTION(...)
OOO_DLLPUBLIC_CHARTTOOLS void setPropertyAlsoToAllAttributedDataPoints(const rtl::Reference< ::chart::DataSeries > &xSeries, const OUString &rPropertyName, const css::uno::Any &rPropertyValue)
std::unordered_map< tPropertyValueMapKey, css::uno::Any > tPropertyValueMap
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
IMPLEMENT_FORWARD_XTYPEPROVIDER2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)
IMPLEMENT_FORWARD_XINTERFACE2(ChildWindowPane, ChildWindowPaneInterfaceBase, Pane)