sc/source/filter/oox/worksheethelper.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
New commits: commit a49200d976b8dc0a33d5d1f3a3e52bf2e97828f2 Author: Eike Rathke <er...@redhat.com> Date: Mon May 14 14:38:36 2018 +0200 Related: tdf#116939 Disable <cols><col> overflow detection due to excess ... ... custom column widths. It's probably just confusing to users, even if technically correct. Live with truncation of a "layout form" if no content is present. Change-Id: I43d77c3e019badd053cb21d92aacd64c7bbcf0e6 Reviewed-on: https://gerrit.libreoffice.org/54319 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins <c...@libreoffice.org> (cherry picked from commit f72bd4f02b70e1c4855795b4237e2965556c4689) Reviewed-on: https://gerrit.libreoffice.org/54332 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/filter/oox/worksheethelper.cxx b/sc/source/filter/oox/worksheethelper.cxx index 6af0e32a1e80..24df7a71a83d 100644 --- a/sc/source/filter/oox/worksheethelper.cxx +++ b/sc/source/filter/oox/worksheethelper.cxx @@ -772,9 +772,6 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& rModel ) --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 @@ -784,7 +781,12 @@ void WorksheetGlobals::setColumnModel( const ColumnModel& rModel ) // the range that should be caught anyway. else if (nLastCol == getAddressConverter().getMaxXlsAddress().Col()) nLastCol = mrMaxApiPos.Col(); - else if( !getAddressConverter().checkCol( nLastCol, true ) ) + // User may have applied custom column widths to arbitrary excess + // columns. Ignore those and don't track as overflow columns (false). + // Effectively this does the same as the above cases, just keep them + // for explanation. + // Actual data present should trigger the overflow detection later. + else if( !getAddressConverter().checkCol( nLastCol, false ) ) nLastCol = mrMaxApiPos.Col(); // try to find entry in column model map that is able to merge with the passed model bool bInsertModel = true; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits