diff options
author | Eike Rathke <erack@redhat.com> | 2020-12-18 20:27:34 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2020-12-18 22:47:36 +0100 |
commit | 121d4f610a2b4caa871aa0132eccbd4e12d13b3f (patch) | |
tree | 91ef91c0fa66a337a5b259d423335996c78f0a33 /sc/source/core/tool/token.cxx | |
parent | 8c5c6b8993a52c40b9de231e778204bcdca16333 (diff) |
Resolves: tdf#138710 Do not push an out-of-bounds bound to boundaries
... if a virtual non-existent row is being shifted in for
MAXROWCOUNT (MAXROW+1), so sc/source/core/tool/sharedformula.cxx
SharedFormulaUtil::splitFormulaCellGroups() is not triggered to
split a group there, which would throw an exception. Instead of
returning false ...
CellStoreType::position_type aPos = rCells.position(nRow);
if (aPos.first == rCells.end())
return false;
However, avoiding the cause is the solution.
Change-Id: I8f9adcb62bb78bc98092677b5d4fdc7fc3baf150
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107979
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/core/tool/token.cxx')
-rw-r--r-- | sc/source/core/tool/token.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx index df968b26a4fb..91e73e4ac49f 100644 --- a/sc/source/core/tool/token.cxx +++ b/sc/source/core/tool/token.cxx @@ -4530,7 +4530,8 @@ void checkBounds( // No intersections. return; - if (aAbs.aStart.Row() <= rCheckRange.aStart.Row()) + // rCheckRange may be a virtual non-existent row being shifted in. + if (aAbs.aStart.Row() <= rCheckRange.aStart.Row() && rCheckRange.aStart.Row() < rLimits.GetMaxRowCount()) { // +-+ <---- top // | | |