summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2021-04-08 15:08:38 +0200
committerJan Holesovsky <kendy@collabora.com>2021-04-14 11:04:22 +0200
commitd8d1b869e8554c0aa1e13114b9fe1fdc236c47d8 (patch)
treea0e330394f47a9ee6afdc5db3cf18a6a3f101032 /oox
parent5389028154847f05a5138d85645f7d0639e10b16 (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/+/113804 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Jan Holesovsky <kendy@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 b3c76915a5de..32bbfb545ef2 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -414,9 +414,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;
for (auto const& axesSet : aAxesSets)