+void InsetBibitem::fillWithBibKeys(Buffer const & buf,
+ biblio::BibKeyList & keys, InsetIterator const & it) const
+{
+ string const key = to_utf8(getParam("key"));
+ biblio::BibTeXInfo keyvalmap;
+ 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;
+}
+
+
+/// Update the counters of this inset and of its contents
+void InsetBibitem::updateLabels(Buffer const &buf, ParIterator const & pit)
+{
+ lyxerr << "update! " << to_utf8(getParam("key")) << std::endl;
+ Counters & counters = buf.params().getTextClass().counters();
+ docstring const bibitem = from_ascii("bibitem");
+ if (counters.hasCounter(bibitem) && getParam("label").empty()) {
+ counters.step(bibitem);
+ autolabel_ = counters.theCounter(bibitem);
+ } else
+ autolabel_ = from_ascii("??");
+ refresh();
+}
+
+