summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2022-05-25 11:42:06 +0200
committerLuboš Luňák <l.lunak@collabora.com>2022-05-25 13:05:48 +0200
commite74cfb13d3e97938ff8924fcf962a8ea03fe9c76 (patch)
treeb386611cca02534e950a8482bfde804ef35aba5a /sc
parent2e2304f00960d8e0e8c3ff76e632ef8f92608084 (diff)
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 <l.lunak@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dociter.cxx4
1 files changed, 2 insertions, 2 deletions
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());