X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FASpell.cpp;h=310f5dc38ff4063b7c266125084698257598bd6e;hb=4a75fe0310ac64a079edab0c07d8f8eebaf519c0;hp=7d32fa55e21e7b3c3e3fa109d20c03f7bceb1274;hpb=28afd72c653a5c9af12f4df0b1886cddbd13c138;p=lyx.git diff --git a/src/ASpell.cpp b/src/ASpell.cpp index 7d32fa55e2..310f5dc38f 100644 --- a/src/ASpell.cpp +++ b/src/ASpell.cpp @@ -16,11 +16,12 @@ #include #include "ASpell_local.h" +#include "LyXRC.h" #include "WordLangTuple.h" -#include +#include "support/lassert.h" -using std::string; +using namespace std; namespace lyx { @@ -65,6 +66,12 @@ 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) + // Consider run-together words as legal compounds + aspell_config_replace(config, "run-together", "true"); + else + // Report run-together words as errors + aspell_config_replace(config, "run-together", "false"); AspellCanHaveError * err = new_aspell_speller(config); if (spell_error_object) delete_aspell_can_have_error(spell_error_object); @@ -97,14 +104,14 @@ ASpell::Result ASpell::check(WordLangTuple const & word) AspellSpeller * m = it->second.speller; int const word_ok = aspell_speller_check(m, to_utf8(word.word()).c_str(), -1); - BOOST_ASSERT(word_ok != -1); + LASSERT(word_ok != -1, /**/); if (word_ok) return OK; AspellWordList const * sugs = aspell_speller_suggest(m, to_utf8(word.word()).c_str(), -1); - BOOST_ASSERT(sugs != 0); + LASSERT(sugs != 0, /**/); els = aspell_word_list_elements(sugs); if (aspell_word_list_empty(sugs)) res = UNKNOWN_WORD;