summaryrefslogtreecommitdiff
path: root/chart2/source/controller/inc
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2022-06-28 07:48:45 +0200
committerTomaž Vajngerl <quikee@gmail.com>2022-08-14 18:15:53 +0200
commit300ea910badeef2c8038d9bb20683ea26f4b1973 (patch)
treeb74a9df57023c1c02cf97b55dd05885186945c54 /chart2/source/controller/inc
parent7601cf11ea31d4b74d82fde28aba65a2e2051258 (diff)
chart2: add UI to the data table
This adds a new object type "Data Table", with all the object identifiers and converters of properties. The data table is now shown in the drop-down of chart elements. A properties dialog was added, which allows to change properties of a data table. This contains the area, line and font tab pages and a new tab page specific for data tables, to change if the horiz. or vert. borders, key or the outline should be show. Change-Id: I9b4cd58cffbcc952daaa2c0c8f8a5a17e38ac293 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138246 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'chart2/source/controller/inc')
-rw-r--r--chart2/source/controller/inc/DataTableItemConverter.hxx57
1 files changed, 57 insertions, 0 deletions
diff --git a/chart2/source/controller/inc/DataTableItemConverter.hxx b/chart2/source/controller/inc/DataTableItemConverter.hxx
new file mode 100644
index 000000000000..65483f0f16f1
--- /dev/null
+++ b/chart2/source/controller/inc/DataTableItemConverter.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include "ItemConverter.hxx"
+#include <rtl/ref.hxx>
+#include <vector>
+
+namespace com::sun::star::awt
+{
+struct Size;
+}
+namespace com::sun::star::beans
+{
+class XPropertySet;
+}
+namespace chart
+{
+class ChartModel;
+}
+
+class SdrModel;
+
+namespace chart::wrapper
+{
+class DataTableItemConverter final : public ItemConverter
+{
+public:
+ DataTableItemConverter(const css::uno::Reference<css::beans::XPropertySet>& rPropertySet,
+ SfxItemPool& rItemPool, SdrModel& rDrawModel,
+ const rtl::Reference<::chart::ChartModel>& xChartDoc,
+ const css::awt::Size* pRefSize);
+
+ virtual ~DataTableItemConverter() override;
+
+ virtual void FillItemSet(SfxItemSet& rOutItemSet) const override;
+ virtual bool ApplyItemSet(const SfxItemSet& rItemSet) override;
+
+protected:
+ virtual const WhichRangesContainer& GetWhichPairs() const override;
+ virtual bool GetItemProperty(tWhichIdType nWhichId,
+ tPropertyNameWithMemberId& rOutProperty) const override;
+
+private:
+ std::vector<std::unique_ptr<ItemConverter>> m_aConverters;
+ rtl::Reference<::chart::ChartModel> m_xChartDoc;
+};
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */