summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <libreoffice@kohei.us>2013-09-07 16:51:22 -0400
committerKohei Yoshida <libreoffice@kohei.us>2013-09-07 16:55:10 -0400
commit6f41d3dbcf618d3636ab456f933354dd5ed17cef (patch)
tree3d2d4d4b82ce9739a234d9c36a5432e1010b152e /sc
parentf4710e167ded0e6a378f1bfb01ef842b726b0aac (diff)
Spell check iteration too slow when only a few cells are misspelled.
The method should return false when no text cells are encountered (to tell the caller to set a longer iteration interval), not when no misspelled cells are encountered. Change-Id: I9d906d370af129640fdd0cb6dd18ad286e27d3a2
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/gridwin.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 692fcece6a8c..3042dd30ae35 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5420,7 +5420,7 @@ bool ScGridWindow::ContinueOnlineSpelling()
// Check only up to 256 cells at a time.
size_t nTotalCellCount = 0;
size_t nTextCellCount = 0;
- bool bChanged = false;
+ bool bSpellCheckPerformed = false;
while (pCell)
{
@@ -5486,8 +5486,9 @@ bool ScGridWindow::ContinueOnlineSpelling()
ScPaintHint aHint(ScRange(nCol, nRow, nTab), PAINT_GRID);
aHint.SetPrintFlag(false);
pDoc->GetDocumentShell()->Broadcast(aHint);
- bChanged = true;
}
+
+ bSpellCheckPerformed = true;
}
if (nTotalCellCount >= 255 || nTextCellCount >= 1)
@@ -5512,7 +5513,7 @@ bool ScGridWindow::ContinueOnlineSpelling()
mpSpellCheckCxt->maPos.setInvalid();
}
- return bChanged;
+ return bSpellCheckPerformed;
}
void ScGridWindow::EnableAutoSpell( bool bEnable )