diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-10-08 00:20:37 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-10-08 17:41:27 +0000 |
commit | eadd75ef212b4dd1b43aeacb34c8dd3ab40df369 (patch) | |
tree | b9abb32764e0edf6263b11adb989ca1dc69bb316 /sc/source | |
parent | 7520e8c0221ec7aa06125dcfafae48c9e37999ae (diff) |
skip hidden rows/columns for spellchecking, tdf#99607
Change-Id: Ic84368f4bb70973c3c5f5293d852fc573c5f73f7
Reviewed-on: https://gerrit.libreoffice.org/29601
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
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; |