Bump version to 6.4-15
[LibreOffice.git] / chart2 / source / model / inc / Diagram.hxx
blobc9690981bfbc5e43f510f6fa48278cfd98ee2f2f
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 #ifndef INCLUDED_CHART2_SOURCE_MODEL_INC_DIAGRAM_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_INC_DIAGRAM_HXX
22 #include <OPropertySet.hxx>
23 #include <MutexContainer.hxx>
24 #include <cppuhelper/implbase.hxx>
25 #include <comphelper/uno3.hxx>
26 #include <com/sun/star/chart2/XDiagram.hpp>
27 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
28 #include <com/sun/star/chart2/XTitled.hpp>
29 #include <com/sun/star/chart/X3DDefaultSetter.hpp>
30 #include <com/sun/star/lang/XServiceInfo.hpp>
31 #include <com/sun/star/util/XCloneable.hpp>
32 #include <com/sun/star/util/XModifyBroadcaster.hpp>
33 #include <com/sun/star/util/XModifyListener.hpp>
35 #include <vector>
37 namespace com { namespace sun { namespace star { namespace beans { struct PropertyValue; } } } }
38 namespace com { namespace sun { namespace star { namespace chart2 { namespace data { class XDataSource; } } } } }
39 namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } } } }
41 namespace chart
44 namespace impl
46 typedef ::cppu::WeakImplHelper<
47 css::chart2::XDiagram,
48 css::lang::XServiceInfo,
49 css::chart2::XCoordinateSystemContainer,
50 css::chart2::XTitled,
51 css::chart::X3DDefaultSetter,
52 css::util::XModifyBroadcaster,
53 css::util::XModifyListener,
54 css::util::XCloneable >
55 Diagram_Base;
58 class Diagram final :
59 public MutexContainer,
60 public impl::Diagram_Base,
61 public ::property::OPropertySet
63 public:
64 Diagram( css::uno::Reference< css::uno::XComponentContext > const & xContext );
65 virtual ~Diagram() override;
67 /// XServiceInfo declarations
68 virtual OUString SAL_CALL getImplementationName() override;
69 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
70 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
72 /// merge XInterface implementations
73 DECLARE_XINTERFACE()
74 /// merge XTypeProvider implementations
75 DECLARE_XTYPEPROVIDER()
77 private:
78 explicit Diagram( const Diagram & rOther );
80 // ____ OPropertySet ____
81 virtual css::uno::Any GetDefaultValue( sal_Int32 nHandle ) const override;
83 // ____ OPropertySet ____
84 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() override;
86 // ____ XPropertySet ____
87 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
88 getPropertySetInfo() override;
90 // ____ XFastPropertySet ____
91 virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const css::uno::Any& rValue ) override;
93 /// make original interface function visible again
94 using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue;
96 virtual void SAL_CALL getFastPropertyValue(
97 css::uno::Any& rValue, sal_Int32 nHandle ) const override;
99 // ____ XDiagram ____
100 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getWall() override;
101 virtual css::uno::Reference< css::beans::XPropertySet > SAL_CALL getFloor() override;
102 virtual css::uno::Reference< css::chart2::XLegend > SAL_CALL getLegend() override;
103 virtual void SAL_CALL setLegend( const css::uno::Reference<
104 css::chart2::XLegend >& xLegend ) override;
105 virtual css::uno::Reference< css::chart2::XColorScheme > SAL_CALL getDefaultColorScheme() override;
106 virtual void SAL_CALL setDefaultColorScheme(
107 const css::uno::Reference< css::chart2::XColorScheme >& xColorScheme ) override;
108 virtual void SAL_CALL setDiagramData(
109 const css::uno::Reference< css::chart2::data::XDataSource >& xDataSource,
110 const css::uno::Sequence< css::beans::PropertyValue >& aArguments ) override;
112 // ____ XCoordinateSystemContainer ____
113 virtual void SAL_CALL addCoordinateSystem(
114 const css::uno::Reference< css::chart2::XCoordinateSystem >& aCoordSys ) override;
115 virtual void SAL_CALL removeCoordinateSystem(
116 const css::uno::Reference< css::chart2::XCoordinateSystem >& aCoordSys ) override;
117 virtual css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > > SAL_CALL getCoordinateSystems() override;
118 virtual void SAL_CALL setCoordinateSystems(
119 const css::uno::Sequence< css::uno::Reference< css::chart2::XCoordinateSystem > >& aCoordinateSystems ) override;
121 // ____ XTitled ____
122 virtual css::uno::Reference<
123 css::chart2::XTitle > SAL_CALL getTitleObject() override;
124 virtual void SAL_CALL setTitleObject( const css::uno::Reference<
125 css::chart2::XTitle >& Title ) override;
127 // ____ X3DDefaultSetter ____
128 virtual void SAL_CALL set3DSettingsToDefault() override;
129 virtual void SAL_CALL setDefaultRotation() override;
130 virtual void SAL_CALL setDefaultIllumination() override;
132 // ____ XCloneable ____
133 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
135 // ____ XModifyBroadcaster ____
136 virtual void SAL_CALL addModifyListener(
137 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
138 virtual void SAL_CALL removeModifyListener(
139 const css::uno::Reference< css::util::XModifyListener >& aListener ) override;
141 // ____ XModifyListener ____
142 virtual void SAL_CALL modified(
143 const css::lang::EventObject& aEvent ) override;
145 // ____ XEventListener (base of XModifyListener) ____
146 virtual void SAL_CALL disposing(
147 const css::lang::EventObject& Source ) override;
149 // ____ OPropertySet ____
150 virtual void firePropertyChangeEvent() override;
151 using OPropertySet::disposing;
153 void fireModifyEvent();
155 css::uno::Reference< css::uno::XComponentContext > m_xContext;
157 typedef
158 std::vector< css::uno::Reference< css::chart2::XCoordinateSystem > >
159 tCoordinateSystemContainerType;
161 tCoordinateSystemContainerType m_aCoordSystems;
163 css::uno::Reference< css::beans::XPropertySet >
164 m_xWall;
166 css::uno::Reference< css::beans::XPropertySet >
167 m_xFloor;
169 css::uno::Reference< css::chart2::XTitle >
170 m_xTitle;
172 css::uno::Reference< css::chart2::XLegend >
173 m_xLegend;
175 css::uno::Reference< css::chart2::XColorScheme >
176 m_xColorScheme;
178 css::uno::Reference< css::util::XModifyListener > m_xModifyEventForwarder;
181 } // namespace chart
183 // INCLUDED_CHART2_SOURCE_MODEL_INC_DIAGRAM_HXX
184 #endif
186 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */