display_graphics = true;
// Spellchecker settings:
spellchecker_accept_compound = false;
- spellchecker_use_input_encoding = false;
- spellchecker_use_alt_lang = false;
- spellchecker_use_pers_dict = false;
- spellchecker_use_esc_chars = false;
spellcheck_continuously = false;
use_kbmap = false;
rtl_support = true;
case RC_BIBTEX_ALTERNATIVES:
if (lexrc.next(true)) {
- bibtex_alternatives.push_back(lexrc.getString());
+ bibtex_alternatives.insert(lexrc.getString());
}
break;
case RC_INDEX_ALTERNATIVES:
if (lexrc.next(true)) {
- index_alternatives.push_back(lexrc.getString());
+ index_alternatives.insert(lexrc.getString());
}
break;
}
break;
- case RC_USETEMPDIR:
- if (lexrc.next())
- LYXERR0("Ignoring obsolete use_tempdir flag.");
- break;
-
case RC_USELASTFILEPOS:
lexrc >> use_lastfilepos;
break;
lexrc >> dialogs_iconify_with_main;
break;
- case RC_PLAINTEXT_ROFF_COMMAND:
- (void) lexrc.getString(); // Obsoleted in 2.0
- break;
case RC_PLAINTEXT_LINELEN:
lexrc >> plaintext_linelen;
break;
case RC_ACCEPT_COMPOUND:
lexrc >> spellchecker_accept_compound;
break;
- case RC_USE_INP_ENC:
- lexrc >> spellchecker_use_input_encoding;
- break;
- case RC_USE_ALT_LANG:
- lexrc >> spellchecker_use_alt_lang;
- break;
- case RC_USE_PERS_DICT:
- lexrc >> spellchecker_use_pers_dict;
- break;
case RC_USE_TOOLTIP:
lexrc >> use_tooltip;
break;
case RC_USE_PIXMAP_CACHE:
lexrc >> use_pixmap_cache;
break;
- case RC_USE_ESC_CHARS:
- lexrc >> spellchecker_use_esc_chars;
- break;
case RC_ALT_LANG:
lexrc >> spellchecker_alt_lang;
break;
- case RC_PERS_DICT:
- if (lexrc.next())
- spellchecker_pers_dict = os::internal_path(lexrc.getString());
- break;
case RC_ESC_CHARS:
lexrc >> spellchecker_esc_chars;
break;
lexrc >> open_buffers_in_tabs;
break;
+ // Obsoteted in 1.4.0
+ case RC_USETEMPDIR:
// Obsoleted in 2.0
case RC_SPELL_COMMAND:
+ case RC_PERS_DICT:
+ case RC_PLAINTEXT_ROFF_COMMAND:
+ case RC_USE_ALT_LANG:
+ case RC_USE_ESC_CHARS:
+ case RC_USE_INP_ENC:
+ case RC_USE_PERS_DICT:
case RC_USE_SPELL_LIB:
- (void) lexrc.getString();
+ LYXERR(Debug::LYXRC, "Skipping obsolete tag `"
+ << lexrc.getString() << "'.");
+ lexrc.next(true);
break;
case RC_LAST:
if (tag != RC_LAST)
break;
case RC_BIBTEX_ALTERNATIVES: {
- vector<string>::const_iterator it = bibtex_alternatives.begin();
- vector<string>::const_iterator end = bibtex_alternatives.end();
- if (ignore_system_lyxrc) {
- for ( ; it != end; ++it)
+ set<string>::const_iterator it = bibtex_alternatives.begin();
+ set<string>::const_iterator end = bibtex_alternatives.end();
+ for ( ; it != end; ++it) {
+ if (ignore_system_lyxrc
+ || !system_lyxrc.bibtex_alternatives.count(*it))
os << "\\bibtex_alternatives \""
<< *it << "\"\n";
- } else {
- vector<string>::const_iterator sbeg =
- system_lyxrc.bibtex_alternatives.begin();
- vector<string>::const_iterator send =
- system_lyxrc.bibtex_alternatives.end();
- for ( ; it != end; ++it) {
- bool found = false;
- for (vector<string>::const_iterator sit = sbeg;
- sit != send; ++sit) {
- if (*it == *sit)
- found = true;
- }
- if (!found)
- os << "\\bibtex_alternatives \""
- << *it << "\"\n";
- }
}
if (tag != RC_LAST)
break;
if (tag != RC_LAST)
break;
case RC_INDEX_ALTERNATIVES: {
- vector<string>::const_iterator it = index_alternatives.begin();
- vector<string>::const_iterator end = index_alternatives.end();
- if (ignore_system_lyxrc) {
- for ( ; it != end; ++it)
+ set<string>::const_iterator it = index_alternatives.begin();
+ set<string>::const_iterator end = index_alternatives.end();
+ for ( ; it != end; ++it) {
+ if (ignore_system_lyxrc
+ || !system_lyxrc.index_alternatives.count(*it))
os << "\\index_alternatives \""
<< *it << "\"\n";
- } else {
- vector<string>::const_iterator sbeg =
- system_lyxrc.index_alternatives.begin();
- vector<string>::const_iterator send =
- system_lyxrc.index_alternatives.end();
- for ( ; it != end; ++it) {
- bool found = false;
- for (vector<string>::const_iterator sit = sbeg;
- sit != send; ++sit) {
- if (*it == *sit)
- found = true;
- }
- if (!found)
- os << "\\index_alternatives \""
- << *it << "\"\n";
- }
}
if (tag != RC_LAST)
break;
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:
if (tag != RC_LAST)
break;
case RC_USE_ESC_CHARS:
- if (ignore_system_lyxrc ||
- spellchecker_use_esc_chars != system_lyxrc.spellchecker_use_esc_chars) {
- os << "\\use_escape_chars " << convert<string>(spellchecker_use_esc_chars)
- << '\n';
- }
if (tag != RC_LAST)
break;
case RC_ESC_CHARS:
if (tag != RC_LAST)
break;
case RC_USE_PERS_DICT:
- if (ignore_system_lyxrc ||
- spellchecker_use_pers_dict != system_lyxrc.spellchecker_use_pers_dict) {
- os << "\\use_personal_dictionary "
- << convert<string>(spellchecker_use_pers_dict)
- << '\n';
- }
+ // obsoleted in 2.0
if (tag != RC_LAST)
break;
case RC_USE_TOOLTIP:
<< convert<string>(use_tooltip)
<< '\n';
}
+ if (tag != RC_LAST)
+ break;
case RC_USE_PIXMAP_CACHE:
if (ignore_system_lyxrc ||
use_pixmap_cache != system_lyxrc.use_pixmap_cache) {
<< convert<string>(use_pixmap_cache)
<< '\n';
}
+ if (tag != RC_LAST)
+ break;
case RC_PERS_DICT:
- if (spellchecker_pers_dict != system_lyxrc.spellchecker_pers_dict) {
- string const path = os::external_path(spellchecker_pers_dict);
- os << "\\personal_dictionary \"" << path << "\"\n";
- }
+ // obsoleted in 2.0
if (tag != RC_LAST)
break;
case RC_USE_INP_ENC:
- if (ignore_system_lyxrc ||
- spellchecker_use_input_encoding
- != system_lyxrc.spellchecker_use_input_encoding) {
- os << "\\use_input_encoding "
- << convert<string>(spellchecker_use_input_encoding)
- << '\n';
- }
+ // obsoleted in 2.0
if (tag != RC_LAST)
break;
os << "\n#\n"
<< "# LANGUAGE SUPPORT SECTION ##########################\n"
<< "#\n\n";
+ if (tag != RC_LAST)
+ break;
case RC_SPELLCHECK_CONTINUOUSLY:
if (ignore_system_lyxrc ||
"Use the OS native format.");
break;
- case RC_PERS_DICT:
- case RC_USE_PERS_DICT:
- str = _("Specify an alternate personal dictionary file. E.g. \".aspell_english\".");
- break;
-
case RC_PREVIEW:
str = _("Shows a typeset preview of things such as math");
break;
case RC_USETEMPDIR:
break;
- case RC_USE_INP_ENC:
- str = _("Specify whether to pass the -T input encoding option to aspell. Enable this if you cannot check the spelling of words containing accented letters. This may not work with all dictionaries.");
- break;
-
case RC_USE_TOOLTIP:
str = _("Enable the automatic appearance of tool tips in the work area.");
break;