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

Eike Rathke erack at redhat.com
Wed May 2 20:42:19 UTC 2018


 sc/source/filter/oox/worksheethelper.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 8a9e5326e77e86de2962ee7569d883091f7fe4c7
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Apr 27 16:10:17 2018 +0200

    Resolves: tdf#116939 cater for the last cols col incremented by Excel
    
    Change-Id: I48c4b9afb4cf2cb826ae2bb52067256e7fcb2c83
    (cherry picked from commit b78ab482911356ef282f7fd40a4509320608a203)
    Reviewed-on: https://gerrit.libreoffice.org/53565
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx
index aade8b4e88d0..6af0e32a1e80 100644
--- a/sc/source/filter/oox/worksheethelper.cxx
+++ b/sc/source/filter/oox/worksheethelper.cxx
@@ -770,6 +770,13 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& rModel )
         // checkCol(). Cater for this oddity.
         if (nLastCol == mrMaxApiPos.Col() + 1)
             --nLastCol;
+        // This is totally fouled up. If we saved 1025 and the file is saved
+        // with Excel again, it increments the value to 1026.
+        /* TODO: we may have to completely ignore the very last
+         * <cols><col ... max=...></cols> value and use checkCol(...,false) on
+         * that, if it turns out that Excel stores arbitrary columns. */
+        else if (nLastCol == mrMaxApiPos.Col() + 2)
+            nLastCol -= 2;
         // Excel may add a column range for the remaining columns (with
         // <cols><col .../></cols>), even if not used or only used to grey out
         // columns in page break view. Don't let that trigger overflow warning,


More information about the Libreoffice-commits mailing list