mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 05:16:21 +00:00
get rid of the \use_alt_language pref, which was not used. Instead, we test whether \alt_language is empty
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30159 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
9cd55dbe5c
commit
889fdbd39b
@ -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
|
||||
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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<string>(spellchecker_use_alt_lang)
|
||||
<< '\n';
|
||||
}
|
||||
// Obsoleted in 2.0
|
||||
if (tag != RC_LAST)
|
||||
break;
|
||||
case RC_ALT_LANG:
|
||||
|
@ -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?
|
||||
|
@ -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.
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user