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: StockChartTypeTemplate.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_STOCKCHARTTYPETEMPLATE_HXX
31 #define CHART_STOCKCHARTTYPETEMPLATE_HXX
33 #include "ChartTypeTemplate.hxx"
34 #include "OPropertySet.hxx"
35 #include "MutexContainer.hxx"
36 #include <comphelper/uno3.hxx>
41 class StockChartTypeTemplate
:
42 public MutexContainer
,
43 public ChartTypeTemplate
,
44 public ::property::OPropertySet
58 If true, the candlesticks are drawn as solid white or black boxes
59 depending on rising or falling stock-values. Otherwise the
60 open-value will be drawn as a small line at the left side of a
61 straight vertical line, and the close-value on the right hand side.
63 explicit StockChartTypeTemplate(
64 ::com::sun::star::uno::Reference
<
65 ::com::sun::star::uno::XComponentContext
> const & xContext
,
66 const ::rtl::OUString
& rServiceName
,
67 StockVariant eVariant
,
68 bool bJapaneseStyle
);
69 virtual ~StockChartTypeTemplate();
71 /// XServiceInfo declarations
72 APPHELPER_XSERVICEINFO_DECL()
74 /// merge XInterface implementations
76 /// merge XTypeProvider implementations
77 DECLARE_XTYPEPROVIDER()
80 // ____ OPropertySet ____
81 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
82 throw(::com::sun::star::beans::UnknownPropertyException
);
83 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
85 // ____ XPropertySet ____
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
88 throw (::com::sun::star::uno::RuntimeException
);
90 // ____ XChartTypeTemplate ____
91 virtual sal_Bool SAL_CALL
matchesTemplate(
92 const ::com::sun::star::uno::Reference
<
93 ::com::sun::star::chart2::XDiagram
>& xDiagram
,
94 sal_Bool bAdaptProperties
)
95 throw (::com::sun::star::uno::RuntimeException
);
96 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
> SAL_CALL
97 getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence
<
98 ::com::sun::star::uno::Reference
<
99 ::com::sun::star::chart2::XChartType
> >& aFormerlyUsedChartTypes
)
100 throw (::com::sun::star::uno::RuntimeException
);
101 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataInterpreter
> SAL_CALL
getDataInterpreter()
102 throw (::com::sun::star::uno::RuntimeException
);
103 virtual void SAL_CALL
applyStyle(
104 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& xSeries
,
105 ::sal_Int32 nChartTypeIndex
,
106 ::sal_Int32 nSeriesIndex
,
107 ::sal_Int32 nSeriesCount
)
108 throw (::com::sun::star::uno::RuntimeException
);
109 virtual void SAL_CALL
resetStyles(
110 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDiagram
>& xDiagram
)
111 throw (::com::sun::star::uno::RuntimeException
);
114 virtual sal_Int32
getAxisCountByDimension( sal_Int32 nDimension
);
116 // ____ ChartTypeTemplate ____
117 virtual void createChartTypes(
118 const ::com::sun::star::uno::Sequence
<
119 ::com::sun::star::uno::Sequence
<
120 ::com::sun::star::uno::Reference
<
121 ::com::sun::star::chart2::XDataSeries
> > >& aSeriesSeq
,
122 const ::com::sun::star::uno::Sequence
<
123 ::com::sun::star::uno::Reference
<
124 ::com::sun::star::chart2::XCoordinateSystem
> > & rCoordSys
,
125 const ::com::sun::star::uno::Sequence
<
126 ::com::sun::star::uno::Reference
<
127 ::com::sun::star::chart2::XChartType
> > & aOldChartTypesSeq
130 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>
131 getChartTypeForIndex( sal_Int32 nChartTypeIndex
);
134 // todo: deprecate this variable
135 StockVariant m_eStockVariant
;
140 // CHART_STOCKCHARTTYPETEMPLATE_HXX