LibreOffice Module chart2 (master) 1
PieChartTypeTemplate.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#pragma once
20
21#include <OPropertySet.hxx>
22#include <comphelper/uno3.hxx>
23
24#include <ChartTypeTemplate.hxx>
25#include <com/sun/star/chart2/PieChartOffsetMode.hpp>
26
27namespace chart
28{
29
31 public ChartTypeTemplate,
33{
34public:
36 css::uno::Reference< css::uno::XComponentContext > const & xContext,
37 const OUString & rServiceName,
38 css::chart2::PieChartOffsetMode eMode,
39 bool bRings,
40 sal_Int32 nDim = 2 );
41 virtual ~PieChartTypeTemplate() override;
42
47
48protected:
49 // ____ OPropertySet ____
50 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
51 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
52
53 // ____ XPropertySet ____
54 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
55 getPropertySetInfo() override;
56
57 // ____ ChartTypeTemplate ____
58 virtual bool matchesTemplate2(
60 bool bAdaptProperties ) override;
62 getChartTypeForNewSeries2( const std::vector<
63 rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
64 virtual void applyStyle2(
66 ::sal_Int32 nChartTypeGroupIndex,
67 ::sal_Int32 nSeriesIndex,
68 ::sal_Int32 nSeriesCount ) override;
69 virtual void resetStyles2(
70 const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
71
72 // ____ ChartTypeTemplate ____
73 virtual sal_Int32 getDimension() const override;
74
75 virtual void adaptDiagram(
76 const rtl::Reference< ::chart::Diagram > & xDiagram ) override;
77
78 virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension ) override;
79
80 virtual void adaptAxes(
81 const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & rCoordSys ) override;
82
83 virtual void adaptScales(
84 const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > & aCooSysSeq,
85 const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xCategories ) override;
86
87 virtual void createChartTypes(
88 const std::vector<
89 std::vector<
91 ::chart::DataSeries > > >& aSeriesSeq,
92 const std::vector<
94 ::chart::BaseCoordinateSystem > > & rCoordSys,
95 const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
96 ) override;
97
99 getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
100};
101
102} // namespace chart
103
104/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
For creating diagrams and modifying existing diagrams.
virtual void adaptDiagram(const rtl::Reference< ::chart::Diagram > &xDiagram) override
Allows derived classes to manipulate the diagrams whole, like changing the wall color.
virtual sal_Int32 getAxisCountByDimension(sal_Int32 nDimension) override
Give the number of requested axis per dimension here.
virtual void createChartTypes(const std::vector< std::vector< rtl::Reference< ::chart::DataSeries > > > &aSeriesSeq, const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &rCoordSys, const std::vector< rtl::Reference< ChartType > > &aOldChartTypesSeq) override
create a data series tree, that fits the requirements of the chart type.
PieChartTypeTemplate(css::uno::Reference< css::uno::XComponentContext > const &xContext, const OUString &rServiceName, css::chart2::PieChartOffsetMode eMode, bool bRings, sal_Int32 nDim=2)
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForIndex(sal_Int32 nChartTypeIndex) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram) override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForNewSeries2(const std::vector< rtl::Reference< ::chart::ChartType > > &aFormerlyUsedChartTypes) override
virtual void adaptAxes(const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &rCoordSys) override
adapt properties of existing axes and remove superfluous axes
virtual sal_Int32 getDimension() const override
returns 2 by default. Supported are 2 and 3
virtual ~PieChartTypeTemplate() override
virtual void adaptScales(const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &aCooSysSeq, const css::uno::Reference< css::chart2::data::XLabeledDataSequence > &xCategories) override
Sets categories at the scales of dimension 0 and the percent stacking at the scales of dimension 1 of...
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeGroupIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount) override
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
merge XInterface implementations
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties) override
Mode eMode
sal_Int32 nHandle
#define DECLARE_XTYPEPROVIDER()
#define DECLARE_XINTERFACE()