}
-void InsetFoot::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
+void InsetFoot::addToToc(TocList & toclist, Buffer const & buf,
+ ParConstIterator const & cpit) const
{
- ParConstIterator pit = par_const_iterator_begin(*this);
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
Toc & toc = toclist["footnote"];
// FIXME: we probably want the footnote number too.
void InsetInclude::addToToc(TocList & toclist, Buffer const & buffer,
- ParConstIterator const & pit) const
+ ParConstIterator const & cpit) const
{
if (isListings(params())) {
InsetListingsParams p(to_utf8(params()["lstparams"]));
Toc & toc = toclist["listing"];
docstring const str = convert<docstring>(toc.size() + 1)
+ ". " + from_utf8(caption);
- // This inset does not have a valid ParConstIterator
- // so it has to use the iterator of its parent paragraph
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
toc.push_back(TocItem(pit, 0, str));
return;
}
}
-void InsetIndex::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
+void InsetIndex::addToToc(TocList & toclist, Buffer const & buf,
+ ParConstIterator const & cpit) const
{
- ParConstIterator pit = par_const_iterator_begin(*this);
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
Toc & toc = toclist["index"];
docstring str;
}
-void InsetMarginal::addToToc(TocList & toclist, Buffer const &/* buf*/, ParConstIterator const &) const
+void InsetMarginal::addToToc(TocList & toclist, Buffer const &/* buf*/,
+ ParConstIterator const & cpit) const
{
- ParConstIterator pit = par_const_iterator_begin(*this);
+ ParConstIterator pit = cpit;
+ pit.push_back(*this);
Toc & toc = toclist["marginalnote"];
docstring str;
}
-void InsetNote::addToToc(TocList & toclist, Buffer const & /*buf*/, ParConstIterator const &) const
+void InsetNote::addToToc(TocList & toclist, 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"];
docstring str;