[Libreoffice-commits] core.git: Branch 'private/swe/libreoffice-5-2+backports' - sw/source

Michael Stahl mstahl at redhat.com
Fri Oct 6 23:06:46 UTC 2017


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

New commits:
commit b853c74fe6fc661dd0a7594dc877ae5c21dd7a86
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
    (cherry picked from commit 05c704d3bea7f9a7ec51ac28d4d55ba8068f2da5)

diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 53b173b7ba28..4c90a33b628e 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -185,7 +185,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