Gtk-WARNING gtktreestore.c:1047: Invalid column number 1 added to iter
[LibreOffice.git] / chart2 / source / model / template / StockChartTypeTemplate.hxx
blobaed35a000919bc235ae9e90a506772d37d9735a0
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 #pragma once
21 #include <ChartTypeTemplate.hxx>
22 #include <OPropertySet.hxx>
23 #include <comphelper/uno3.hxx>
25 namespace chart
28 class StockChartTypeTemplate :
29 public ChartTypeTemplate,
30 public ::property::OPropertySet
32 public:
33 enum class StockVariant
35 NONE,
36 Open,
37 Volume,
38 VolumeOpen
41 /** CTOR
43 @param bJapaneseStyle
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
57 DECLARE_XINTERFACE()
58 /// merge XTypeProvider implementations
59 DECLARE_XTYPEPROVIDER()
61 protected:
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;
86 // ChartTypeTemplate
87 virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension ) override;
89 // ____ ChartTypeTemplate ____
90 virtual void createChartTypes(
91 const std::vector<
92 std::vector<
93 rtl::Reference<
94 ::chart::DataSeries > > >& aSeriesSeq,
95 const std::vector<
96 rtl::Reference<
97 ::chart::BaseCoordinateSystem > > & rCoordSys,
98 const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
99 ) override;
101 virtual rtl::Reference< ::chart::ChartType >
102 getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
104 private:
105 // todo: deprecate this variable
106 StockVariant m_eStockVariant;
109 } // namespace chart
111 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */