fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / chart2 / source / model / main / DataPoint.hxx
blobd7c8e6ed117731e496247d5dd8ad81024aaf2b51
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_MAIN_DATAPOINT_HXX
20 #define INCLUDED_CHART2_SOURCE_MODEL_MAIN_DATAPOINT_HXX
22 #include <osl/mutex.hxx>
23 #include <cppuhelper/implbase5.hxx>
24 #include <cppuhelper/weakref.hxx>
25 #include <comphelper/uno3.hxx>
26 #include <com/sun/star/container/XChild.hpp>
27 #include <com/sun/star/util/XCloneable.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
30 #include "OPropertySet.hxx"
31 #include "MutexContainer.hxx"
32 #include "ModifyListenerHelper.hxx"
34 namespace chart
37 namespace impl
39 typedef ::cppu::WeakImplHelper5<
40 ::com::sun::star::container::XChild,
41 ::com::sun::star::util::XCloneable,
42 ::com::sun::star::util::XModifyBroadcaster,
43 ::com::sun::star::util::XModifyListener,
44 ::com::sun::star::lang::XServiceInfo >
45 DataPoint_Base;
48 class DataPoint :
49 public MutexContainer,
50 public impl::DataPoint_Base,
51 public ::property::OPropertySet
53 public:
54 DataPoint( const ::com::sun::star::uno::Reference<
55 ::com::sun::star::beans::XPropertySet > & rParentProperties );
56 virtual ~DataPoint();
58 /// merge XInterface implementations
59 DECLARE_XINTERFACE()
60 /// XServiceInfo declarations
61 virtual OUString SAL_CALL getImplementationName()
62 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
63 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName )
64 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
65 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
66 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
68 static OUString getImplementationName_Static();
69 static css::uno::Sequence< OUString > getSupportedServiceNames_Static();
71 protected:
72 explicit DataPoint( const DataPoint & rOther );
74 // ____ OPropertySet ____
75 virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
76 throw(::com::sun::star::beans::UnknownPropertyException) SAL_OVERRIDE;
77 virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper() SAL_OVERRIDE;
78 virtual void SAL_CALL setFastPropertyValue_NoBroadcast
79 ( sal_Int32 nHandle,
80 const ::com::sun::star::uno::Any& rValue )
81 throw (::com::sun::star::uno::Exception, std::exception) SAL_OVERRIDE;
83 // ____ XPropertySet ____
84 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
85 getPropertySetInfo()
86 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
88 // ____ XCloneable ____
89 // Note: m_xParentProperties are not cloned!
90 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
91 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
93 // ____ XChild ____
94 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent()
95 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 virtual void SAL_CALL setParent(
97 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent )
98 throw (::com::sun::star::lang::NoSupportException,
99 ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
101 // ____ XModifyBroadcaster ____
102 virtual void SAL_CALL addModifyListener(
103 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
104 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
105 virtual void SAL_CALL removeModifyListener(
106 const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
107 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
109 // ____ XModifyListener ____
110 virtual void SAL_CALL modified(
111 const ::com::sun::star::lang::EventObject& aEvent )
112 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
114 // ____ XEventListener (base of XModifyListener) ____
115 virtual void SAL_CALL disposing(
116 const ::com::sun::star::lang::EventObject& Source )
117 throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
119 // ____ OPropertySet ____
120 virtual void firePropertyChangeEvent() SAL_OVERRIDE;
121 using OPropertySet::disposing;
123 void fireModifyEvent();
125 private:
126 ::com::sun::star::uno::WeakReference<
127 ::com::sun::star::beans::XPropertySet > m_xParentProperties;
129 ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
130 bool m_bNoParentPropAllowed;
133 } // namespace chart
135 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_DATAPOINT_HXX
136 #endif
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */