sc/source/filter/excel/xepivotxml.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f30596347b12a7d0b9b78a1e4e2bc50eca9223a
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Jun 14 10:35:38 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Jun 15 20:44:35 2022 +0200

    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 <caol...@redhat.com>

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,

Reply via email to