X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBibtex.cpp;h=40632057697579d6e06e7c325f73846043fbc884;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=9996cd23f0089e36b0c1376c986dca4a30615816;hpb=b2278c07363ddc84b9c76cb4217d0c25933b8b1c;p=lyx.git diff --git a/src/insets/InsetBibtex.cpp b/src/insets/InsetBibtex.cpp index 9996cd23f0..4063205769 100644 --- a/src/insets/InsetBibtex.cpp +++ b/src/insets/InsetBibtex.cpp @@ -16,11 +16,9 @@ #include "Buffer.h" #include "BufferParams.h" #include "DispatchResult.h" -#include "support/debug.h" #include "EmbeddedFiles.h" #include "Encoding.h" #include "FuncRequest.h" -#include "support/gettext.h" #include "LaTeXFeatures.h" #include "MetricsInfo.h" #include "OutputParams.h" @@ -28,15 +26,18 @@ #include "frontends/alert.h" +#include "support/debug.h" #include "support/ExceptionMessage.h" #include "support/docstream.h" #include "support/filetools.h" +#include "support/gettext.h" #include "support/lstrings.h" #include "support/os.h" #include "support/Path.h" #include "support/textutils.h" #include +#include using namespace std; using namespace lyx::support; @@ -104,8 +105,6 @@ void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd) embedStatus = split(embedStatus, emb, ','); while (!tmp.empty()) { EmbeddedFile file(changeExtension(tmp, "bib"), cur.buffer().filePath()); - if (!file.exists()) - continue; if (!newBibfiles.empty()) newBibfiles += ","; newBibfiles += tmp; @@ -741,8 +740,7 @@ void InsetBibtex::fillWithBibKeys(Buffer const & buffer, docstring value; docstring commaNewline; docstring data; - BibTeXInfo keyvalmap; - keyvalmap.entryType = entryType; + BibTeXInfo keyvalmap(key, entryType); bool readNext = removeWSAndComma(ifs); @@ -768,15 +766,13 @@ void InsetBibtex::fillWithBibKeys(Buffer const & buffer, keyvalmap[name] = value; data += "\n\n" + value; - keylist.fieldNames.insert(name); + keylist.addFieldName(name); readNext = removeWSAndComma(ifs); } // add the new entry - keylist.entryTypes.insert(entryType); - keyvalmap.allData = data; - keyvalmap.isBibTeX = true; - keyvalmap.bibKey = key; + keylist.addEntryType(entryType); + keyvalmap.setAllData(data); keylist[key] = keyvalmap; } } //< searching '@'