[Libreoffice-commits] core.git: sw/source

Michael Stahl mstahl at redhat.com
Fri Oct 6 19:54:11 UTC 2017


 sw/source/core/doc/docnew.cxx |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit 05c704d3bea7f9a7ec51ac28d4d55ba8068f2da5
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Oct 6 21:39:24 2017 +0200

    sw: fix infinite grammar checking idle loop
    
    The grammar checker always wants to be started in DoIdleJobs(),
    even if all paragraphs are already marked as checked.
    
    This is because there is currently no call anywhere of
    SwRootFrame::SetNeedGrammarCheck(false) to reset the flag
    and prevent DoIdleJobs from trying to start the grammar checker.
    
    This call was already there before but was removed without
    any justification in commit 9160fe814a46e93da6907e169ce9d58e46fa37f2.
    
    This has become an infinite loop in several Junit tests with commit
    53da556c600fa82ba84bc7fdce6a594b43f2b097.
    
    Change-Id: Ibe7ad93442070aac0577725d044281912307d9e8

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 9e2a82d3083c..d414b920aef0 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -172,7 +172,14 @@ bool SwDoc::StartGrammarChecking( bool bSkipStart )
             {
                 bStarted = true;
                 if ( !bSkipStart )
+                {
+                    for (auto pLayout : GetAllLayouts())
+                    {   // we're starting it now, don't start grammar checker
+                        // again until the user modifies the document
+                        pLayout->SetNeedGrammarCheck(false);
+                    }
                     xGCIterator->startProofreading( xDoc, xFPIP );
+                }
             }
         }
     }


More information about the Libreoffice-commits mailing list