}
-void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/, ParConstIterator const &) const
+void InsetNote::addToToc(Buffer const & buf,
+ ParConstIterator const & cpit) const
{
- ParConstIterator pit = par_const_iterator_begin(*this);
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
- Toc & toc = toclist["note"];
+ Toc & toc = buf.tocBackend().toc("note");
docstring str;
str = notetranslator_loc().find(params_.type) + from_ascii(": ")
+ getNewLabel(str);