fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / model / template / ChartType.hxx
blob84831b01f7aeeab3e18804c36cb075e76a3a4f8e
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_TEMPLATE_CHARTTYPE_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_CHARTTYPE_HXX
22 #include "MutexContainer.hxx"
23 #include "OPropertySet.hxx"
24 #include <cppuhelper/implbase6.hxx>
25 #include <comphelper/uno3.hxx>
26 #include "ModifyListenerHelper.hxx"
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <com/sun/star/chart2/XChartType.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <com/sun/star/chart2/XDataSeriesContainer.hpp>
31 #include <com/sun/star/util/XCloneable.hpp>
33 #include <vector>
35 namespace chart
38 namespace impl
40 typedef ::cppu::WeakImplHelper6<
41 css::lang::XServiceInfo,
42 ::com::sun::star::chart2::XChartType,
43 ::com::sun::star::chart2::XDataSeriesContainer,
44 ::com::sun::star::util::XCloneable,
45 ::com::sun::star::util::XModifyBroadcaster,
46 ::com::sun::star::util::XModifyListener >
47 ChartType_Base;
50 class ChartType :
51 public MutexContainer,
52 public impl::ChartType_Base,
53 public ::property::OPropertySet
55 public:
56 explicit ChartType(
57 ::com::sun::star::uno::Reference<
58 ::com::sun::star::uno::XComponentContext > const & xContext );
59 virtual ~ChartType();
61 /// merge XInterface implementations
62 DECLARE_XINTERFACE()
64 protected:
65 explicit ChartType( const ChartType & rOther );
67 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
68 GetComponentContext() const { return m_xContext;}
70 // ____ XChartType ____
71 // still abstract ! implement !
72 virtual OUString SAL_CALL getChartType()
73 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE = 0;
74 virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > SAL_CALL
75 createCoordinateSystem( ::sal_Int32 DimensionCount )
76 throw (::com::sun::star::lang::IllegalArgumentException,
77 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
79 getSupportedMandatoryRoles()
80 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
82 getSupportedOptionalRoles()
83 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 virtual OUString SAL_CALL getRoleOfSequenceForSeriesLabel()
85 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
86 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
87 getSupportedPropertyRoles()
88 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
90 // ____ XDataSeriesContainer ____
91 virtual void SAL_CALL addDataSeries(
92 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& aDataSeries )
93 throw (::com::sun::star::lang::IllegalArgumentException,
94 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
95 virtual void SAL_CALL removeDataSeries(
96 const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& aDataSeries )
97 throw (::com::sun::star::container::NoSuchElementException,
98 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
99 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > SAL_CALL getDataSeries()
100 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 virtual void SAL_CALL setDataSeries(
102 const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >& aDataSeries )
103 throw (::com::sun::star::lang::IllegalArgumentException,
104 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
106 // ____ XModifyBroadcaster ____
107 virtual void SAL_CALL addModifyListener(
108 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
109 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
110 virtual void SAL_CALL removeModifyListener(
111 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
112 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
114 // ____ XModifyListener ____
115 virtual void SAL_CALL modified(
116 const ::com::sun::star::lang::EventObject& aEvent )
117 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
119 // ____ XEventListener (base of XModifyListener) ____
120 virtual void SAL_CALL disposing(
121 const ::com::sun::star::lang::EventObject& Source )
122 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
124 void fireModifyEvent();
126 // ____ OPropertySet ____
127 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
128 throw(::com::sun::star::beans::UnknownPropertyException) SAL_OVERRIDE;
129 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
131 virtual void firePropertyChangeEvent() SAL_OVERRIDE;
132 using OPropertySet::disposing;
134 // ____ XPropertySet ____
135 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
136 getPropertySetInfo()
137 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
139 /// merge XTypeProvider implementations
140 DECLARE_XTYPEPROVIDER()
142 protected:
143 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >
144 const m_xModifyEventForwarder;
146 private:
147 void impl_addDataSeriesWithoutNotification(
148 const ::com::sun::star::uno::Reference<
149 ::com::sun::star::chart2::XDataSeries >& aDataSeries );
151 private:
152 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
153 const m_xContext;
155 typedef
156 ::std::vector< ::com::sun::star::uno::Reference<
157 ::com::sun::star::chart2::XDataSeries > >
158 tDataSeriesContainerType;
160 // --- mutable members: the following members need mutex guard ---
162 tDataSeriesContainerType m_aDataSeries;
164 bool m_bNotifyChanges;
167 } // namespace chart
169 // INCLUDED_CHART2_SOURCE_MODEL_TEMPLATE_CHARTTYPE_HXX
170 #endif
172 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */