update dev300-m58
[ooovba.git] / chart2 / source / model / template / BarChartTypeTemplate.hxx
blob02636c1da1002a6c57b8327bdda4d8f84d552997
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: BarChartTypeTemplate.hxx,v $
10 * $Revision: 1.8 $
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_BARCHARTTYPETEMPLATE_HXX
31 #define CHART_BARCHARTTYPETEMPLATE_HXX
33 #include "OPropertySet.hxx"
34 #include "MutexContainer.hxx"
35 #include <comphelper/uno3.hxx>
37 #include "ChartTypeTemplate.hxx"
38 #include "StackMode.hxx"
40 namespace chart
43 class BarChartTypeTemplate :
44 public MutexContainer,
45 public ChartTypeTemplate,
46 public ::property::OPropertySet
48 public:
49 enum BarDirection
51 HORIZONTAL,
52 VERTICAL
55 explicit BarChartTypeTemplate(
56 ::com::sun::star::uno::Reference<
57 ::com::sun::star::uno::XComponentContext > const & xContext,
58 const ::rtl::OUString & rServiceName,
59 StackMode eStackMode,
60 BarDirection eDirection,
61 sal_Int32 nDim = 2 );
62 virtual ~BarChartTypeTemplate();
64 /// XServiceInfo declarations
65 APPHELPER_XSERVICEINFO_DECL()
67 /// merge XInterface implementations
68 DECLARE_XINTERFACE()
69 /// merge XTypeProvider implementations
70 DECLARE_XTYPEPROVIDER()
72 protected:
73 // ____ OPropertySet ____
74 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
75 throw(::com::sun::star::beans::UnknownPropertyException);
76 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
78 // ____ XPropertySet ____
79 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
80 getPropertySetInfo()
81 throw (::com::sun::star::uno::RuntimeException);
83 // ____ XChartTypeTemplate ____
84 virtual sal_Bool SAL_CALL matchesTemplate(
85 const ::com::sun::star::uno::Reference<
86 ::com::sun::star::chart2::XDiagram >& xDiagram,
87 sal_Bool bAdaptProperties )
88 throw (::com::sun::star::uno::RuntimeException);
89 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > SAL_CALL
90 getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence<
91 ::com::sun::star::uno::Reference<
92 ::com::sun::star::chart2::XChartType > >& aFormerlyUsedChartTypes )
93 throw (::com::sun::star::uno::RuntimeException);
94 virtual void SAL_CALL applyStyle(
95 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& xSeries,
96 ::sal_Int32 nChartTypeGroupIndex,
97 ::sal_Int32 nSeriesIndex,
98 ::sal_Int32 nSeriesCount )
99 throw (::com::sun::star::uno::RuntimeException);
100 virtual void SAL_CALL resetStyles(
101 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram >& xDiagram )
102 throw (::com::sun::star::uno::RuntimeException);
104 // ____ ChartTypeTemplate ____
105 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >
106 getChartTypeForIndex( sal_Int32 nChartTypeIndex );
107 virtual sal_Int32 getDimension() const;
108 virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const;
109 virtual bool isSwapXAndY() const;
111 virtual void createCoordinateSystems(
112 const ::com::sun::star::uno::Reference<
113 ::com::sun::star::chart2::XCoordinateSystemContainer > & xCooSysCnt );
115 private:
116 StackMode m_eStackMode;
117 BarDirection m_eBarDirection;
118 sal_Int32 m_nDim;
121 } // namespace chart
123 // CHART_BARCHARTTYPETEMPLATE_HXX
124 #endif