summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-10-06 21:39:24 +0200
committerMichael Stahl <mstahl@redhat.com>2017-10-06 21:51:48 +0200
commit05c704d3bea7f9a7ec51ac28d4d55ba8068f2da5 (patch)
tree97fea27e81c460d93c7110c9221aa2964dbd22a8 /sw
parent3ee1c87e6cf3fac38e1c7666c4c7ea357f26bec8 (diff)
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
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docnew.cxx7
1 files changed, 7 insertions, 0 deletions
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 );
+ }
}
}
}