diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 01a5c4ddae..c529d818a0 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -25,6 +25,9 @@ The following variables are obsoleted in 2.0 \use_personal_dictionary and \use_spell_lib (ispell support has been removed) +- \spellchecker_use_alt_lang (actually not used by the UI, it is as + simple to check whether the relevant variable is empty) + - \custom_export_command and \custom_export_format diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 1e526fa9da..481a7c6ab4 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3401,9 +3401,9 @@ int Buffer::spellCheck(DocIterator & from, DocIterator & to, docstring word; while (nextWord(from, to, word)) { ++progress; - string lang_code = lyxrc.spellchecker_use_alt_lang - ? lyxrc.spellchecker_alt_lang - : from.paragraph().getFontSettings(params(), from.pos()).language()->code(); + string const lang_code = lyxrc.spellchecker_alt_lang.empty() + ? from.paragraph().getFontSettings(params(), from.pos()).language()->code() + : lyxrc.spellchecker_alt_lang; WordLangTuple wl(word, lang_code); res = speller->check(wl); // ... just bail out if the spellchecker reports an error. diff --git a/src/LyXRC.cpp b/src/LyXRC.cpp index 81b3fd6d28..b2654eecb3 100644 --- a/src/LyXRC.cpp +++ b/src/LyXRC.cpp @@ -270,7 +270,6 @@ void LyXRC::setDefaults() display_graphics = true; // Spellchecker settings: spellchecker_accept_compound = false; - spellchecker_use_alt_lang = false; spellchecker_use_esc_chars = false; spellcheck_continuously = false; use_kbmap = false; @@ -875,9 +874,6 @@ int LyXRC::read(Lexer & lexrc) case RC_ACCEPT_COMPOUND: lexrc >> spellchecker_accept_compound; break; - case RC_USE_ALT_LANG: - lexrc >> spellchecker_use_alt_lang; - break; case RC_USE_TOOLTIP: lexrc >> use_tooltip; break; @@ -1121,6 +1117,7 @@ int LyXRC::read(Lexer & lexrc) case RC_SPELL_COMMAND: case RC_PERS_DICT: case RC_PLAINTEXT_ROFF_COMMAND: + case RC_USE_ALT_LANG: case RC_USE_INP_ENC: case RC_USE_PERS_DICT: case RC_USE_SPELL_LIB: @@ -2194,11 +2191,7 @@ void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) c if (tag != RC_LAST) break; case RC_USE_ALT_LANG: - if (ignore_system_lyxrc || - spellchecker_use_alt_lang != system_lyxrc.spellchecker_use_alt_lang) { - os << "\\use_alt_language " << convert(spellchecker_use_alt_lang) - << '\n'; - } + // Obsoleted in 2.0 if (tag != RC_LAST) break; case RC_ALT_LANG: diff --git a/src/LyXRC.h b/src/LyXRC.h index 2f87d023de..dbdf1ed2d9 100644 --- a/src/LyXRC.h +++ b/src/LyXRC.h @@ -324,8 +324,6 @@ public: unsigned int plaintext_linelen; /// Accept compound words in spellchecker? bool spellchecker_accept_compound; - /// Use alternate language? - bool spellchecker_use_alt_lang; /// Use tooltips? bool use_tooltip; /// Use pixmap cache? diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 74d22f5ce3..6330454383 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -3048,9 +3048,9 @@ void Paragraph::collectWords() if (!lyxrc.spellcheck_continuously || !speller) continue; - string lang_code = lyxrc.spellchecker_use_alt_lang - ? lyxrc.spellchecker_alt_lang - : getFontSettings(d->inset_owner_->buffer().params(), from).language()->code(); + string const lang_code = lyxrc.spellchecker_alt_lang.empty() + ? getFontSettings(d->inset_owner_->buffer().params(), from).language()->code() + : lyxrc.spellchecker_alt_lang; WordLangTuple wl(word, lang_code); SpellChecker::Result res = speller->check(wl); // ... just ignore any error that the spellchecker reports. @@ -3093,9 +3093,9 @@ bool Paragraph::isMisspelled(pos_type pos) const if (!speller) return false; - string lang_code = lyxrc.spellchecker_use_alt_lang - ? lyxrc.spellchecker_alt_lang - : getFontSettings(d->inset_owner_->buffer().params(), from).language()->code(); + string const lang_code = lyxrc.spellchecker_alt_lang.empty() + ? getFontSettings(d->inset_owner_->buffer().params(), from).language()->code() + : lyxrc.spellchecker_alt_lang; WordLangTuple wl(word, lang_code); SpellChecker::Result res = speller->check(wl); // ... just ignore any error that the spellchecker reports. diff --git a/src/frontends/qt4/GuiPrefs.cpp b/src/frontends/qt4/GuiPrefs.cpp index 3b2034286a..11d71e2a70 100644 --- a/src/frontends/qt4/GuiPrefs.cpp +++ b/src/frontends/qt4/GuiPrefs.cpp @@ -1263,9 +1263,7 @@ PrefSpellchecker::PrefSpellchecker(GuiPreferences * form) void PrefSpellchecker::apply(LyXRC & rc) const { - // FIXME: remove spellchecker_use_alt_lang rc.spellchecker_alt_lang = fromqstr(altLanguageED->text()); - rc.spellchecker_use_alt_lang = !rc.spellchecker_alt_lang.empty(); // FIXME: remove spellchecker_use_esc_chars rc.spellchecker_esc_chars = fromqstr(escapeCharactersED->text()); rc.spellchecker_use_esc_chars = !rc.spellchecker_esc_chars.empty(); @@ -1276,7 +1274,6 @@ void PrefSpellchecker::apply(LyXRC & rc) const void PrefSpellchecker::update(LyXRC const & rc) { - // FIXME: remove spellchecker_use_alt_lang altLanguageED->setText(toqstr(rc.spellchecker_alt_lang)); // FIXME: remove spellchecker_use_esc_chars escapeCharactersED->setText(toqstr(rc.spellchecker_esc_chars));