summaryrefslogtreecommitdiff
path: root/sc/source/core/data
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-05-09 15:58:32 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-05-10 09:53:02 +0200
commitf7936b8ccd0ce9bea3a5e780443e4ae8f35b9da1 (patch)
tree9fb6163b29f7b70ccf3d0cd373f913c29057748f /sc/source/core/data
parent4709cd82c7fa31eac7bbc9f1991968891080c5f8 (diff)
tdf#125051: fix spellchecking on Calc
Regression from commit 7282014e362a1529a36c88eb308df8ed359c2cfa Date: Fri Feb 1 15:15:16 2019 +0100 tdf#50916 Makes numbers of columns dynamic. Change-Id: Ibc96c36675d8b530b84f9680654f7d8a3b612d9c Reviewed-on: https://gerrit.libreoffice.org/72053 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/core/data')
-rw-r--r--sc/source/core/data/table4.cxx29
1 files changed, 10 insertions, 19 deletions
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index d0e8bb3e987d..0fb45a287026 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -2270,27 +2270,18 @@ bool ScTable::GetNextSpellingCell(SCCOL& rCol, SCROW& rRow, bool bInSel,
}
if (rCol == MAXCOL+1)
return true;
- else
+ for (;;)
{
- bool bStop = false;
- while (!bStop)
- {
- if (ValidCol(rCol))
- {
- bStop = aCol[rCol].GetNextSpellingCell(rRow, bInSel, rMark);
- if (bStop)
- return true;
- else /*if (rRow == MAXROW+1) */
- {
- rCol++;
- rRow = 0;
- }
- }
- else
- return true;
- }
+ if (!ValidCol(rCol))
+ return true;
+ if (rCol >= GetAllocatedColumnsCount())
+ return true;
+ if (aCol[rCol].GetNextSpellingCell(rRow, bInSel, rMark))
+ return true;
+ /*else (rRow == MAXROW+1) */
+ rCol++;
+ rRow = 0;
}
- return false;
}
void ScTable::TestTabRefAbs(SCTAB nTable) const