diff options
author | Eike Rathke <erack@redhat.com> | 2018-04-27 16:10:17 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-05-02 22:41:58 +0200 |
commit | 8a9e5326e77e86de2962ee7569d883091f7fe4c7 (patch) | |
tree | 1ba04364827ba3c33a3cd8ccf5f11f724dee0ad4 | |
parent | 21f9812eb53272d50522a649b8c4b3492d95450b (diff) |
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@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
-rw-r--r-- | sc/source/filter/oox/worksheethelper.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
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, |