#8932 improved spell checker debug messages

This commit is contained in:
Stephan Witt 2014-01-15 21:18:34 +01:00
parent 27131e655a
commit 01969e59fb
2 changed files with 6 additions and 2 deletions

View File

@ -357,6 +357,8 @@ SpellChecker::Result AspellChecker::Private::check(
{
SpellChecker::Result result = WORD_OK;
docstring w1;
LYXERR(Debug::GUI, "spellCheck: \"" <<
word.word() << "\", lang = " << word.lang()->lang()) ;
docstring rest = split(word.word(), w1, '-');
for (; result == WORD_OK;) {
string const word_str = toAspellWord(w1);

View File

@ -344,16 +344,18 @@ SpellChecker::Result HunspellChecker::check(WordLangTuple const & wl)
string const encoding = h->get_dic_encoding();
string const word_to_check = to_iconv_encoding(wl.word(), encoding);
LYXERR(Debug::GUI, "spellCheck: \"" <<
wl.word() << "\", lang = " << wl.lang()->lang()) ;
if (h->spell(word_to_check.c_str(), &info))
return d->learned(wl) ? LEARNED_WORD : WORD_OK;
if (info & SPELL_COMPOUND) {
// FIXME: What to do with that?
LYXERR(Debug::FILES, "Hunspell compound word found " << word_to_check);
LYXERR(Debug::GUI, "Hunspell compound word found " << word_to_check);
}
if (info & SPELL_FORBIDDEN) {
// This was removed from personal dictionary
LYXERR(Debug::FILES, "Hunspell explicit forbidden word found " << word_to_check);
LYXERR(Debug::GUI, "Hunspell explicit forbidden word found " << word_to_check);
}
return UNKNOWN_WORD;