Kaydet (Commit) 3c364f5d authored tarafından Mike Kaganski's avatar Mike Kaganski

Related: tdf#50916 create valid empty ScHorizontalCellIterator when...

completely outside allocated area.

Prevents crash in spell checker when scrolling into unallocated area, where
first visible column number is greater than maximal allocated column number.
The crash happened when std::vector::reserve threw std::length_error, and
Scheduler::ProcessTaskScheduling abort()ed catching that in std::exception
handler.

Change-Id: Id74706f4a5fedfcc5e4e316c7aea7f5a4fe110be
Reviewed-on: https://gerrit.libreoffice.org/70756Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
Tested-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 4ce65902
......@@ -1924,6 +1924,8 @@ ScHorizontalCellIterator::ScHorizontalCellIterator(ScDocument* pDocument, SCTAB
OSL_FAIL("try to access index out of bounds, FIX IT");
nEndCol = pDoc->maTabs[mnTab]->ClampToAllocatedColumns(nEndCol);
if (nEndCol < nStartCol) // E.g., somewhere completely outside allocated area
nEndCol = nStartCol - 1; // Empty
maColPositions.reserve( nEndCol-nStartCol+1 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment