Avoid potential negative array index access to cached text.
[LibreOffice.git] / chart2 / source / inc / DataTable.hxx
blobda15e264f4f658a085986cc5a6d1dd449f3ab30d
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/.
8 */
10 #pragma once
12 #include "OPropertySet.hxx"
13 #include <cppuhelper/implbase.hxx>
14 #include <comphelper/uno3.hxx>
16 #include "charttoolsdllapi.hxx"
17 #include <com/sun/star/chart2/XDataTable.hpp>
18 #include <com/sun/star/lang/XServiceInfo.hpp>
19 #include <com/sun/star/util/XCloneable.hpp>
20 #include "ModifyListenerHelper.hxx"
22 namespace chart
24 typedef cppu::WeakImplHelper<css::chart2::XDataTable, css::lang::XServiceInfo,
25 css::util::XCloneable, css::util::XModifyBroadcaster,
26 css::util::XModifyListener>
27 DataTable_Base;
29 /** Data table implementation */
30 class OOO_DLLPUBLIC_CHARTTOOLS DataTable final : public DataTable_Base,
31 public ::property::OPropertySet
33 public:
34 explicit DataTable();
35 virtual ~DataTable() override;
37 /// XServiceInfo declarations
38 virtual OUString SAL_CALL getImplementationName() override;
39 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) override;
40 virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
42 /// merge XInterface implementations
43 DECLARE_XINTERFACE()
45 /// merge XTypeProvider implementations
46 DECLARE_XTYPEPROVIDER()
48 explicit DataTable(DataTable const& rOther);
50 private:
51 // ____ OPropertySet ____
52 virtual void GetDefaultValue(sal_Int32 nHandle, css::uno::Any& rAny) const override;
54 // ____ OPropertySet ____
55 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() override;
57 public:
58 // ____ XPropertySet ____
59 virtual css::uno::Reference<css::beans::XPropertySetInfo>
60 SAL_CALL getPropertySetInfo() override;
62 // ____ XCloneable ____
63 virtual css::uno::Reference<css::util::XCloneable> SAL_CALL createClone() override;
65 // ____ XModifyBroadcaster ____
66 virtual void SAL_CALL
67 addModifyListener(const css::uno::Reference<css::util::XModifyListener>& aListener) override;
68 virtual void SAL_CALL
69 removeModifyListener(const css::uno::Reference<css::util::XModifyListener>& aListener) override;
71 private:
72 // ____ XModifyListener ____
73 virtual void SAL_CALL modified(const css::lang::EventObject& aEvent) override;
75 // ____ XEventListener (base of XModifyListener) ____
76 virtual void SAL_CALL disposing(const css::lang::EventObject& Source) override;
78 // ____ OPropertySet ____
79 virtual void firePropertyChangeEvent() override;
80 using OPropertySet::disposing;
82 rtl::Reference<ModifyEventForwarder> m_xModifyEventForwarder;
85 } // namespace chart
87 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */