]> git.lyx.org Git - lyx.git/blobdiff - src/AspellChecker.cpp
(finishing patch -- question was restored, but there were still problems)
[lyx.git] / src / AspellChecker.cpp
index 36e8e04c8f23375ba608b61261a4e16a4328bd70..0b277923d69064c987801b01c2bc9dbba3d397a1 100644 (file)
@@ -266,17 +266,23 @@ SpellChecker::Result AspellChecker::check(WordLangTuple const & word)
                d->speller(word.lang()->code(), word.lang()->variety());
 
        if (!m)
-               return OK;
+               return WORD_OK;
 
        if (word.word().empty())
                // MSVC compiled Aspell doesn't like it.
-               return OK;
+               return WORD_OK;
 
        string const word_str = to_utf8(word.word());
        int const word_ok = aspell_speller_check(m, word_str.c_str(), -1);
        LASSERT(word_ok != -1, /**/);
 
-       return (word_ok) ? OK : UNKNOWN_WORD;
+       return (word_ok) ? WORD_OK : UNKNOWN_WORD;
+}
+
+
+void AspellChecker::advanceChangeNumber()
+{
+       nextChangeNumber();
 }
 
 
@@ -287,6 +293,7 @@ void AspellChecker::insert(WordLangTuple const & word)
        if (it != d->spellers_.end()) {
                AspellSpeller * speller = to_aspell_speller(it->second.e_speller);
                aspell_speller_add_to_personal(speller, to_utf8(word.word()).c_str(), -1);
+               advanceChangeNumber();
        }
 }
 
@@ -298,6 +305,7 @@ void AspellChecker::accept(WordLangTuple const & word)
        if (it != d->spellers_.end()) {
                AspellSpeller * speller = to_aspell_speller(it->second.e_speller);
                aspell_speller_add_to_session(speller, to_utf8(word.word()).c_str(), -1);
+               advanceChangeNumber();
        }
 }