1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_STOCKCHARTTYPETEMPLATE_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_STOCKCHARTTYPETEMPLATE_HXX
22 #include "ChartTypeTemplate.hxx"
23 #include "OPropertySet.hxx"
24 #include "MutexContainer.hxx"
25 #include <comphelper/uno3.hxx>
30 class StockChartTypeTemplate
:
31 public MutexContainer
,
32 public ChartTypeTemplate
,
33 public ::property::OPropertySet
47 If true, the candlesticks are drawn as solid white or black boxes
48 depending on rising or falling stock-values. Otherwise the
49 open-value will be drawn as a small line at the left side of a
50 straight vertical line, and the close-value on the right hand side.
52 explicit StockChartTypeTemplate(
53 ::com::sun::star::uno::Reference
<
54 ::com::sun::star::uno::XComponentContext
> const & xContext
,
55 const OUString
& rServiceName
,
56 StockVariant eVariant
,
57 bool bJapaneseStyle
);
58 virtual ~StockChartTypeTemplate();
60 /// merge XInterface implementations
62 /// merge XTypeProvider implementations
63 DECLARE_XTYPEPROVIDER()
66 // ____ OPropertySet ____
67 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
68 throw(::com::sun::star::beans::UnknownPropertyException
) SAL_OVERRIDE
;
69 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() SAL_OVERRIDE
;
71 // ____ XPropertySet ____
72 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
74 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
76 // ____ XChartTypeTemplate ____
77 virtual sal_Bool SAL_CALL
matchesTemplate(
78 const ::com::sun::star::uno::Reference
<
79 ::com::sun::star::chart2::XDiagram
>& xDiagram
,
80 sal_Bool bAdaptProperties
)
81 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
82 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
> SAL_CALL
83 getChartTypeForNewSeries( const ::com::sun::star::uno::Sequence
<
84 ::com::sun::star::uno::Reference
<
85 ::com::sun::star::chart2::XChartType
> >& aFormerlyUsedChartTypes
)
86 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
87 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataInterpreter
> SAL_CALL
getDataInterpreter()
88 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 virtual void SAL_CALL
applyStyle(
90 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDataSeries
>& xSeries
,
91 ::sal_Int32 nChartTypeIndex
,
92 ::sal_Int32 nSeriesIndex
,
93 ::sal_Int32 nSeriesCount
)
94 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
95 virtual void SAL_CALL
resetStyles(
96 const ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XDiagram
>& xDiagram
)
97 throw (::com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
100 virtual sal_Int32
getAxisCountByDimension( sal_Int32 nDimension
) SAL_OVERRIDE
;
102 // ____ ChartTypeTemplate ____
103 virtual void createChartTypes(
104 const ::com::sun::star::uno::Sequence
<
105 ::com::sun::star::uno::Sequence
<
106 ::com::sun::star::uno::Reference
<
107 ::com::sun::star::chart2::XDataSeries
> > >& aSeriesSeq
,
108 const ::com::sun::star::uno::Sequence
<
109 ::com::sun::star::uno::Reference
<
110 ::com::sun::star::chart2::XCoordinateSystem
> > & rCoordSys
,
111 const ::com::sun::star::uno::Sequence
<
112 ::com::sun::star::uno::Reference
<
113 ::com::sun::star::chart2::XChartType
> > & aOldChartTypesSeq
116 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::chart2::XChartType
>
117 getChartTypeForIndex( sal_Int32 nChartTypeIndex
) SAL_OVERRIDE
;
120 // todo: deprecate this variable
121 StockVariant m_eStockVariant
;
126 // INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_STOCKCHARTTYPETEMPLATE_HXX
129 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */