bool TocBackend::updateItem(DocIterator const & dit)
{
-// Inset * inset = dit.paragraph().inInset();
-// inset->addToToc(dit);
if (dit.paragraph().layout().toclevel == Layout::NOT_IN_TOC)
return false;
}
+Toc::iterator Toc::item(int depth, docstring const & str)
+{
+ if (empty())
+ return end();
+ iterator it = begin();
+ iterator itend = end();
+ for (; it != itend; ++it) {
+ if (it->depth() == depth && it->str() == str)
+ break;
+ }
+ return it;
+}
+
+
void TocBackend::writePlaintextTocList(string const & type, odocstream & os) const
{
TocList::const_iterator cit = tocs_.find(type);