28#include <com/sun/star/chart2/SymbolStyle.hpp>
29#include <com/sun/star/chart2/Symbol.hpp>
30#include <com/sun/star/drawing/LineStyle.hpp>
31#include <com/sun/star/uno/XComponentContext.hpp>
36using ::com::sun::star::uno::Reference;
43 const OUString & rServiceName,
47 bool bHasFilledArea ) :
50 m_bHasSymbols( bSymbols ),
51 m_bHasLines( bHasLines ),
52 m_bHasFilledArea( bHasFilledArea )
65 ::sal_Int32 nChartTypeIndex,
66 ::sal_Int32 nSeriesIndex,
67 ::sal_Int32 nSeriesCount )
77 catch(
const uno::Exception & )
86 bool bAdaptProperties )
99 bool bSymbolFound =
false;
100 bool bLineFound =
false;
102 std::vector< rtl::Reference< DataSeries > > aSeriesVec =
103 xDiagram->getDataSeries();
105 for (
auto const& series : aSeriesVec)
109 chart2::Symbol aSymbProp;
110 drawing::LineStyle eLineStyle;
112 bool bCurrentHasSymbol = (series->getPropertyValue(
"Symbol") >>= aSymbProp) &&
113 (aSymbProp.Style != chart2::SymbolStyle_NONE);
115 if( bCurrentHasSymbol )
124 bool bCurrentHasLine = (series->getPropertyValue(
"LineStyle") >>= eLineStyle) &&
125 ( eLineStyle != drawing::LineStyle_NONE );
127 if( bCurrentHasLine )
136 catch(
const uno::Exception & )
148 else if( !bLineFound && !bSymbolFound )
const StackMode m_eStackMode
For creating diagrams and modifying existing diagrams.
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties)
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 applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount) override
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties) override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForIndex(sal_Int32 nChartTypeIndex) override
NetChartTypeTemplate(css::uno::Reference< css::uno::XComponentContext > const &xContext, const OUString &rServiceName, StackMode eStackMode, bool bSymbols, bool bHasLines=true, bool bHasFilledArea=false)
virtual StackMode getStackMode(sal_Int32 nChartTypeIndex) const override
returns StackMode::NONE by default.
virtual ~NetChartTypeTemplate() override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForNewSeries2(const std::vector< rtl::Reference< ::chart::ChartType > > &aFormerlyUsedChartTypes) override
#define DBG_UNHANDLED_EXCEPTION(...)
OOO_DLLPUBLIC_CHARTTOOLS void switchLinesOnOrOff(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bLinesOn)
OOO_DLLPUBLIC_CHARTTOOLS void makeLinesThickOrThin(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bThick)
OOO_DLLPUBLIC_CHARTTOOLS void switchSymbolsOnOrOff(const rtl::Reference< ::chart::DataSeries > &xSeries, bool bSymbolsOn, sal_Int32 nSeriesIndex)