diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2020-11-16 15:12:43 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-11-24 10:34:19 +0100 |
commit | 3be5e428d669accd841949662d601a6f6e1cdb3f (patch) | |
tree | 1e0e0cd29a9ec6e77887993e9a42723d0d2f938a /oox/source/drawingml | |
parent | 6df0e538ff05b98e1123c5ad1d77f554007bff12 (diff) |
tdf#138181 Chart OOXML: fix deleted legend entries of pie charts
The legend of the pie chart showed deleted legend entries too
when VaryColorsByPoint was false.
Change-Id: I6fc978af0db6e2d39d7f451e765d7ef81c73a05c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105943
Tested-by: Jenkins
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox/source/drawingml')
-rw-r--r-- | oox/source/drawingml/chart/titleconverter.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx index c4bf45dea739..f39929134b63 100644 --- a/oox/source/drawingml/chart/titleconverter.cxx +++ b/oox/source/drawingml/chart/titleconverter.cxx @@ -290,6 +290,13 @@ void LegendConverter::legendEntriesFormatting(const Reference<XDiagram>& rxDiagr if (!xDSCont.is()) continue; + bool bIsPie + = rCT->getChartType().equalsIgnoreAsciiCase("com.sun.star.chart2.PieChartType"); + if (bIsPie) + { + PropertySet xChartTypeProp(rCT); + bIsPie = !xChartTypeProp.getBoolProperty(PROP_UseRings); + } const Sequence<Reference<XDataSeries>> aDataSeriesSeq = xDSCont->getDataSeries(); if (bSwapXAndY) nIndex += aDataSeriesSeq.getLength() - 1; @@ -298,7 +305,7 @@ void LegendConverter::legendEntriesFormatting(const Reference<XDiagram>& rxDiagr PropertySet aSeriesProp(rDataSeries); bool bVaryColorsByPoint = aSeriesProp.getBoolProperty(PROP_VaryColorsByPoint); - if (bVaryColorsByPoint) + if (bVaryColorsByPoint || bIsPie) { Reference<XDataSource> xDSrc(rDataSeries, UNO_QUERY); if (!xDSrc.is()) |