summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-04-08 15:08:38 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2021-04-12 13:39:57 +0200
commitbe82f6313f298c13a2f040b218c6f2a33705ff8c (patch)
treedaa82f03380ca0565a1e6df88daa65498558d4f2 /oox
parent0b527b7fe7fdceb04e9b35b345b58c72d9ddc656 (diff)
tdf#140489 fix chart display in xlsx
Commit 1147383: tdf#114181 XLSX combined chart: fix swapped primary and secondary axes etc. introduced regression by applying axis swaping not only for combined charts. Change-Id: I764399579ff922ddd495540fdd2a39675f2a8da5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113836 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index 80ea37c57d30..9a0f9d337c8a 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -420,9 +420,13 @@ void PlotAreaConverter::convertFromModel( View3DModel& rView3DModel )
// varying point colors only for single series in single chart type
bool bSupportsVaryColorsByPoint = mrModel.maTypeGroups.size() == 1;
+ bool bIsCombinedChart = mrModel.maTypeGroups.size() == 2 &&
+ mrModel.maTypeGroups[0]->mnTypeId != mrModel.maTypeGroups[1]->mnTypeId;
+
// convert all axes sets, and check which axis is attached to the first maTypeGroups
- sal_Int32 nStartAxesSetIdx = (rValAxisIds.size() > 1 && aAxesSets.size() > 0 && aAxesSets[0]->maAxes.count( API_Y_AXIS )
- && aAxesSets[0]->maAxes[ API_Y_AXIS ]->mnAxisId != rValAxisIds[0] ) ? 1 : 0;
+ sal_Int32 nStartAxesSetIdx = bIsCombinedChart ? ((rValAxisIds.size() > 1 && aAxesSets.size() > 0 && aAxesSets[0]->maAxes.count( API_Y_AXIS )
+ && aAxesSets[0]->maAxes[ API_Y_AXIS ]->mnAxisId != rValAxisIds[0] ) ? 1 : 0)
+ : 0;
sal_Int32 nAxesSetIdx = nStartAxesSetIdx;
bool bUseFixedInnerSize = false;