1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
21 #include <OPropertySet.hxx>
22 #include <comphelper/uno3.hxx>
24 #include <ChartTypeTemplate.hxx>
25 #include <com/sun/star/chart2/PieChartOffsetMode.hpp>
26 #include <com/sun/star/chart2/PieChartSubType.hpp>
31 class PieChartTypeTemplate
:
32 public ChartTypeTemplate
,
33 public ::property::OPropertySet
37 css::uno::Reference
< css::uno::XComponentContext
> const & xContext
,
38 const OUString
& rServiceName
,
39 css::chart2::PieChartOffsetMode eMode
,
41 css::chart2::PieChartSubType eSubType
,
42 sal_Int32 nCompositeSize
,
44 virtual ~PieChartTypeTemplate() override
;
46 /// merge XInterface implementations
48 /// merge XTypeProvider implementations
49 DECLARE_XTYPEPROVIDER()
52 // ____ OPropertySet ____
53 virtual void GetDefaultValue( sal_Int32 nHandle
, css::uno::Any
& rAny
) const override
;
54 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
56 // ____ XPropertySet ____
57 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
58 getPropertySetInfo() override
;
60 // ____ ChartTypeTemplate ____
61 virtual bool matchesTemplate2(
62 const rtl::Reference
< ::chart::Diagram
>& xDiagram
,
63 bool bAdaptProperties
) override
;
64 virtual rtl::Reference
< ::chart::ChartType
>
65 getChartTypeForNewSeries2( const std::vector
<
66 rtl::Reference
< ::chart::ChartType
> >& aFormerlyUsedChartTypes
) override
;
67 virtual void applyStyle2(
68 const rtl::Reference
< ::chart::DataSeries
>& xSeries
,
69 ::sal_Int32 nChartTypeGroupIndex
,
70 ::sal_Int32 nSeriesIndex
,
71 ::sal_Int32 nSeriesCount
) override
;
72 virtual void resetStyles2(
73 const rtl::Reference
< ::chart::Diagram
>& xDiagram
) override
;
75 // ____ ChartTypeTemplate ____
76 virtual sal_Int32
getDimension() const override
;
78 virtual void adaptDiagram(
79 const rtl::Reference
< ::chart::Diagram
> & xDiagram
) override
;
81 virtual sal_Int32
getAxisCountByDimension( sal_Int32 nDimension
) override
;
83 virtual void adaptAxes(
84 const std::vector
< rtl::Reference
< ::chart::BaseCoordinateSystem
> > & rCoordSys
) override
;
86 virtual void adaptScales(
87 const std::vector
< rtl::Reference
< ::chart::BaseCoordinateSystem
> > & aCooSysSeq
,
88 const css::uno::Reference
< css::chart2::data::XLabeledDataSequence
> & xCategories
) override
;
90 virtual void createChartTypes(
94 ::chart::DataSeries
> > >& aSeriesSeq
,
97 ::chart::BaseCoordinateSystem
> > & rCoordSys
,
98 const std::vector
< rtl::Reference
< ChartType
> > & aOldChartTypesSeq
101 virtual rtl::Reference
< ::chart::ChartType
>
102 getChartTypeForIndex( sal_Int32 nChartTypeIndex
) override
;
107 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */