summaryrefslogtreecommitdiff
path: root/chart2/source/model
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-12-05 03:45:17 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-12-05 15:43:28 +0100
commitc32a4c2fac32b766a05473d037d73cbcd972dadd (patch)
tree79a30a34b8b91307a49cd32bb1db3f7908277d9d /chart2/source/model
parent7e7b9a90adc5186d48febce5ee0c0afb09aedaee (diff)
tdf#51671, implement feature to disable legend entry for series
No UI and no ODF or OOXML support yet. Change-Id: I839c195e9c42f074838ff6592331f7cdd13b6cd2 Reviewed-on: https://gerrit.libreoffice.org/64583 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2/source/model')
-rw-r--r--chart2/source/model/main/DataSeriesProperties.cxx7
-rw-r--r--chart2/source/model/main/DataSeriesProperties.hxx3
2 files changed, 9 insertions, 1 deletions
diff --git a/chart2/source/model/main/DataSeriesProperties.cxx b/chart2/source/model/main/DataSeriesProperties.cxx
index 6c7e38d7e038..375e6c441c2a 100644
--- a/chart2/source/model/main/DataSeriesProperties.cxx
+++ b/chart2/source/model/main/DataSeriesProperties.cxx
@@ -57,6 +57,12 @@ void DataSeriesProperties::AddPropertiesToVector(
| beans::PropertyAttribute::MAYBEVOID
| beans::PropertyAttribute::MAYBEDEFAULT );
+ rOutProperties.emplace_back( "ShowLegendEntry",
+ PROP_DATASERIES_SHOW_LEGEND_ENTRY,
+ cppu::UnoType<sal_Bool>::get(),
+ beans::PropertyAttribute::BOUND
+ | beans::PropertyAttribute::MAYBEDEFAULT );
+
// add properties of service DataPointProperties
DataPointProperties::AddPropertiesToVector( rOutProperties );
}
@@ -67,6 +73,7 @@ void DataSeriesProperties::AddDefaultsToMap(
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_STACKING_DIRECTION, chart2::StackingDirection_NO_STACKING );
PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_VARY_COLORS_BY_POINT, false );
PropertyHelper::setPropertyValueDefault< sal_Int32 >( rOutMap, PROP_DATASERIES_ATTACHED_AXIS_INDEX, 0 );
+ PropertyHelper::setPropertyValueDefault( rOutMap, PROP_DATASERIES_SHOW_LEGEND_ENTRY, true );
// PROP_DATASERIES_ATTRIBUTED_DATA_POINTS has no default
diff --git a/chart2/source/model/main/DataSeriesProperties.hxx b/chart2/source/model/main/DataSeriesProperties.hxx
index e27b9acd44f2..6791078d5678 100644
--- a/chart2/source/model/main/DataSeriesProperties.hxx
+++ b/chart2/source/model/main/DataSeriesProperties.hxx
@@ -36,7 +36,8 @@ namespace DataSeriesProperties
PROP_DATASERIES_ATTRIBUTED_DATA_POINTS = FAST_PROPERTY_ID_START_DATA_SERIES,
PROP_DATASERIES_STACKING_DIRECTION,
PROP_DATASERIES_VARY_COLORS_BY_POINT,
- PROP_DATASERIES_ATTACHED_AXIS_INDEX
+ PROP_DATASERIES_ATTACHED_AXIS_INDEX,
+ PROP_DATASERIES_SHOW_LEGEND_ENTRY
};
void AddPropertiesToVector(