From 6e847aa817999ab18acd534f9e6a86685bb268fc Mon Sep 17 00:00:00 2001 From: Tünde Tóth Date: Wed, 18 Dec 2019 09:49:26 +0100 Subject: tdf#129859 XLSX import: don't show deleted legend entries MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit by adding a new feature to disable selected data points in pie charts. Fixing also tdf#129858 by deleting the correct legend entry in bar charts. Change-Id: Iaaf3a864e9404b8b6d3e2affbb366e18d0f4b43e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86160 Reviewed-by: László Németh Tested-by: László Németh --- chart2/source/model/main/DataSeriesProperties.cxx | 6 ++++++ chart2/source/model/main/DataSeriesProperties.hxx | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'chart2/source/model/main') diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx index c43ced71f40c..5d0cb777e151 100644 --- a/chart2/source/model/main/DataSeriesProperties.cxx +++ b/chart2/source/model/main/DataSeriesProperties.cxx @@ -63,6 +63,12 @@ void DataSeriesProperties::AddPropertiesToVector( beans::PropertyAttribute::BOUND | beans::PropertyAttribute::MAYBEDEFAULT ); + rOutProperties.emplace_back( "DeletedLegendEntries", + PROP_DATASERIES_DELETED_LEGEND_ENTRIES, + cppu::UnoType>::get(), + beans::PropertyAttribute::BOUND + | beans::PropertyAttribute::MAYBEVOID ); + // add properties of service DataPointProperties DataPointProperties::AddPropertiesToVector( rOutProperties ); } diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/model/main/DataSeriesProperties.hxx index 6791078d5678..b0f6283db54c 100644 --- a/chart2/source/model/main/DataSeriesProperties.hxx +++ b/chart2/source/model/main/DataSeriesProperties.hxx @@ -37,7 +37,8 @@ namespace DataSeriesProperties PROP_DATASERIES_STACKING_DIRECTION, PROP_DATASERIES_VARY_COLORS_BY_POINT, PROP_DATASERIES_ATTACHED_AXIS_INDEX, - PROP_DATASERIES_SHOW_LEGEND_ENTRY + PROP_DATASERIES_SHOW_LEGEND_ENTRY, + PROP_DATASERIES_DELETED_LEGEND_ENTRIES }; void AddPropertiesToVector( -- cgit v1.2.3