sc/source/ui/view/gridwin.cxx |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 6f41d3dbcf618d3636ab456f933354dd5ed17cef
Author: Kohei Yoshida <libreoff...@kohei.us>
Date:   Sat Sep 7 16:51:22 2013 -0400

    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

diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 692fcec..3042dd3 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 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to