]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetBibtex.cpp
Fix text frame drawing.
[lyx.git] / src / insets / InsetBibtex.cpp
index 4c612bd4955c54acc2d03f6443e3b8362ec6c2e4..2d3e05f37379911430b9f4bac92ebf83970e25fd 100644 (file)
@@ -78,9 +78,9 @@ InsetBibtex::InsetBibtex(InsetCommandParams const & p)
 {}
 
 
-std::auto_ptr<Inset> InsetBibtex::doClone() const
+Inset * InsetBibtex::clone() const
 {
-       return std::auto_ptr<Inset>(new InsetBibtex(*this));
+       return new InsetBibtex(*this);
 }
 
 
@@ -580,7 +580,7 @@ namespace {
 
 // This method returns a comma separated list of Bibtex entries
 void InsetBibtex::fillWithBibKeys(Buffer const & buffer,
-               biblio::BibKeyList & keys, InsetIterator const & /*di*/) const
+               BiblioInfo & keylist, InsetIterator const & /*di*/) const
 {
        vector<FileName> const files = getFiles(buffer);
        for (vector<FileName>::const_iterator it = files.begin();
@@ -695,7 +695,7 @@ void InsetBibtex::fillWithBibKeys(Buffer const & buffer,
                                docstring value;
                                docstring commaNewline;
                                docstring data;
-                               biblio::BibTeXInfo keyvalmap;
+                               BibTeXInfo keyvalmap;
                                keyvalmap.entryType = entryType;
                                
                                bool readNext = removeWSAndComma(ifs);
@@ -722,14 +722,16 @@ void InsetBibtex::fillWithBibKeys(Buffer const & buffer,
 
                                        keyvalmap[name] = value;
                                        data += "\n\n" + value;
-
+                                       keylist.fieldNames.insert(name);
                                        readNext = removeWSAndComma(ifs);
                                }
 
                                // add the new entry
+                               keylist.entryTypes.insert(entryType);
                                keyvalmap.allData = data;
                                keyvalmap.isBibTeX = true;
-                               keys[to_utf8(key)] = keyvalmap;
+                               keyvalmap.bibKey = key;
+                               keylist[key] = keyvalmap;
                        }
                } //< searching '@'
        } //< for loop over files