X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FASpell.cpp;h=b4a8bdb173f5536313c7f82332646a9846de0229;hb=4594b1425b484138fcae28996f460312d810b8d5;hp=74d1313fe69263bf7b8600dbad5a694624d08289;hpb=7f461f4392a19cf488dec005d2f12cfea83655d9;p=lyx.git diff --git a/src/ASpell.cpp b/src/ASpell.cpp index 74d1313fe6..b4a8bdb173 100644 --- a/src/ASpell.cpp +++ b/src/ASpell.cpp @@ -19,16 +19,14 @@ #include "LyXRC.h" #include "WordLangTuple.h" -#include "support/assert.h" +#include "support/lassert.h" using namespace std; namespace lyx { -ASpell::ASpell(BufferParams const &, string const & lang) - : els(0), spell_error_object(0) +ASpell::ASpell(): els(0), spell_error_object(0) { - addSpeller(lang); } @@ -66,7 +64,7 @@ void ASpell::addSpeller(string const & lang) // platforms (cygwin, OS X). Therefore we use utf-8, that does // always work. aspell_config_replace(config, "encoding", "utf-8"); - if (lyxrc.isp_accept_compound) + if (lyxrc.spellchecker_accept_compound) // Consider run-together words as legal compounds aspell_config_replace(config, "run-together", "true"); else @@ -103,6 +101,10 @@ ASpell::Result ASpell::check(WordLangTuple const & word) AspellSpeller * m = it->second.speller; + if (word.word().empty()) + // MSVC compiled Aspell doesn't like it. + return OK; + int const word_ok = aspell_speller_check(m, to_utf8(word.word()).c_str(), -1); LASSERT(word_ok != -1, /**/);