LibreOffice Module chart2 (master) 1
BarChartTypeTemplate.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 <OPropertySet.hxx>
22#include <comphelper/uno3.hxx>
23
24#include <ChartTypeTemplate.hxx>
25#include <StackMode.hxx>
26
27namespace chart
28{
29
31 public ChartTypeTemplate,
33{
34public:
36 {
39 };
40
41 explicit BarChartTypeTemplate(
42 css::uno::Reference< css::uno::XComponentContext > const & xContext,
43 const OUString & rServiceName,
44 StackMode eStackMode,
45 BarDirection eDirection,
46 sal_Int32 nDim = 2 );
47 virtual ~BarChartTypeTemplate() override;
48
52 DECLARE_XTYPEPROVIDER()
53
54protected:
55 // ____ OPropertySet ____
56 virtual void GetDefaultValue( sal_Int32 nHandle, css::uno::Any& rAny ) const override;
57 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
58
59 // ____ XPropertySet ____
60 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
61 getPropertySetInfo() override;
62
63 // ____ ChartTypeTemplate ____
64 virtual bool matchesTemplate2(
65 const rtl::Reference< ::chart::Diagram >& xDiagram,
66 bool bAdaptProperties ) override;
67 virtual rtl::Reference< ::chart::ChartType >
68 getChartTypeForNewSeries2( const std::vector<
69 rtl::Reference< ::chart::ChartType > >& aFormerlyUsedChartTypes ) override;
70 virtual void applyStyle2(
71 const rtl::Reference< ::chart::DataSeries >& xSeries,
72 ::sal_Int32 nChartTypeGroupIndex,
73 ::sal_Int32 nSeriesIndex,
74 ::sal_Int32 nSeriesCount ) override;
75 virtual void resetStyles2(
76 const rtl::Reference< ::chart::Diagram >& xDiagram ) override;
77 virtual rtl::Reference< ::chart::ChartType >
78 getChartTypeForIndex( sal_Int32 nChartTypeIndex ) override;
79 virtual sal_Int32 getDimension() const override;
80 virtual StackMode getStackMode( sal_Int32 nChartTypeIndex ) const override;
81 virtual bool isSwapXAndY() const override;
82
83 virtual void createCoordinateSystems(
84 const rtl::Reference< ::chart::Diagram > & xDiagram ) override;
85
86private:
89 sal_Int32 m_nDim;
90};
91
92} // namespace chart
93
94/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool matchesTemplate2(const rtl::Reference< ::chart::Diagram > &xDiagram, bool bAdaptProperties) override
virtual ~BarChartTypeTemplate() override
virtual rtl::Reference< ::chart::ChartType > getChartTypeForNewSeries2(const std::vector< rtl::Reference< ::chart::ChartType > > &aFormerlyUsedChartTypes) override
virtual void createCoordinateSystems(const rtl::Reference< ::chart::Diagram > &xDiagram) override
Creates a 2d or 3d cartesian coordinate system with mathematically oriented, linear scales with auto-...
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
merge XInterface implementations
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
virtual void resetStyles2(const rtl::Reference< ::chart::Diagram > &xDiagram) override
virtual sal_Int32 getDimension() const override
returns 2 by default. Supported are 2 and 3
virtual void applyStyle2(const rtl::Reference< ::chart::DataSeries > &xSeries, ::sal_Int32 nChartTypeGroupIndex, ::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 bool isSwapXAndY() const override
BarChartTypeTemplate(css::uno::Reference< css::uno::XComponentContext > const &xContext, const OUString &rServiceName, StackMode eStackMode, BarDirection eDirection, sal_Int32 nDim=2)
virtual rtl::Reference< ::chart::ChartType > getChartTypeForIndex(sal_Int32 nChartTypeIndex) override
virtual StackMode getStackMode(sal_Int32 nChartTypeIndex) const override
returns StackMode::NONE by default.
For creating diagrams and modifying existing diagrams.
#define DECLARE_XINTERFACE()