diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-09-14 19:30:54 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-15 15:24:05 +0200 |
commit | 97c6dac69ac2ad9cb20ba4d3c167d22a19922700 (patch) | |
tree | 0a0a82da6e537890bacbcddacf624f190324cc9e | |
parent | fed145be5231c3045098e5a0942f0b9d3c229460 (diff) |
tdf#93261: sw: fix idle auto-complete collection loop on empty paras
So the auto-spell-checking is hyper-optimized to add the words to the
auto-complete list as well, and call SetAutoCompleteWordDirty().
But if you disable the auto-spell-checking, then a separate function
SwTextFrm::CollectAutoCmplWrds() will be called, which is buggy because
it only resets the dirty flag if at least one word of sufficient length
was found in the paragraph, which is never the case for an empty
paragraph.
Change-Id: Idec64fc3c379301426a44e06a1114c474de36014
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 98095cff33c4..20063e111923 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1569,7 +1569,7 @@ void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos sal_Int32 nBegin = 0; sal_Int32 nEnd = pNode->GetText().getLength(); sal_Int32 nLen; - bool bACWDirty = false, bAnyWrd = false; + bool bACWDirty = false; if( nBegin < nEnd ) { @@ -1588,7 +1588,6 @@ void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos { if( rACW.GetMinWordLen() <= rWord.getLength() ) rACW.InsertWord( rWord, *pDoc ); - bAnyWrd = true; } else bACWDirty = true; @@ -1602,7 +1601,7 @@ void SwTextFrm::CollectAutoCmplWrds( SwContentNode* pActNode, sal_Int32 nActPos } } - if( bAnyWrd && !bACWDirty ) + if (!bACWDirty) pNode->SetAutoCompleteWordDirty( false ); } |