LibreOffice Module chart2 (master) 1
DataPoint.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19#pragma once
20
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>
27
28#include <OPropertySet.hxx>
30
31namespace chart
32{
33
34namespace impl
35{
36typedef ::cppu::WeakImplHelper<
37 css::container::XChild,
38 css::util::XCloneable,
39 css::util::XModifyBroadcaster,
40 css::util::XModifyListener,
41 css::lang::XServiceInfo >
43}
44
45class DataPoint final :
48{
49public:
50 explicit DataPoint( const css::uno::Reference< css::beans::XPropertySet > & rParentProperties );
51 virtual ~DataPoint() override;
52
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;
59
60private:
61 explicit DataPoint( const DataPoint & rOther );
62
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
67 ( sal_Int32 nHandle,
68 const css::uno::Any& rValue ) override;
69
70 // ____ XPropertySet ____
71 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL
72 getPropertySetInfo() override;
73
74 // ____ XCloneable ____
75 // Note: m_xParentProperties are not cloned!
76 virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override;
77
78 // ____ XChild ____
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;
82
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;
88
89 // ____ XModifyListener ____
90 virtual void SAL_CALL modified(
91 const css::lang::EventObject& aEvent ) override;
92
93 // ____ XEventListener (base of XModifyListener) ____
94 virtual void SAL_CALL disposing(
95 const css::lang::EventObject& Source ) override;
96
97 // ____ OPropertySet ____
98 virtual void firePropertyChangeEvent() override;
100
101 css::uno::WeakReference< css::beans::XPropertySet > m_xParentProperties;
102
105};
106
107} // namespace chart
108
109/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
Definition: DataPoint.cxx:243
bool m_bNoParentPropAllowed
Definition: DataPoint.hxx:104
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent() override
Definition: DataPoint.cxx:131
virtual void firePropertyChangeEvent() override
implement this method in derived classes to get called when properties change.
Definition: DataPoint.cxx:222
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle, const css::uno::Any &rValue) override
The same as setFastPropertyValue; nHandle is always valid.
Definition: DataPoint.cxx:157
virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any &rAny) const override
implement this method to provide default values for all properties supporting defaults.
Definition: DataPoint.cxx:143
DataPoint(const css::uno::Reference< css::beans::XPropertySet > &rParentProperties)
virtual void SAL_CALL setParent(const css::uno::Reference< css::uno::XInterface > &Parent) override
Definition: DataPoint.cxx:136
virtual ::cppu::IPropertyArrayHelper &SAL_CALL getInfoHelper() override
The InfoHelper table contains all property names and types of this object.
Definition: DataPoint.cxx:185
rtl::Reference< ModifyEventForwarder > m_xModifyEventForwarder
Definition: DataPoint.hxx:103
virtual void SAL_CALL addModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: DataPoint.cxx:199
virtual ~DataPoint() override
Definition: DataPoint.cxx:100
virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override
Definition: DataPoint.cxx:191
virtual void SAL_CALL modified(const css::lang::EventObject &aEvent) override
Definition: DataPoint.cxx:210
css::uno::WeakReference< css::beans::XPropertySet > m_xParentProperties
Definition: DataPoint.hxx:101
virtual OUString SAL_CALL getImplementationName() override
merge XInterface implementations
Definition: DataPoint.cxx:233
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone() override
Definition: DataPoint.cxx:125
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
Definition: DataPoint.cxx:238
virtual void SAL_CALL removeModifyListener(const css::uno::Reference< css::util::XModifyListener > &aListener) override
Definition: DataPoint.cxx:204
This helper class serves as forwarder of modify events.
void SAL_CALL disposing()
::cppu::WeakImplHelper< css::container::XChild, css::util::XCloneable, css::util::XModifyBroadcaster, css::util::XModifyListener, css::lang::XServiceInfo > DataPoint_Base
Definition: DataPoint.hxx:42
unsigned char sal_Bool
#define DECLARE_XINTERFACE()