]> git.lyx.org Git - lyx.git/blobdiff - src/BiblioInfo.cpp
* Call metrics of the parameters with the correct font in MathMacros, for example
[lyx.git] / src / BiblioInfo.cpp
index 2d05c4911f2a5e10168e04a1d019dd89ce8fa0da..8f8523315d65d4b130eaf328c341091a5009f005 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());
 }
 
 
@@ -449,8 +434,8 @@ unsigned int const nCiteCommands =
                sizeof(citeCommands) / sizeof(char *);
 
 CiteStyle const citeStylesArray[] = {
-       CITE, NOCITE, CITET, CITEP, CITEALT,
-CITEALP, CITEAUTHOR, CITEYEAR, CITEYEARPAR };
+       CITE, CITET, CITEP, CITEALT, CITEALP, 
+       CITEAUTHOR, CITEYEAR, CITEYEARPAR, NOCITE };
 
 unsigned int const nCiteStyles =
                sizeof(citeStylesArray) / sizeof(CiteStyle);
@@ -485,7 +470,7 @@ CitationStyle citationStyleFromString(string const & command)
        size_t const n = cmd.size() - 1;
        if (cmd != "cite" && cmd[n] == '*') {
                s.full = true;
-               cmd = cmd.substr(0,n);
+               cmd = cmd.substr(0, n);
        }
 
        char const * const * const last = citeCommands + nCiteCommands;