[Libreoffice-commits] core.git: Branch 'libreoffice-7-0-4' - sc/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Sun Nov 29 20:42:53 UTC 2020


 sc/source/filter/xml/xmlexprt.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 9391b071d5e651f4d9dc963944b28b078cf26bfa
Author:     Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Sat Nov 28 08:43:54 2020 +0200
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Nov 29 21:42:21 2020 +0100

    tdf#138466 Crash when creating different scenarios
    
    apparently this is a regression from
        commit 4176beb7ef831152ce92ac3fa31314438635ec2c
        Author: Noel Grandin <noelgrandin at gmail.com>
        Date:   Sat Sep 12 18:21:44 2020 +0200
        tdf#133327 fix calc loading background color with many cols
    
    but I have no idea how or why, so just fix the crash.
    
    Change-Id: Ia2f056fc53527338c431d3b34bb64e6eedc8e955
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106799
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    (cherry picked from commit 52aebe6986bcec07071adb3f94d6c09fea147044)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106748
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
    (cherry picked from commit 7f2828aa84f87c85c92969a9b0eace4df75870df)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106811
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index a8de8508f4d1..12d3b0eb6b9b 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -866,8 +866,9 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const ScRange& aColumnHe
             nColsRepeated = 1;
         }
     }
-    assert(nPrevIndex >= 0 && "coverity#1438402");
-    WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
+    // tdf#138466
+    if (nPrevIndex != -1)
+        WriteColumn(nPrevColumn, nColsRepeated, nPrevIndex, bPrevIsVisible);
     if (!bIsClosed)
         CloseHeaderColumn();
     if (pGroupColumns->IsGroupEnd(nColumn - 1))


More information about the Libreoffice-commits mailing list