]> git.lyx.org Git - lyx.git/blobdiff - src/AppleSpellChecker.cpp
Fix bug #12772
[lyx.git] / src / AppleSpellChecker.cpp
index 197512132844e580b9f395a79f53d65bb2887529..0a82d38b3228f04ee27ad3e45bbd889e6947690d 100644 (file)
@@ -79,7 +79,7 @@ string AppleSpellChecker::Private::toString(SpellCheckResult status)
 
 
 SpellChecker::Result AppleSpellChecker::check(WordLangTuple const & word,
-        std::vector<WordLangTuple> docdict)
+        std::vector<WordLangTuple> const & docdict)
 {
        if (!hasDictionary(word.lang()))
                return NO_DICTIONARY;
@@ -87,12 +87,12 @@ SpellChecker::Result AppleSpellChecker::check(WordLangTuple const & word,
        string const word_str = to_utf8(word.word());
        string const lang = d->languageMap[word.lang()->lang()];
 
-       vector<WordLangTuple>::const_iterator it = docdict.begin();
+       vector<WordLangTuple>::const_iterator it = docdict.begin();
        for (; it != docdict.end(); ++it) {
                if (it->lang()->code() != word.lang()->code())
                        continue;
                if (it->word() == word.word())
-                       return LEARNED_WORD;
+                       return DOCUMENT_LEARNED_WORD;
        }
 
        SpellCheckResult result =