sc/source/core/data/table1.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
New commits: commit 11e381c527ebd440e4d64d19a5bc27bdc9ea70fc Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Apr 11 16:35:23 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Apr 12 12:46:13 2019 +0200 crashtesting: failure on import of tdf90694-1.ots since... commit 7282014e362a1529a36c88eb308df8ed359c2cfa Date: Fri Feb 1 15:15:16 2019 +0100 tdf#50916 Makes numbers of columns dynamic Change-Id: I7a624f391c85f9c7af07f951c9da3914460b7526 Reviewed-on: https://gerrit.libreoffice.org/70602 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sc/source/core/data/table1.cxx b/sc/source/core/data/table1.cxx index d964642bd498..057398906f47 100644 --- a/sc/source/core/data/table1.cxx +++ b/sc/source/core/data/table1.cxx @@ -2059,10 +2059,18 @@ void ScTable::MaybeAddExtraColumn(SCCOL& rCol, SCROW nRow, OutputDevice* pDev, d SCCOL nNewCol = rCol; while (nMissing > 0 && nNewCol < MAXCOL) { - ScRefCellValue aNextCell = aCol[nNewCol+1].GetCellValue(nRow); - if (!aNextCell.isEmpty()) + auto nNextCol = nNewCol + 1; + bool bNextEmpty = true; + if (GetAllocatedColumnsCount() > nNextCol) + { + ScRefCellValue aNextCell = aCol[nNextCol].GetCellValue(nRow); + bNextEmpty = aNextCell.isEmpty(); + } + if (!bNextEmpty) + { // Cell content in a next column ends display of this string. nMissing = 0; + } else nMissing -= GetColWidth(++nNewCol); } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits