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;
}
if (tag != RC_LAST)
break;
- case RC_BIBTEX_ALTERNATIVES:
- if (ignore_system_lyxrc ||
- bibtex_alternatives != system_lyxrc.bibtex_alternatives) {
- for (vector<string>::const_iterator it = bibtex_alternatives.begin();
- it != bibtex_alternatives.end(); ++it)
- os << "\\bibtex_alternatives \"" << *it << "\"\n";
+ case RC_BIBTEX_ALTERNATIVES: {
+ 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";
}
if (tag != RC_LAST)
break;
+ }
case RC_BIBTEX_COMMAND:
if (ignore_system_lyxrc ||
bibtex_command != system_lyxrc.bibtex_command) {
}
if (tag != RC_LAST)
break;
- case RC_INDEX_ALTERNATIVES:
- if (ignore_system_lyxrc ||
- index_alternatives != system_lyxrc.index_alternatives) {
- for (vector<string>::const_iterator it = index_alternatives.begin();
- it != index_alternatives.end(); ++it)
- os << "\\index_alternatives \"" << *it << "\"\n";
+ case RC_INDEX_ALTERNATIVES: {
+ 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";
}
if (tag != RC_LAST)
break;
+ }
case RC_INDEX_COMMAND:
if (ignore_system_lyxrc ||
index_command != system_lyxrc.index_command) {