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 .
21 #include <OPropertySet.hxx>
22 #include <MutexContainer.hxx>
23 #include <cppuhelper/implbase.hxx>
24 #include <comphelper/uno3.hxx>
25 #include <com/sun/star/chart2/XDiagram.hpp>
26 #include <com/sun/star/chart2/XCoordinateSystemContainer.hpp>
27 #include <com/sun/star/chart2/XTitled.hpp>
28 #include <com/sun/star/chart/X3DDefaultSetter.hpp>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include <com/sun/star/util/XCloneable.hpp>
31 #include <com/sun/star/util/XModifyBroadcaster.hpp>
32 #include <com/sun/star/util/XModifyListener.hpp>
36 namespace com::sun::star::beans
{ struct PropertyValue
; }
37 namespace com::sun::star::chart2::data
{ class XDataSource
; }
38 namespace com::sun::star::uno
{ class XComponentContext
; }
45 typedef ::cppu::WeakImplHelper
<
46 css::chart2::XDiagram
,
47 css::lang::XServiceInfo
,
48 css::chart2::XCoordinateSystemContainer
,
50 css::chart::X3DDefaultSetter
,
51 css::util::XModifyBroadcaster
,
52 css::util::XModifyListener
,
53 css::util::XCloneable
>
58 public MutexContainer
,
59 public impl::Diagram_Base
,
60 public ::property::OPropertySet
63 Diagram( css::uno::Reference
< css::uno::XComponentContext
> const & xContext
);
64 virtual ~Diagram() override
;
66 /// XServiceInfo declarations
67 virtual OUString SAL_CALL
getImplementationName() override
;
68 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
69 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
71 /// merge XInterface implementations
73 /// merge XTypeProvider implementations
74 DECLARE_XTYPEPROVIDER()
77 explicit Diagram( const Diagram
& rOther
);
79 // ____ OPropertySet ____
80 virtual css::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const override
;
82 // ____ OPropertySet ____
83 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
85 // ____ XPropertySet ____
86 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
87 getPropertySetInfo() override
;
89 // ____ XFastPropertySet ____
90 virtual void SAL_CALL
setFastPropertyValue( sal_Int32 nHandle
, const css::uno::Any
& rValue
) override
;
92 /// make original interface function visible again
93 using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue
;
95 virtual void SAL_CALL
getFastPropertyValue(
96 css::uno::Any
& rValue
, sal_Int32 nHandle
) const override
;
99 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getWall() override
;
100 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
getFloor() override
;
101 virtual css::uno::Reference
< css::chart2::XLegend
> SAL_CALL
getLegend() override
;
102 virtual void SAL_CALL
setLegend( const css::uno::Reference
<
103 css::chart2::XLegend
>& xLegend
) override
;
104 virtual css::uno::Reference
< css::chart2::XColorScheme
> SAL_CALL
getDefaultColorScheme() override
;
105 virtual void SAL_CALL
setDefaultColorScheme(
106 const css::uno::Reference
< css::chart2::XColorScheme
>& xColorScheme
) override
;
107 virtual void SAL_CALL
setDiagramData(
108 const css::uno::Reference
< css::chart2::data::XDataSource
>& xDataSource
,
109 const css::uno::Sequence
< css::beans::PropertyValue
>& aArguments
) override
;
111 // ____ XCoordinateSystemContainer ____
112 virtual void SAL_CALL
addCoordinateSystem(
113 const css::uno::Reference
< css::chart2::XCoordinateSystem
>& aCoordSys
) override
;
114 virtual void SAL_CALL
removeCoordinateSystem(
115 const css::uno::Reference
< css::chart2::XCoordinateSystem
>& aCoordSys
) override
;
116 virtual css::uno::Sequence
< css::uno::Reference
< css::chart2::XCoordinateSystem
> > SAL_CALL
getCoordinateSystems() override
;
117 virtual void SAL_CALL
setCoordinateSystems(
118 const css::uno::Sequence
< css::uno::Reference
< css::chart2::XCoordinateSystem
> >& aCoordinateSystems
) override
;
121 virtual css::uno::Reference
<
122 css::chart2::XTitle
> SAL_CALL
getTitleObject() override
;
123 virtual void SAL_CALL
setTitleObject( const css::uno::Reference
<
124 css::chart2::XTitle
>& Title
) override
;
126 // ____ X3DDefaultSetter ____
127 virtual void SAL_CALL
set3DSettingsToDefault() override
;
128 virtual void SAL_CALL
setDefaultRotation() override
;
129 virtual void SAL_CALL
setDefaultIllumination() override
;
131 // ____ XCloneable ____
132 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone() override
;
134 // ____ XModifyBroadcaster ____
135 virtual void SAL_CALL
addModifyListener(
136 const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
137 virtual void SAL_CALL
removeModifyListener(
138 const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
140 // ____ XModifyListener ____
141 virtual void SAL_CALL
modified(
142 const css::lang::EventObject
& aEvent
) override
;
144 // ____ XEventListener (base of XModifyListener) ____
145 virtual void SAL_CALL
disposing(
146 const css::lang::EventObject
& Source
) override
;
148 // ____ OPropertySet ____
149 virtual void firePropertyChangeEvent() override
;
150 using OPropertySet::disposing
;
152 void fireModifyEvent();
154 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
157 std::vector
< css::uno::Reference
< css::chart2::XCoordinateSystem
> >
158 tCoordinateSystemContainerType
;
160 tCoordinateSystemContainerType m_aCoordSystems
;
162 css::uno::Reference
< css::beans::XPropertySet
>
165 css::uno::Reference
< css::beans::XPropertySet
>
168 css::uno::Reference
< css::chart2::XTitle
>
171 css::uno::Reference
< css::chart2::XLegend
>
174 css::uno::Reference
< css::chart2::XColorScheme
>
177 css::uno::Reference
< css::util::XModifyListener
> m_xModifyEventForwarder
;
182 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */