LibreOffice Module chart2 (master) 1
DataTableItemConverter.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
10#pragma once
11
12#include "ItemConverter.hxx"
13#include <rtl/ref.hxx>
14#include <vector>
15
16namespace com::sun::star::awt
17{
18struct Size;
19}
21{
22class XPropertySet;
23}
24namespace chart
25{
26class ChartModel;
27}
28
29class SdrModel;
30
31namespace chart::wrapper
32{
35{
36public:
37 DataTableItemConverter(const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
38 SfxItemPool& rItemPool, SdrModel& rDrawModel,
40
41 virtual ~DataTableItemConverter() override;
42
43 virtual void FillItemSet(SfxItemSet& rOutItemSet) const override;
44 virtual bool ApplyItemSet(const SfxItemSet& rItemSet) override;
45
46protected:
47 virtual const WhichRangesContainer& GetWhichPairs() const override;
48 virtual bool GetItemProperty(tWhichIdType nWhichId,
49 tPropertyNameWithMemberId& rOutProperty) const override;
50
51private:
52 std::vector<std::unique_ptr<ItemConverter>> m_aConverters;
53};
54}
55
56/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Convert data table properties to and from ItemSet and UNO PropertySet.
DataTableItemConverter(const css::uno::Reference< css::beans::XPropertySet > &rPropertySet, SfxItemPool &rItemPool, SdrModel &rDrawModel, const rtl::Reference<::chart::ChartModel > &xChartDoc)
virtual const WhichRangesContainer & GetWhichPairs() const override
implement this method to provide an array of which-ranges
virtual void FillItemSet(SfxItemSet &rOutItemSet) const override
applies all properties that can be mapped to items into the given item set.
virtual ~DataTableItemConverter() override
std::vector< std::unique_ptr< ItemConverter > > m_aConverters
virtual bool ApplyItemSet(const SfxItemSet &rItemSet) override
applies all properties that are results of a conversion from all items in rItemSet to the internal XP...
virtual bool GetItemProperty(tWhichIdType nWhichId, tPropertyNameWithMemberId &rOutProperty) const override
implement this method to return a Property object for a given which id.
This class serves for conversion between properties of an XPropertySet and SfxItems in SfxItemSets.
std::pair< tPropertyNameType, tMemberIdType > tPropertyNameWithMemberId
class SAL_NO_VTABLE XPropertySet