]> git.lyx.org Git - features.git/commitdiff
* src/ASpell.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Mon, 17 Dec 2007 16:51:23 +0000 (16:51 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Mon, 17 Dec 2007 16:51:23 +0000 (16:51 +0000)
- implement lyxrc.isp_accept_compound (bug 4408).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22189 a592a061-630c-0410-9148-cb99ea01b6c8

src/ASpell.cpp

index 9dff24a3008fe8a66e173f2cd2496805dde98bfa..0cef57293d15ebdde8266c42b20a91423f01b226 100644 (file)
@@ -16,6 +16,7 @@
 #include <aspell.h>
 
 #include "ASpell_local.h"
+#include "LyXRC.h"
 #include "WordLangTuple.h"
 
 #include <boost/assert.hpp>
@@ -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);