#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"
//
//////////////////////////////////////////////////////////////////////
-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;
}
-static docstring familyName(docstring const & name)
+docstring familyName(docstring const & name)
{
if (name.empty())
return docstring();
}
-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());
}
CiteStyle const citeStylesArray[] = {
CITE, NOCITE, CITET, CITEP, CITEALT,
-CITEALP, CITEAUTHOR, CITEYEAR, CITEYEARPAR };
+ CITEALP, CITEAUTHOR, CITEYEAR, CITEYEARPAR };
unsigned int const nCiteStyles =
sizeof(citeStylesArray) / sizeof(CiteStyle);
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;