case RC_FORCE_PAINT_SINGLE_CHAR:
lexrc >> force_paint_single_char;
break;
-
+
case RC_PRINTER:
lexrc >> printer;
break;
case RC_DEFAULT_VIEW_FORMAT:
lexrc >> default_view_format;
break;
-
+
case RC_DEFAULT_LANGUAGE:
lexrc >> default_language;
break;
run_mode = single_instance ? USE_REMOTE : NEW_INSTANCE;
break;
case RC_FORWARD_SEARCH_DVI:
- if (lexrc.next(true))
+ if (lexrc.next(true))
forward_search_dvi = lexrc.getString();
break;
case RC_FORWARD_SEARCH_PDF:
- if (lexrc.next(true))
+ if (lexrc.next(true))
forward_search_pdf = lexrc.getString();
break;
case RC_EXPORT_OVERWRITE:
// Escape \ and " so that LyXLex can read the string later
string escapeCommand(string const & str) {
- return subst(subst(str , "\\", "\\\\"),
+ return subst(subst(str , "\\", "\\\\"),
"\"", "\\\"");
}
void LyXRC::write(ostream & os, bool ignore_system_lyxrc, string const & name) const
{
LyXRCTags tag = RC_LAST;
-
+
if (!name.empty()) {
for (int i = 0; i != lyxrcCount; ++i)
if ("\\" + name == lyxrcTags[i].tag)
language_package_selection != system_lyxrc.language_package_selection) {
os << "\\language_package_selection ";
switch (language_package_selection) {
- case LP_AUTO:
+ case LP_AUTO:
os << "0\n";
break;
case LP_BABEL:
format->viewer() != cit->viewer() ||
format->editor() != cit->editor() ||
format->documentFormat() != cit->documentFormat() ||
- format->vectorFormat() != cit->vectorFormat()) {
+ format->vectorFormat() != cit->vectorFormat() ||
+ format->inExportMenu() != cit->inExportMenu()) {
os << "\\format \"" << cit->name() << "\" \""
<< cit->extension() << "\" \""
<< cit->prettyname() << "\" \""
flags.push_back("document");
if (cit->vectorFormat())
flags.push_back("vector");
+ if (cit->inExportMenu())
+ flags.push_back("menu=export");
+
os << getStringFromVector(flags);
os << "\"\n";
}
case RC_VIEWER_ALTERNATIVES: {
Alternatives::const_iterator it = viewer_alternatives.begin();
Alternatives::const_iterator const en = viewer_alternatives.end();
- Alternatives::const_iterator const sysend =
+ Alternatives::const_iterator const sysend =
system_lyxrc.viewer_alternatives.end();
for (; it != en; ++it) {
string const & fmt = it->first;
CommandSet const & cmd = it->second;
CommandSet::const_iterator sit = cmd.begin();
CommandSet::const_iterator const sen = cmd.end();
- Alternatives::const_iterator const sysfmt = ignore_system_lyxrc ?
+ Alternatives::const_iterator const sysfmt = ignore_system_lyxrc ?
system_lyxrc.viewer_alternatives.begin() : // we won't use it in this case
system_lyxrc.viewer_alternatives.find(fmt);
for (; sit != sen; ++sit) {
string const & cmd = *sit;
- if (ignore_system_lyxrc
+ if (ignore_system_lyxrc
|| sysfmt == sysend // format not found
|| sysfmt->second.count(cmd) == 0 // this command not found
)
case RC_EDITOR_ALTERNATIVES: {
Alternatives::const_iterator it = editor_alternatives.begin();
Alternatives::const_iterator const en = editor_alternatives.end();
- Alternatives::const_iterator const sysend =
+ Alternatives::const_iterator const sysend =
system_lyxrc.editor_alternatives.end();
for (; it != en; ++it) {
string const & fmt = it->first;
CommandSet const & cmd = it->second;
CommandSet::const_iterator sit = cmd.begin();
CommandSet::const_iterator const sen = cmd.end();
- Alternatives::const_iterator const sysfmt = ignore_system_lyxrc ?
+ Alternatives::const_iterator const sysfmt = ignore_system_lyxrc ?
system_lyxrc.editor_alternatives.begin() : // we won't use it in this case
system_lyxrc.editor_alternatives.find(fmt);
for (; sit != sen; ++sit) {
string const & cmd = *sit;
- if (ignore_system_lyxrc
+ if (ignore_system_lyxrc
|| sysfmt == sysend // format not found
|| sysfmt->second.count(cmd) == 0 // this command not found
)
<< "\" \"" << cit->to << "\" \"\" \"\"\n";
if (tag != RC_LAST)
break;
-
+
case RC_COPIER:
if (tag == RC_LAST)
os << "\n#\n"