LibreOffice Module chart2 (master) 1
DiagramWrapper.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
22
24#include <com/sun/star/chart/XDiagramPositioning.hpp>
25#include <com/sun/star/chart2/XDiagramProvider.hpp>
26#include <com/sun/star/chart/XDiagram.hpp>
27#include <com/sun/star/chart/XAxisSupplier.hpp>
28#include <com/sun/star/chart/XAxisZSupplier.hpp>
29#include <com/sun/star/chart/XTwoAxisXSupplier.hpp>
30#include <com/sun/star/chart/XTwoAxisYSupplier.hpp>
31#include <com/sun/star/chart/XStatisticDisplay.hpp>
32#include <com/sun/star/chart/X3DDisplay.hpp>
33#include <com/sun/star/lang/XServiceInfo.hpp>
34#include <com/sun/star/lang/XComponent.hpp>
35#include <com/sun/star/chart/XSecondAxisTitleSupplier.hpp>
36
37#include <com/sun/star/chart/X3DDefaultSetter.hpp>
38#include <memory>
39
40namespace com::sun::star::chart2 { class XDiagram; }
41namespace com::sun::star::lang { class XEventListener; }
42
43namespace chart::wrapper
44{
45
46class Chart2ModelContact;
47
48class DiagramWrapper : public cppu::ImplInheritanceHelper<
49 WrappedPropertySet
50 , css::chart::XDiagram
51 , css::chart::XAxisSupplier
52 , css::chart::XAxisZSupplier
53 , css::chart::XTwoAxisXSupplier // : XAxisXSupplier
54 , css::chart::XTwoAxisYSupplier // : XAxisYSupplier
55 , css::chart::XStatisticDisplay
56 , css::chart::X3DDisplay
57 , css::chart::X3DDefaultSetter
58 , css::lang::XServiceInfo
59 , css::lang::XComponent
60 , css::chart::XDiagramPositioning
61 , css::chart2::XDiagramProvider
62 , css::chart::XSecondAxisTitleSupplier
63 >
64{
65public:
66 explicit DiagramWrapper(std::shared_ptr<Chart2ModelContact> spChart2ModelContact);
67 virtual ~DiagramWrapper() override;
68
70 virtual OUString SAL_CALL getImplementationName() override;
71 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
72 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
73
74 // ____ XComponent ____
75 virtual void SAL_CALL dispose() override;
76 virtual void SAL_CALL addEventListener( const css::uno::Reference<
77 css::lang::XEventListener >& xListener ) override;
78 virtual void SAL_CALL removeEventListener( const css::uno::Reference<
79 css::lang::XEventListener >& aListener ) override;
80
81 // ____ XDiagram ____
82 virtual OUString SAL_CALL getDiagramType() override;
83 virtual css::uno::Reference<
84 css::beans::XPropertySet > SAL_CALL getDataRowProperties( sal_Int32 nRow ) override;
85 virtual css::uno::Reference<
86 css::beans::XPropertySet > SAL_CALL getDataPointProperties( sal_Int32 nCol, sal_Int32 nRow ) override;
87
88 // ____ XShape (base of XDiagram) ____
89 virtual css::awt::Point SAL_CALL getPosition() override;
90 virtual void SAL_CALL setPosition( const css::awt::Point& aPosition ) override;
91 virtual css::awt::Size SAL_CALL getSize() override;
92 virtual void SAL_CALL setSize( const css::awt::Size& aSize ) override;
93
94 // ____ XShapeDescriptor (base of XShape) ____
95 virtual OUString SAL_CALL getShapeType() override;
96
97 // ____ XAxisSupplier ____
98 virtual css::uno::Reference<
99 css::chart::XAxis > SAL_CALL getAxis( sal_Int32 nDimensionIndex ) override;
100 virtual css::uno::Reference<
101 css::chart::XAxis > SAL_CALL getSecondaryAxis( sal_Int32 nDimensionIndex ) override;
102
103 // ____ XAxisZSupplier ____
104 virtual css::uno::Reference<
105 css::drawing::XShape > SAL_CALL getZAxisTitle() override;
106 virtual css::uno::Reference<
107 css::beans::XPropertySet > SAL_CALL getZMainGrid() override;
108 virtual css::uno::Reference<
109 css::beans::XPropertySet > SAL_CALL getZHelpGrid() override;
110 virtual css::uno::Reference<
111 css::beans::XPropertySet > SAL_CALL getZAxis() override;
112
113 // ____ XTwoAxisXSupplier ____
114 virtual css::uno::Reference<
115 css::beans::XPropertySet > SAL_CALL getSecondaryXAxis() override;
116
117 // ____ XAxisXSupplier (base of XTwoAxisXSupplier) ____
118 virtual css::uno::Reference<
119 css::drawing::XShape > SAL_CALL getXAxisTitle() override;
120 virtual css::uno::Reference<
121 css::beans::XPropertySet > SAL_CALL getXAxis() override;
122 virtual css::uno::Reference<
123 css::beans::XPropertySet > SAL_CALL getXMainGrid() override;
124 virtual css::uno::Reference<
125 css::beans::XPropertySet > SAL_CALL getXHelpGrid() override;
126
127 // ____ XTwoAxisYSupplier ____
128 virtual css::uno::Reference<
129 css::beans::XPropertySet > SAL_CALL getSecondaryYAxis() override;
130
131 // ____ XAxisYSupplier (base of XTwoAxisYSupplier) ____
132 virtual css::uno::Reference<
133 css::drawing::XShape > SAL_CALL getYAxisTitle() override;
134 virtual css::uno::Reference<
135 css::beans::XPropertySet > SAL_CALL getYAxis() override;
136 virtual css::uno::Reference<
137 css::beans::XPropertySet > SAL_CALL getYHelpGrid() override;
138 virtual css::uno::Reference<
139 css::beans::XPropertySet > SAL_CALL getYMainGrid() override;
140
141 // ____ XSecondAxisTitleSupplier ____
142 virtual css::uno::Reference<
143 css::drawing::XShape > SAL_CALL getSecondXAxisTitle() override;
144 virtual css::uno::Reference<
145 css::drawing::XShape > SAL_CALL getSecondYAxisTitle() override;
146
147 // ____ XStatisticDisplay ____
148 virtual css::uno::Reference<
149 css::beans::XPropertySet > SAL_CALL getUpBar() override;
150 virtual css::uno::Reference<
151 css::beans::XPropertySet > SAL_CALL getDownBar() override;
152 virtual css::uno::Reference<
153 css::beans::XPropertySet > SAL_CALL getMinMaxLine() override;
154
155 // ____ X3DDisplay ____
156 virtual css::uno::Reference<
157 css::beans::XPropertySet > SAL_CALL getWall() override;
158 virtual css::uno::Reference<
159 css::beans::XPropertySet > SAL_CALL getFloor() override;
160
161 // ____ X3DDefaultSetter ____
162 virtual void SAL_CALL set3DSettingsToDefault() override;
163 virtual void SAL_CALL setDefaultRotation() override;
164 virtual void SAL_CALL setDefaultIllumination() override;
165
166 // ____ XDiagramPositioning ____
167 virtual void SAL_CALL setAutomaticDiagramPositioning( ) override;
168 virtual sal_Bool SAL_CALL isAutomaticDiagramPositioning( ) override;
169 virtual void SAL_CALL setDiagramPositionExcludingAxes( const css::awt::Rectangle& PositionRect ) override;
170 virtual sal_Bool SAL_CALL isExcludingDiagramPositioning( ) override;
171 virtual css::awt::Rectangle SAL_CALL calculateDiagramPositionExcludingAxes( ) override;
172 virtual void SAL_CALL setDiagramPositionIncludingAxes( const css::awt::Rectangle& PositionRect ) override;
173 virtual css::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxes( ) override;
174 virtual void SAL_CALL setDiagramPositionIncludingAxesAndAxisTitles( const css::awt::Rectangle& PositionRect ) override;
175 virtual css::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxesAndAxisTitles( ) override;
176
177 // ____ XDiagramProvider ____
178 virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL getDiagram() override;
179 virtual void SAL_CALL setDiagram( const css::uno::Reference< css::chart2::XDiagram >& xDiagram ) override;
180
181protected:
182 // ____ WrappedPropertySet ____
183 virtual const css::uno::Sequence< css::beans::Property >& getPropertySequence() override;
184 virtual std::vector< std::unique_ptr<WrappedProperty> > createWrappedProperties() override;
185 virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override;
186
187private:
188 std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
190
191 css::uno::Reference<
192 css::chart::XAxis > m_xXAxis;
193 css::uno::Reference<
194 css::chart::XAxis > m_xYAxis;
195 css::uno::Reference<
196 css::chart::XAxis > m_xZAxis;
197 css::uno::Reference<
198 css::chart::XAxis > m_xSecondXAxis;
199 css::uno::Reference<
200 css::chart::XAxis > m_xSecondYAxis;
201
202 css::uno::Reference<
203 css::beans::XPropertySet > m_xWall;
204 css::uno::Reference<
205 css::beans::XPropertySet > m_xFloor;
206
207 css::uno::Reference<
208 css::beans::XPropertySet > m_xMinMaxLineWrapper;
209 css::uno::Reference<
210 css::beans::XPropertySet > m_xUpBarWrapper;
211 css::uno::Reference<
212 css::beans::XPropertySet > m_xDownBarWrapper;
213};
214
215} // namespace chart::wrapper
216
217/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Reference< css::beans::XPropertySet > getInnerPropertySet() override
css::uno::Reference< css::beans::XPropertySet > m_xDownBarWrapper
virtual void SAL_CALL set3DSettingsToDefault() override
std::shared_ptr< Chart2ModelContact > m_spChart2ModelContact
css::uno::Reference< css::chart::XAxis > m_xZAxis
virtual css::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxes() override
css::uno::Reference< css::chart::XAxis > m_xXAxis
virtual sal_Bool SAL_CALL isExcludingDiagramPositioning() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getDataPointProperties(sal_Int32 nCol, sal_Int32 nRow) override
virtual std::vector< std::unique_ptr< WrappedProperty > > createWrappedProperties() override
virtual void SAL_CALL setSize(const css::awt::Size &aSize) override
css::uno::Reference< css::beans::XPropertySet > m_xFloor
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getSecondaryXAxis() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFloor() override
virtual void SAL_CALL setDiagram(const css::uno::Reference< css::chart2::XDiagram > &xDiagram) override
virtual void SAL_CALL setDiagramPositionExcludingAxes(const css::awt::Rectangle &PositionRect) override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getZMainGrid() override
virtual css::awt::Point SAL_CALL getPosition() override
virtual css::uno::Reference< css::chart::XAxis > SAL_CALL getSecondaryAxis(sal_Int32 nDimensionIndex) override
virtual css::awt::Rectangle SAL_CALL calculateDiagramPositionIncludingAxesAndAxisTitles() override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getYAxis() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getMinMaxLine() override
virtual css::uno::Reference< css::chart2::XDiagram > SAL_CALL getDiagram() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getXHelpGrid() override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL dispose() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getXAxis() override
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getXAxisTitle() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getXMainGrid() override
virtual void SAL_CALL setDefaultIllumination() override
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getSecondYAxisTitle() override
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getZAxisTitle() override
virtual OUString SAL_CALL getShapeType() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getDownBar() override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL setDiagramPositionIncludingAxesAndAxisTitles(const css::awt::Rectangle &PositionRect) override
css::uno::Reference< css::beans::XPropertySet > m_xWall
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getSecondaryYAxis() override
virtual void SAL_CALL setDiagramPositionIncludingAxes(const css::awt::Rectangle &PositionRect) override
virtual void SAL_CALL setPosition(const css::awt::Point &aPosition) override
css::uno::Reference< css::beans::XPropertySet > m_xMinMaxLineWrapper
css::uno::Reference< css::beans::XPropertySet > m_xUpBarWrapper
css::uno::Reference< css::chart::XAxis > m_xSecondXAxis
virtual css::awt::Size SAL_CALL getSize() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getWall() override
DiagramWrapper(std::shared_ptr< Chart2ModelContact > spChart2ModelContact)
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getYHelpGrid() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::awt::Rectangle SAL_CALL calculateDiagramPositionExcludingAxes() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getDataRowProperties(sal_Int32 nRow) override
virtual void SAL_CALL setAutomaticDiagramPositioning() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getUpBar() override
css::uno::Reference< css::chart::XAxis > m_xSecondYAxis
virtual void SAL_CALL setDefaultRotation() override
virtual OUString SAL_CALL getDiagramType() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getYMainGrid() override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > m_aEventListenerContainer
virtual sal_Bool SAL_CALL isAutomaticDiagramPositioning() override
virtual ~DiagramWrapper() override
virtual OUString SAL_CALL getImplementationName() override
XServiceInfo declarations.
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getSecondXAxisTitle() override
virtual css::uno::Reference< css::chart::XAxis > SAL_CALL getAxis(sal_Int32 nDimensionIndex) override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getZHelpGrid() override
css::uno::Reference< css::chart::XAxis > m_xYAxis
virtual css::uno::Reference< css::drawing::XShape > SAL_CALL getYAxisTitle() override
virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getZAxis() override
virtual const css::uno::Sequence< css::beans::Property > & getPropertySequence() override
unsigned char sal_Bool