diff options
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 667bc3eee40c..c404148769a5 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -5520,11 +5520,31 @@ bool ScGridWindow::ContinueOnlineSpelling() SCCOL nCol; SCROW nRow; ScRefCellValue* pCell = aIter.GetNext(nCol, nRow); - while (pCell && nRow < mpSpellCheckCxt->maPos.mnRow) + SCROW nEndRow = 0; + bool bHidden = pDoc->RowHidden(nRow, nTab, nullptr, &nEndRow); + bool bSkip = pCell && (nRow < mpSpellCheckCxt->maPos.mnRow || bHidden); + while (bSkip) + { pCell = aIter.GetNext(nCol, nRow); + if (nRow > nEndRow) + { + bHidden = pDoc->RowHidden(nRow, nTab, nullptr, &nEndRow); + } + bSkip = pCell && (nRow < mpSpellCheckCxt->maPos.mnRow || bHidden); + } - while (pCell && nCol < mpSpellCheckCxt->maPos.mnCol) + SCCOL nEndCol = 0; + bHidden = pDoc->ColHidden(nCol, nTab, nullptr, &nEndCol); + bSkip = pCell && (nCol < mpSpellCheckCxt->maPos.mnCol || bHidden); + while (bSkip) + { pCell = aIter.GetNext(nCol, nRow); + if (nCol > nEndCol) + { + bHidden = pDoc->ColHidden(nCol, nTab, nullptr, &nEndCol); + } + bSkip = pCell && (nCol < mpSpellCheckCxt->maPos.mnCol || bHidden); + } std::unique_ptr<ScTabEditEngine> pEngine; |