Debian Codegraph @

chart2/source/controller/inc/DataTableItemConverter.hxx

raw
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
10 #pragma once
11
12 #include "ItemConverter.hxx"
13 #include <rtl/ref.hxx>
14 #include <vector>
15
16 namespace com::sun::star::beans
17 {
18 class XPropertySet;
19 }
20 namespace chart
21 {
22 class ChartModel;
23 }
24
25 class SdrModel;
26
27 namespace chart::wrapper
28 {
29 /** Convert data table properties to and from ItemSet and UNO PropertySet */
30 class DataTableItemConverter final : public ItemConverter
31 {
32 public:
33 DataTableItemConverter(const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
34 SfxItemPool& rItemPool, SdrModel& rDrawModel,
35 const rtl::Reference<::chart::ChartModel>& xChartDoc);
36
37 virtual ~DataTableItemConverter() override;
38
39 virtual void FillItemSet(SfxItemSet& rOutItemSet) const override;
40 virtual bool ApplyItemSet(const SfxItemSet& rItemSet) override;
41
42 protected:
43 virtual const WhichRangesContainer& GetWhichPairs() const override;
44 virtual bool GetItemProperty(tWhichIdType nWhichId,
45 tPropertyNameWithMemberId& rOutProperty) const override;
46
47 private:
48 std::vector<std::unique_ptr<ItemConverter>> m_aConverters;
49 };
50 }
51
52 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */