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_BARCHARTTYPETEMPLATE_HXX
28 #define CHART_BARCHARTTYPETEMPLATE_HXX
30 #include "OPropertySet.hxx"
31 #include "MutexContainer.hxx"
32 #include <comphelper/uno3.hxx>
34 #include "ChartTypeTemplate.hxx"
35 #include "StackMode.hxx"
40 class BarChartTypeTemplate
:
41 public MutexContainer
,
42 public ChartTypeTemplate
,
43 public ::property::OPropertySet
52 explicit BarChartTypeTemplate(
53 ::com::sun::star::uno::Reference
<
54 ::com::sun::star::uno::XComponentContext
> const & xContext
,
55 const ::rtl::OUString
& rServiceName
,
57 BarDirection eDirection
,
59 virtual ~BarChartTypeTemplate();
61 /// XServiceInfo declarations
62 APPHELPER_XSERVICEINFO_DECL()
64 /// merge XInterface implementations
66 /// merge XTypeProvider implementations
67 DECLARE_XTYPEPROVIDER()
70 // ____ OPropertySet ____
71 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
72 throw(::com::sun::star::beans::UnknownPropertyException
);
73 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
75 // ____ XPropertySet ____
76 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
78 throw (::com::sun::star::uno::RuntimeException
);
80 // ____ XChartTypeTemplate ____
81 virtual sal_Bool SAL_CALL
matchesTemplate(
82 const ::com::sun::star::uno::Reference
<
83 ::com::sun::star::chart2::XDiagram
>& xDiagram
,
84 sal_Bool bAdaptProperties
)
85 throw (::com::sun::star::uno::RuntimeException
);
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
> SAL_CALL
87 getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence
<
88 ::com::sun::star::uno::Reference
<
89 ::com::sun::star::chart2::XChartType
> >& aFormerlyUsedChartTypes
)
90 throw (::com::sun::star::uno::RuntimeException
);
91 virtual void SAL_CALL
applyStyle(
92 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& xSeries
,
93 ::sal_Int32 nChartTypeGroupIndex
,
94 ::sal_Int32 nSeriesIndex
,
95 ::sal_Int32 nSeriesCount
)
96 throw (::com::sun::star::uno::RuntimeException
);
97 virtual void SAL_CALL
resetStyles(
98 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDiagram
>& xDiagram
)
99 throw (::com::sun::star::uno::RuntimeException
);
101 // ____ ChartTypeTemplate ____
102 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>
103 getChartTypeForIndex( sal_Int32 nChartTypeIndex
);
104 virtual sal_Int32
getDimension() const;
105 virtual StackMode
getStackMode( sal_Int32 nChartTypeIndex
) const;
106 virtual bool isSwapXAndY() const;
108 virtual void createCoordinateSystems(
109 const ::com::sun::star::uno::Reference
<
110 ::com::sun::star::chart2::XCoordinateSystemContainer
> & xCooSysCnt
);
113 StackMode m_eStackMode
;
114 BarDirection m_eBarDirection
;
120 // CHART_BARCHARTTYPETEMPLATE_HXX