From 2f30596347b12a7d0b9b78a1e4e2bc50eca9223a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 14 Jun 2022 10:35:38 +0100 Subject: don't assert on exporting forum-mso-de-104384.xlsx to xlsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a case of this -2 is also mentioned in commit 97af58093978d8e6b9d90eedcc59141304e7200e Date: Fri Apr 5 22:04:13 2019 +0530 tdf#123421 : xlsx export : Don't write data field entry... Change-Id: Ieded6035539df9d3896f2f08cf03c195082d4987 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135817 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- sc/source/filter/excel/xepivotxml.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sc') diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx index 4bd34041328a..ecc39caae37f 100644 --- a/sc/source/filter/excel/xepivotxml.cxx +++ b/sc/source/filter/excel/xepivotxml.cxx @@ -1118,7 +1118,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP for (const auto& rDataField : aDataFields) { tools::Long nDimIdx = rDataField.mnPos; - assert(aCachedDims[nDimIdx]); // the loop above should have screened for NULL's. + assert(nDimIdx == -2 || aCachedDims[nDimIdx]); // the loop above should have screened for NULL's, skip check for -2 "data field" const ScDPSaveDimension& rDim = *rDataField.mpDim; std::optional pName = rDim.GetLayoutName(); // tdf#124651: despite being optional in CT_DataField according to ECMA-376 Part 1, -- cgit