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 CHART_DATAPOINT_HXX
20 #define CHART_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"
33 #include "ServiceMacros.hxx"
43 typedef ::cppu::WeakImplHelper5
<
44 ::com::sun::star::container::XChild
,
45 ::com::sun::star::util::XCloneable
,
46 ::com::sun::star::util::XModifyBroadcaster
,
47 ::com::sun::star::util::XModifyListener
,
48 ::com::sun::star::lang::XServiceInfo
>
53 public MutexContainer
,
54 public impl::DataPoint_Base
,
55 public ::property::OPropertySet
58 DataPoint( const ::com::sun::star::uno::Reference
<
59 ::com::sun::star::beans::XPropertySet
> & rParentProperties
);
62 /// merge XInterface implementations
64 /// XServiceInfo declarations
65 APPHELPER_XSERVICEINFO_DECL()
68 explicit DataPoint( const DataPoint
& rOther
);
70 // ____ OPropertySet ____
71 virtual ::com::sun::star::uno::Any
GetDefaultValue( sal_Int32 nHandle
) const
72 throw(::com::sun::star::beans::UnknownPropertyException
);
73 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper();
74 virtual void SAL_CALL setFastPropertyValue_NoBroadcast
76 const ::com::sun::star::uno::Any
& rValue
)
77 throw (::com::sun::star::uno::Exception
);
79 // ____ XPropertySet ____
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
82 throw (::com::sun::star::uno::RuntimeException
);
84 // ____ XCloneable ____
85 // Note: m_xParentProperties are not cloned!
86 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::util::XCloneable
> SAL_CALL
createClone()
87 throw (::com::sun::star::uno::RuntimeException
);
90 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
getParent()
91 throw (::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
setParent(
93 const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& Parent
)
94 throw (::com::sun::star::lang::NoSupportException
,
95 ::com::sun::star::uno::RuntimeException
);
97 // ____ XModifyBroadcaster ____
98 virtual void SAL_CALL
addModifyListener(
99 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
100 throw (::com::sun::star::uno::RuntimeException
);
101 virtual void SAL_CALL
removeModifyListener(
102 const ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
>& aListener
)
103 throw (::com::sun::star::uno::RuntimeException
);
105 // ____ XModifyListener ____
106 virtual void SAL_CALL
modified(
107 const ::com::sun::star::lang::EventObject
& aEvent
)
108 throw (::com::sun::star::uno::RuntimeException
);
110 // ____ XEventListener (base of XModifyListener) ____
111 virtual void SAL_CALL
disposing(
112 const ::com::sun::star::lang::EventObject
& Source
)
113 throw (::com::sun::star::uno::RuntimeException
);
115 // ____ OPropertySet ____
116 virtual void firePropertyChangeEvent();
117 using OPropertySet::disposing
;
119 void fireModifyEvent();
122 ::com::sun::star::uno::WeakReference
<
123 ::com::sun::star::beans::XPropertySet
> m_xParentProperties
;
125 ::com::sun::star::uno::Reference
< ::com::sun::star::util::XModifyListener
> m_xModifyEventForwarder
;
126 bool m_bNoParentPropAllowed
;
131 // CHART_DATAPOINT_HXX
134 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */