mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-25 17:44:59 +00:00
First fix the spellchecker. Now, it find the next misspellec word.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30223 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
694399b16c
commit
c75fb1f6e0
@ -3377,22 +3377,20 @@ int Buffer::spellCheck(DocIterator & from, DocIterator & to,
|
|||||||
int progress = 0;
|
int progress = 0;
|
||||||
WordLangTuple wl;
|
WordLangTuple wl;
|
||||||
suggestions.clear();
|
suggestions.clear();
|
||||||
|
word_lang = WordLangTuple();
|
||||||
|
|
||||||
// We are only interested in text so remove the math CursorSlice.
|
// We are only interested in text so remove the math CursorSlice.
|
||||||
while (from.inMathed())
|
while (from.inMathed())
|
||||||
from.pop_back();
|
from.pop_back();
|
||||||
|
|
||||||
// OK, we start from here.
|
// OK, we start from here.
|
||||||
|
DocIterator const end = doc_iterator_end(this);
|
||||||
|
for (; from != end; from.forwardPos()) {
|
||||||
to = from;
|
to = from;
|
||||||
while (!from.paragraph().spellCheck(from.pos(), to.pos(), wl, suggestions)) {
|
if (from.paragraph().spellCheck(from.pos(), to.pos(), wl, suggestions))
|
||||||
++progress;
|
break;
|
||||||
if (from == to) {
|
|
||||||
// end of file reached.
|
|
||||||
word_lang = WordLangTuple();
|
|
||||||
suggestions.clear();
|
|
||||||
return progress;
|
|
||||||
}
|
|
||||||
from = to;
|
from = to;
|
||||||
from.forwardPos();
|
++progress;
|
||||||
}
|
}
|
||||||
return progress;
|
return progress;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user