summaryrefslogtreecommitdiff
path: root/sw/source/core/unocore/unoobj.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-09-09 10:30:04 +0200
committerMichael Stahl <mstahl@redhat.com>2015-09-09 14:13:48 +0200
commit4c91e94e892943ef5e031d65f6f42864233cb4cd (patch)
treec9f6e59cf2d776e028692ff19e58af57fea5deeb /sw/source/core/unocore/unoobj.cxx
parentf9f3e97ca867db59f2fc2e4fdb5583ed49cab49c (diff)
tdf#92036: sw: fix idle spelling loop
There is a sort of intentional infinite loop in the idle spell checking handler: while the user is typing a word, it should not be marked as invalid yet, in order not to annoy them with red underlines. So the word where the cursor is positioned always remained dirty, unless you happen to have a grammar checker enabled, which clears the paragraph's dirty flag from a separate thread. To avoid the infinite loop, add another spell checking state "PENDING" which is the same as dirty except that it should cancel the idle spell checking. The idle spell checking will run again when the user does the next editing operation. Notably this means if the user just moves the cursor out of the wrongly spelled word, it won't be underlined yet, but that appears a minor issue, and checking when the cursor leaves the word appears too hard to implement. Change-Id: Ifb3d6d17f94f9f1cfad82e70dfa79f1594c38647
Diffstat (limited to 'sw/source/core/unocore/unoobj.cxx')
-rw-r--r--sw/source/core/unocore/unoobj.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 779f84ab44a5..c3be1b1951e8 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2514,7 +2514,7 @@ throw (uno::RuntimeException, std::exception)
if ( text::TextMarkupType::SPELLCHECK == nType )
{
- txtNode->SetWrongDirty(true);
+ txtNode->SetWrongDirty(SwTextNode::WrongState::TODO);
txtNode->SetWrong(0);
}
else if( text::TextMarkupType::PROOFREADING == nType )