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 <cppuhelper/implbase.hxx>
22 #include <cppuhelper/weakref.hxx>
23 #include <comphelper/uno3.hxx>
24 #include <com/sun/star/container/XChild.hpp>
25 #include <com/sun/star/util/XCloneable.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <OPropertySet.hxx>
29 #include <ModifyListenerHelper.hxx>
36 typedef ::cppu::WeakImplHelper
<
37 css::container::XChild
,
38 css::util::XCloneable
,
39 css::util::XModifyBroadcaster
,
40 css::util::XModifyListener
,
41 css::lang::XServiceInfo
>
45 class DataPoint final
:
46 public impl::DataPoint_Base
,
47 public ::property::OPropertySet
50 explicit DataPoint( const css::uno::Reference
< css::beans::XPropertySet
> & rParentProperties
);
51 virtual ~DataPoint() override
;
53 /// merge XInterface implementations
55 /// XServiceInfo declarations
56 virtual OUString SAL_CALL
getImplementationName() override
;
57 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
58 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
61 explicit DataPoint( const DataPoint
& rOther
);
63 // ____ OPropertySet ____
64 virtual void GetDefaultValue( sal_Int32 nHandle
, css::uno::Any
& rAny
) const override
;
65 virtual ::cppu::IPropertyArrayHelper
& SAL_CALL
getInfoHelper() override
;
66 virtual void SAL_CALL setFastPropertyValue_NoBroadcast
68 const css::uno::Any
& rValue
) override
;
70 // ____ XPropertySet ____
71 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
72 getPropertySetInfo() override
;
74 // ____ XCloneable ____
75 // Note: m_xParentProperties are not cloned!
76 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone() override
;
79 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
getParent() override
;
80 virtual void SAL_CALL
setParent(
81 const css::uno::Reference
< css::uno::XInterface
>& Parent
) override
;
83 // ____ XModifyBroadcaster ____
84 virtual void SAL_CALL
addModifyListener(
85 const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
86 virtual void SAL_CALL
removeModifyListener(
87 const css::uno::Reference
< css::util::XModifyListener
>& aListener
) override
;
89 // ____ XModifyListener ____
90 virtual void SAL_CALL
modified(
91 const css::lang::EventObject
& aEvent
) override
;
93 // ____ XEventListener (base of XModifyListener) ____
94 virtual void SAL_CALL
disposing(
95 const css::lang::EventObject
& Source
) override
;
97 // ____ OPropertySet ____
98 virtual void firePropertyChangeEvent() override
;
99 using OPropertySet::disposing
;
101 css::uno::WeakReference
< css::beans::XPropertySet
> m_xParentProperties
;
103 rtl::Reference
<ModifyEventForwarder
> m_xModifyEventForwarder
;
104 bool m_bNoParentPropAllowed
;
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */