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