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 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"
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
>
49 public MutexContainer
,
50 public impl::DataPoint_Base
,
51 public ::property::OPropertySet
54 DataPoint( const ::com::sun::star::uno::Reference
<
55 ::com::sun::star::beans::XPropertySet
> & rParentProperties
);
58 /// merge XInterface implementations
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();
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
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
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
;
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();
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
;
135 // INCLUDED_CHART2_SOURCE_MODEL_MAIN_DATAPOINT_HXX
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */