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 .
21 #include <ChartTypeTemplate.hxx>
22 #include <OPropertySet.hxx>
23 #include <comphelper/uno3.hxx>
28 class StockChartTypeTemplate
:
29 public ChartTypeTemplate
,
30 public ::property::OPropertySet
33 enum class StockVariant
44 If true, the candlesticks are drawn as solid white or black boxes
45 depending on rising or falling stock-values. Otherwise the
46 open-value will be drawn as a small line at the left side of a
47 straight vertical line, and the close-value on the right hand side.
49 explicit StockChartTypeTemplate(
50 css::uno::Reference
< css::uno::XComponentContext
> const & xContext
,
51 const OUString
& rServiceName
,
52 StockVariant eVariant
,
53 bool bJapaneseStyle
);
54 virtual ~StockChartTypeTemplate() override
;
56 /// merge XInterface implementations
58 /// merge XTypeProvider implementations
59 DECLARE_XTYPEPROVIDER()
62 // ____ OPropertySet ____
63 virtual void GetDefaultValue( sal_Int32 nHandle
, css::uno::Any
& rAny
) const override
;
64 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
66 // ____ XPropertySet ____
67 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
68 getPropertySetInfo() override
;
70 // ____ XChartTypeTemplate ____
71 virtual bool matchesTemplate2(
72 const rtl::Reference
< ::chart::Diagram
>& xDiagram
,
73 bool bAdaptProperties
) override
;
74 virtual rtl::Reference
< ::chart::ChartType
>
75 getChartTypeForNewSeries2( const std::vector
<
76 rtl::Reference
< ::chart::ChartType
> >& aFormerlyUsedChartTypes
) override
;
77 virtual rtl::Reference
< ::chart::DataInterpreter
> getDataInterpreter2() override
;
78 virtual void applyStyle2(
79 const rtl::Reference
< ::chart::DataSeries
>& xSeries
,
80 ::sal_Int32 nChartTypeIndex
,
81 ::sal_Int32 nSeriesIndex
,
82 ::sal_Int32 nSeriesCount
) override
;
83 virtual void resetStyles2(
84 const rtl::Reference
< ::chart::Diagram
>& xDiagram
) override
;
87 virtual sal_Int32
getAxisCountByDimension( sal_Int32 nDimension
) override
;
89 // ____ ChartTypeTemplate ____
90 virtual void createChartTypes(
94 ::chart::DataSeries
> > >& aSeriesSeq
,
97 ::chart::BaseCoordinateSystem
> > & rCoordSys
,
98 const std::vector
< rtl::Reference
< ChartType
> > & aOldChartTypesSeq
101 virtual rtl::Reference
< ::chart::ChartType
>
102 getChartTypeForIndex( sal_Int32 nChartTypeIndex
) override
;
105 // todo: deprecate this variable
106 StockVariant m_eStockVariant
;
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */