summaryrefslogtreecommitdiff
path: root/chart2/source/controller/chartapiwrapper
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-02-03 08:01:55 +0100
committerSamuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>2021-02-08 07:52:27 +0100
commitb99f310d3b24dc45e3d84751e810c0bbff1d991b (patch)
tree6780680407253b0b9f7599843313730309b84368 /chart2/source/controller/chartapiwrapper
parent48a8901a205000e9878c7ee5b4fb26e07ea0a607 (diff)
tdf#94235 Add support for series name in data series labels
including ODF/OOXML import/export (and test) Change-Id: Id5a5194630a67476f7c5390294400a00ea3ad42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110338 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
Diffstat (limited to 'chart2/source/controller/chartapiwrapper')
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
index c786c1b3913c..d317210c3608 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedDataCaptionProperties.cxx
@@ -65,13 +65,15 @@ sal_Int32 lcl_LabelToCaption( const chart2::DataPointLabel& rLabel )
nCaption |= css::chart::ChartDataCaption::TEXT;
if( rLabel.ShowLegendSymbol )
nCaption |= css::chart::ChartDataCaption::SYMBOL;
+ if (rLabel.ShowSeriesName)
+ nCaption |= css::chart::ChartDataCaption::DATA_SERIES;
return nCaption;
}
chart2::DataPointLabel lcl_CaptionToLabel( sal_Int32 nCaption )
{
- chart2::DataPointLabel aLabel(false,false,false,false,false);
+ chart2::DataPointLabel aLabel(false,false,false,false,false,false);
if( nCaption & css::chart::ChartDataCaption::VALUE )
aLabel.ShowNumber = true;
@@ -83,6 +85,8 @@ chart2::DataPointLabel lcl_CaptionToLabel( sal_Int32 nCaption )
aLabel.ShowLegendSymbol = true;
if( nCaption & css::chart::ChartDataCaption::CUSTOM )
aLabel.ShowCustomLabel = true;
+ if( nCaption & css::chart::ChartDataCaption::DATA_SERIES )
+ aLabel.ShowSeriesName = true;
return aLabel;
}