summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2020-11-02 10:28:51 +0100
committerLászló Németh <nemeth@numbertext.org>2020-11-12 13:58:17 +0100
commitd23aed9a1fbb6549ca3b8a3e2ab5d779c84e3fb5 (patch)
tree0bfb17366f954885d0205e581618ebf14f407268 /chart2/source
parent3238606c8470f3eaeada3fc601e186ec5cfac925 (diff)
tdf#137874 Chart OOXML import: fix pie chart legend entries
Pie chart legend changed when VaryColorsByPoint was false. Change-Id: I8022e5290f2269a902b4417f91d2e454f088c553 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105172 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index d40d52e7bc7a..b502efd83fe5 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -2668,7 +2668,9 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
ViewLegendEntry aEntry;
OUString aLabelText;
bool bVaryColorsByPoint = rSeries.isVaryColorsByPoint();
- if( bVaryColorsByPoint )
+ if (bVaryColorsByPoint
+ || m_xChartTypeModel->getChartType().equalsIgnoreAsciiCase(
+ CHART2_SERVICE_NAME_CHARTTYPE_PIE))
{
Sequence< OUString > aCategoryNames;
if( m_pExplicitCategoriesProvider )