X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetBibitem.cpp;h=3a6f083cb065489a3ed1a488c2698c02fa2ab0c7;hb=2c357c1d23b7b83839a9beb8225d4f1ae4f793b4;hp=50e1cb1c8a33e0804c3d0a2c27302fcaa2056e83;hpb=5ddc612b735317d5b22553a63aad7879503e3950;p=lyx.git diff --git a/src/insets/InsetBibitem.cpp b/src/insets/InsetBibitem.cpp index 50e1cb1c8a..3a6f083cb0 100644 --- a/src/insets/InsetBibitem.cpp +++ b/src/insets/InsetBibitem.cpp @@ -23,11 +23,16 @@ #include "Lexer.h" #include "Paragraph.h" #include "ParagraphList.h" +#include "TextClass.h" #include "support/lstrings.h" -#include "support/std_ostream.h" +#include "support/docstream.h" #include "support/convert.h" +#include + +using namespace std; +using namespace lyx::support; namespace lyx { @@ -46,7 +51,7 @@ InsetBibitem::InsetBibitem(InsetCommandParams const & p) } -CommandInfo const * InsetBibitem::findInfo(std::string const & /* cmdName */) +CommandInfo const * InsetBibitem::findInfo(string const & /* cmdName */) { static const char * const paramnames[] = {"label", "key", ""}; static const bool isoptional[] = {true, false}; @@ -91,9 +96,9 @@ void InsetBibitem::read(Buffer const & buf, Lexer & lex) { InsetCommand::read(buf, lex); - if (support::prefixIs(getParam("key"), key_prefix)) { + if (prefixIs(getParam("key"), key_prefix)) { int const key = convert(getParam("key").substr(key_prefix.length())); - key_counter = std::max(key_counter, key); + key_counter = max(key_counter, key); } } @@ -193,12 +198,11 @@ void InsetBibitem::fillWithBibKeys(Buffer const & buf, BiblioInfo & keys, InsetIterator const & it) const { docstring const key = getParam("key"); - BibTeXInfo keyvalmap; + BibTeXInfo keyvalmap(false); keyvalmap[from_ascii("label")] = getParam("label"); DocIterator doc_it(it); doc_it.forwardPos(); keyvalmap[from_ascii("ref")] = doc_it.paragraph().asString(buf, false); - keyvalmap.isBibTeX = false; keys[key] = keyvalmap; }