]> git.lyx.org Git - lyx.git/blobdiff - src/BiblioInfo.cpp
* GuiView.cpp:
[lyx.git] / src / BiblioInfo.cpp
index 2d05c4911f2a5e10168e04a1d019dd89ce8fa0da..896d8fc4a8a1d895f1805c2641a47fdf3cb9fb1c 100644 (file)
@@ -24,7 +24,7 @@
 #include "insets/InsetBibtex.h"
 #include "insets/InsetInclude.h"
 
-#include "support/assert.h"
+#include "support/lassert.h"
 #include "support/docstream.h"
 #include "support/gettext.h"
 #include "support/lstrings.h"
@@ -43,16 +43,11 @@ namespace lyx {
 //
 //////////////////////////////////////////////////////////////////////
 
-BibTeXInfo::BibTeXInfo(bool ib)
-       : is_bibtex_(ib)
-{}
-
-       
 BibTeXInfo::BibTeXInfo(docstring const & key, docstring const & type)
        : is_bibtex_(true), bib_key_(key), entry_type_(type)
 {}
 
-       
+
 bool BibTeXInfo::hasField(docstring const & field) const
 {
        return count(field) == 1;
@@ -75,7 +70,7 @@ docstring const & BibTeXInfo::getValueForField(string const & field) const
 }
 
 
-static docstring familyName(docstring const & name)
+docstring familyName(docstring const & name)
 {
        if (name.empty())
                return docstring();
@@ -416,19 +411,9 @@ vector<docstring> const BiblioInfo::getAuthorYearStrings(
 }
 
 
-void BiblioInfo::fillWithBibKeys(Buffer const * const buf)
-{      
-       /// if this is a child document and the parent is already loaded
-       /// use the parent's list instead  [ale990412]
-       Buffer const * const tmp = buf->masterBuffer();
-       LASSERT(tmp, return);
-       if (tmp != buf) {
-               this->fillWithBibKeys(tmp);
-               return;
-       }
-
-       for (InsetIterator it = inset_iterator_begin(buf->inset()); it; ++it)
-               it->fillWithBibKeys(*this, it);
+void BiblioInfo::mergeBiblioInfo(BiblioInfo const & info)
+{
+       bimap_.insert(info.begin(), info.end());
 }
 
 
@@ -450,7 +435,7 @@ unsigned int const nCiteCommands =
 
 CiteStyle const citeStylesArray[] = {
        CITE, NOCITE, CITET, CITEP, CITEALT,
-CITEALP, CITEAUTHOR, CITEYEAR, CITEYEARPAR };
+       CITEALP, CITEAUTHOR, CITEYEAR, CITEYEARPAR };
 
 unsigned int const nCiteStyles =
                sizeof(citeStylesArray) / sizeof(CiteStyle);