LibreOffice Module chart2 (master) 1
StockChartTypeTemplate.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
21#include <ChartTypeTemplate.hxx>
22#include <OPropertySet.hxx>
23#include <comphelper/uno3.hxx>
24
25namespace chart
26{
27
29 public ChartTypeTemplate,
31{
32public:
33 enum class StockVariant
34 {
35 NONE,
36 Open,
37 Volume,
38 VolumeOpen
39 };
40
50 css::uno::Reference< css::uno::XComponentContext > const & xContext,
51 const OUString & rServiceName,
52 StockVariant eVariant,
53 bool bJapaneseStyle );
54 virtual ~StockChartTypeTemplate() override;
55
59 DECLARE_XTYPEPROVIDER()
60
61protected:
62 // ____ OPropertySet ____
63 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
64 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
65
66 // ____ XPropertySet ____
67 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
68 getPropertySetInfo() override;
69
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;
85
86 // ChartTypeTemplate
87 virtual sal_Int32 getAxisCountByDimension( sal_Int32 nDimension ) override;
88
89 // ____ ChartTypeTemplate ____
90 virtual void createChartTypes(
91 const std::vector<
92 std::vector<
94 ::chart::DataSeries > > >& aSeriesSeq,
95 const std::vector<
97 ::chart::BaseCoordinateSystem > > & rCoordSys,
98 const std::vector< rtl::Reference< ChartType > > & aOldChartTypesSeq
99 ) override;
100
101 virtual rtl::Reference< ::chart::ChartType >
102 getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
103
104private:
105 // todo: deprecate this variable
107};
108
109} // namespace chart
110
111/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
For creating diagrams and modifying existing diagrams.
offers tooling to interpret different data sources in a structural and chart-type-dependent way.
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties) override
virtual rtl::Reference< ::chart::DataInterpreter > getDataInterpreter2() override
virtual void createChartTypes(const std::vector< std::vector< rtl::Reference< ::chart::DataSeries > > > &aSeriesSeq, const std::vector< rtl::Reference< ::chart::BaseCoordinateSystem > > &rCoordSys, const std::vector< rtl::Reference< ChartType > > &aOldChartTypesSeq) override
create a data series tree, that fits the requirements of the chart type.
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
merge XInterface implementations
virtual rtl::Reference< ::chart::ChartType > getChartTypeForIndex(sal_Int32 nChartTypeIndex) override
StockChartTypeTemplate(css::uno::Reference< css::uno::XComponentContext > const &xContext, const OUString &rServiceName, StockVariant eVariant, bool bJapaneseStyle)
CTOR.
virtual rtl::Reference< ::chart::ChartType > getChartTypeForNewSeries2(const std::vector< rtl::Reference< ::chart::ChartType > > &aFormerlyUsedChartTypes) override
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeIndex, ::sal_Int32 nSeriesIndex, ::sal_Int32 nSeriesCount) override
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram) override
virtual sal_Int32 getAxisCountByDimension(sal_Int32 nDimension) override
Give the number of requested axis per dimension here.
NONE
#define DECLARE_XINTERFACE()