]> git.lyx.org Git - features.git/commitdiff
Fix default biblio style detection
authorJuergen Spitzmueller <spitz@lyx.org>
Wed, 4 Jan 2017 16:11:25 +0000 (17:11 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Wed, 4 Jan 2017 16:11:25 +0000 (17:11 +0100)
src/BufferParams.cpp
src/TextClass.cpp

index 5c4524b0d481b7ccd79ce4d0252b31f0df33fe11..e96067a9859db60e6aa215048296284677ee2905 100644 (file)
@@ -3241,7 +3241,7 @@ bool BufferParams::addCiteEngine(vector<string> const & engine)
 string const & BufferParams::defaultBiblioStyle() const
 {
        map<string, string> bs = documentClass().defaultBiblioStyle();
-       return bs[documentClass().opt_enginetype()];
+       return bs[theCiteEnginesList.getTypeAsString(citeEngineType())];
 }
 
 
index 65c547883cd9d1784eccedf0733b40e5122fbea9..9e71e1c9a769f480457d8426d432cd8767b2eced 100644 (file)
@@ -772,9 +772,12 @@ TextClass::ReturnValues TextClass::read(Lexer & lexrc, ReadType rt)
                                vector<string>::const_iterator it  = dbs.begin();
                                vector<string>::const_iterator end = dbs.end();
                                for (; it != end; ++it) {
-                                       if (!contains(*it, ':'))
-                                               cite_default_biblio_style_[opt_enginetype_] = *it;
-                                       else {
+                                       if (!contains(*it, ':')) {
+                                               vector<string> const enginetypes =
+                                                       getVectorFromString(opt_enginetype_, "|");
+                                               for (string const &s: enginetypes)
+                                                       cite_default_biblio_style_[s] = *it;
+                                       } else {
                                                string eng;
                                                string const db = split(*it, eng, ':');
                                                cite_default_biblio_style_[eng] = db;