sc/source/ui/view/spelleng.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit aa99b57cdc8cb3763aa935ed84e7d80c4e56a172 Author: Mark Hung <mark...@gmail.com> AuthorDate: Mon Oct 19 22:33:21 2020 +0800 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 20 08:08:42 2020 +0200 tdf#137594 prevent converting unallocated columns. Check col against GetAllocatedColumnsCount() instead of MaxCol(). This prevents allocating a new column just for converting an empty cell. Change-Id: I5c8dcfffc2661ab9c4fd9c2c53ed389e57351517 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index d9fdc3bb4e68..bb4c1f1ddf85 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -153,7 +153,7 @@ bool ScConversionEngineBase::FindNextConversionCell() bLoop = false; mbFinished = true; } - else if( nNewCol > mrDoc.MaxCol() ) + else if( nNewCol >= mrDoc.GetAllocatedColumnsCount(mnStartTab) ) { // no more cells in the sheet - try to restart at top of sheet @@ -178,6 +178,7 @@ bool ScConversionEngineBase::FindNextConversionCell() } else { + // GetPattern may implicitly allocates the column if not exists, pPattern = mrDoc.GetPattern( nNewCol, nNewRow, mnStartTab ); if( pPattern && (pPattern != pLastPattern) ) { _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits