]> git.lyx.org Git - lyx.git/blobdiff - src/HunspellChecker.cpp
Buffer: Rename function names:
[lyx.git] / src / HunspellChecker.cpp
index f5b9d0c61a88158662e9af684042eca3b9b59ceb..83bd586dcfc29dd8eb03288a5e44bf584fb532fd 100644 (file)
@@ -207,18 +207,18 @@ HunspellChecker::~HunspellChecker()
 SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl)
 {
        if (d->isIgnored(wl))
-               return OK;
+               return WORD_OK;
 
        Hunspell * h = d->speller(wl.lang()->code());
        if (!h)
-               return OK;
+               return WORD_OK;
        int info;
 
        string const encoding = h->get_dic_encoding();
        string const word_to_check = to_iconv_encoding(wl.word(), encoding);
        
        if (h->spell(word_to_check.c_str(), &info))
-               return OK;
+               return WORD_OK;
 
        if (info & SPELL_COMPOUND) {
                // FIXME: What to do with that?
@@ -233,6 +233,12 @@ SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl)
 }
 
 
+void HunspellChecker::advanceChangeNumber()
+{
+       nextChangeNumber();
+}
+
+
 void HunspellChecker::insert(WordLangTuple const & wl)
 {
        string const word_to_check = to_utf8(wl.word());
@@ -240,12 +246,14 @@ void HunspellChecker::insert(WordLangTuple const & wl)
        if (!h)
                return;
        h->add(word_to_check.c_str());
+       advanceChangeNumber();
 }
 
 
 void HunspellChecker::accept(WordLangTuple const & wl)
 {
        d->ignored_.push_back(wl);
+       advanceChangeNumber();
 }