1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org. If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
26 ************************************************************************/
27 #ifndef CHART_PIECHARTTYPETEMPLATE_HXX
28 #define CHART_PIECHARTTYPETEMPLATE_HXX
30 #include "OPropertySet.hxx"
31 #include "MutexContainer.hxx"
32 #include <comphelper/uno3.hxx>
34 #include "ChartTypeTemplate.hxx"
35 #include <com/sun/star/chart2/PieChartOffsetMode.hpp>
40 class PieChartTypeTemplate
:
41 public MutexContainer
,
42 public ChartTypeTemplate
,
43 public ::property::OPropertySet
47 ::com::sun::star::uno::Reference
<
48 ::com::sun::star::uno::XComponentContext
> const & xContext
,
49 const ::rtl::OUString
& rServiceName
,
50 ::com::sun::star::chart2::PieChartOffsetMode eMode
,
53 virtual ~PieChartTypeTemplate();
55 /// XServiceInfo declarations
56 APPHELPER_XSERVICEINFO_DECL()
58 /// merge XInterface implementations
60 /// merge XTypeProvider implementations
61 DECLARE_XTYPEPROVIDER()
64 // ____ OPropertySet ____
65 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
66 throw(::com::sun::star::beans::UnknownPropertyException
);
67 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
69 // ____ XPropertySet ____
70 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
72 throw (::com::sun::star::uno::RuntimeException
);
74 // ____ XChartTypeTemplate ____
75 virtual sal_Bool SAL_CALL
matchesTemplate(
76 const ::com::sun::star::uno::Reference
<
77 ::com::sun::star::chart2::XDiagram
>& xDiagram
,
78 sal_Bool bAdaptProperties
)
79 throw (::com::sun::star::uno::RuntimeException
);
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
> SAL_CALL
81 getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence
<
82 ::com::sun::star::uno::Reference
<
83 ::com::sun::star::chart2::XChartType
> >& aFormerlyUsedChartTypes
)
84 throw (::com::sun::star::uno::RuntimeException
);
85 virtual void SAL_CALL
applyStyle(
86 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& xSeries
,
87 ::sal_Int32 nChartTypeGroupIndex
,
88 ::sal_Int32 nSeriesIndex
,
89 ::sal_Int32 nSeriesCount
)
90 throw (::com::sun::star::uno::RuntimeException
);
91 virtual void SAL_CALL
resetStyles(
92 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDiagram
>& xDiagram
)
93 throw (::com::sun::star::uno::RuntimeException
);
95 // ____ ChartTypeTemplate ____
96 virtual sal_Int32
getDimension() const;
98 virtual void adaptDiagram(
99 const ::com::sun::star::uno::Reference
<
100 ::com::sun::star::chart2::XDiagram
> & xDiagram
);
102 virtual sal_Int32
getAxisCountByDimension( sal_Int32 nDimension
);
103 // virtual void createAxes(
104 // const ::com::sun::star::uno::Sequence<
105 // ::com::sun::star::uno::Reference<
106 // ::com::sun::star::chart2::XCoordinateSystem > > & rCoordSys );
108 virtual void adaptAxes(
109 const ::com::sun::star::uno::Sequence
<
110 ::com::sun::star::uno::Reference
<
111 ::com::sun::star::chart2::XCoordinateSystem
> > & rCoordSys
);
113 virtual void adaptScales(
114 const ::com::sun::star::uno::Sequence
<
115 ::com::sun::star::uno::Reference
<
116 ::com::sun::star::chart2::XCoordinateSystem
> > & aCooSysSeq
,
117 const ::com::sun::star::uno::Reference
<
118 ::com::sun::star::chart2::data::XLabeledDataSequence
> & xCategories
);
120 virtual void createChartTypes(
121 const ::com::sun::star::uno::Sequence
<
122 ::com::sun::star::uno::Sequence
<
123 ::com::sun::star::uno::Reference
<
124 ::com::sun::star::chart2::XDataSeries
> > >& aSeriesSeq
,
125 const ::com::sun::star::uno::Sequence
<
126 ::com::sun::star::uno::Reference
<
127 ::com::sun::star::chart2::XCoordinateSystem
> > & rCoordSys
,
128 const ::com::sun::star::uno::Sequence
<
129 ::com::sun::star::uno::Reference
<
130 ::com::sun::star::chart2::XChartType
> > & aOldChartTypesSeq
133 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>
134 getChartTypeForIndex( sal_Int32 nChartTypeIndex
);
139 // CHART_PIECHARTTYPETEMPLATE_HXX