sc/source/core/data/dociter.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit e74cfb13d3e97938ff8924fcf962a8ea03fe9c76 Author: Luboš Luňák <[email protected]> AuthorDate: Wed May 25 11:42:06 2022 +0200 Commit: Luboš Luňák <[email protected]> CommitDate: Wed May 25 13:05:48 2022 +0200 check column again when going to the next Calc sheet Since the number of allocated columns may be lower in the next one. Change-Id: I92eb4642ed01ff6c858a250aefcfa36c565103d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134932 Tested-by: Jenkins Reviewed-by: Luboš Luňák <[email protected]> diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx index d0849d17eb29..c11ca75f05e2 100644 --- a/sc/source/core/data/dociter.cxx +++ b/sc/source/core/data/dociter.cxx @@ -154,7 +154,7 @@ bool ScValueIterator::GetThis(double& rValue, FormulaError& rErr) do { ++mnCol; - if (mnCol > maEndPos.Col() || mnCol >= mrDoc.maTabs[mnTab]->GetAllocatedColumnsCount()) + while (mnCol > maEndPos.Col() || mnCol >= mrDoc.maTabs[mnTab]->GetAllocatedColumnsCount()) { mnCol = maStartPos.Col(); ++mnTab; @@ -909,7 +909,7 @@ bool ScCellIterator::getCurrent() do { maCurPos.IncCol(); - if (maCurPos.Col() >= mrDoc.GetAllocatedColumnsCount(maCurPos.Tab()) + while (maCurPos.Col() >= mrDoc.GetAllocatedColumnsCount(maCurPos.Tab()) || maCurPos.Col() > maEndPos.Col()) { maCurPos.SetCol(maStartPos.Col());
