oox/source/drawingml/chart/typegroupcontext.cxx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
New commits: commit 68912388f43c09ab1fc15dccee85abcb0e0c2b69 Author: Kurt Nordback <kurt.nordb...@collabora.com> AuthorDate: Mon Jun 30 11:14:18 2025 -0600 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Tue Jul 1 12:34:06 2025 +0200 tdf#165742 Step 4.4 follow-on: Fix a faulty assert In the earlier changes I introduced an assert that didn't properly consider a chart with multiple series. This is intended to fix that. Change-Id: I60f097ffae2e7f29aadc5bfaabc739c120be5fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187216 Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> Tested-by: Jenkins (cherry picked from commit 5427624c78f879ae83b5db1f5a0f67d3b4d04e2d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187222 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/oox/source/drawingml/chart/typegroupcontext.cxx b/oox/source/drawingml/chart/typegroupcontext.cxx index e9473084a57c..8f8e284eaa39 100644 --- a/oox/source/drawingml/chart/typegroupcontext.cxx +++ b/oox/source/drawingml/chart/typegroupcontext.cxx @@ -414,9 +414,21 @@ ContextHandlerRef ChartexTypeGroupContext::onCreateContext( [[maybe_unused]] sal return nullptr; case CX_TOKEN(series) : if (rAttribs.hasAttribute(XML_layoutId)) { - // The type ID is currently set to <cx:plotAreaRegion>. Set it + // If this is the first series, then the type ID is currently + // set to <cx:plotAreaRegion>. If this is not the first series + // in a multi-series chart, it should be set to the previous + // chart type in the series (which *should* only be another + // chartex type, not a <c> type). In either case, set it // to the specific chart type based on the layoutId attribute - assert(mrModel.mnTypeId == CX_TOKEN(plotAreaRegion)); + assert(mrModel.mnTypeId == CX_TOKEN(plotAreaRegion) || + mrModel.mnTypeId == CX_TOKEN(boxWhisker) || + mrModel.mnTypeId == CX_TOKEN(clusteredColumn) || + mrModel.mnTypeId == CX_TOKEN(funnel) || + mrModel.mnTypeId == CX_TOKEN(paretoLine) || + mrModel.mnTypeId == CX_TOKEN(regionMap) || + mrModel.mnTypeId == CX_TOKEN(sunburst) || + mrModel.mnTypeId == CX_TOKEN(treemap) || + mrModel.mnTypeId == CX_TOKEN(waterfall)); OUString sChartId = rAttribs.getStringDefaulted(XML_layoutId); assert(!sChartId.isEmpty());