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