summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-14 10:35:38 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-06-16 10:02:56 +0200
commitf05cd9e13903b4f0a100475f89a09b2c04bab83d (patch)
treeb9920bf1bfffe37864b42880e682b09ed33e122b /sc
parentc9deea276c8c5b0f1e845b6b6200e67188d555ba (diff)
don't assert on exporting forum-mso-de-104384.xlsx to xlsx
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 <caolanm@redhat.com> (cherry picked from commit 2f30596347b12a7d0b9b78a1e4e2bc50eca9223a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135890 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx2
1 files changed, 1 insertions, 1 deletions
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<OUString> pName = rDim.GetLayoutName();
// tdf#124651: despite being optional in CT_DataField according to ECMA-376 Part 1,