TocBuilder & TocBackend::builder(string const & type)
{
- auto p = make_unique<TocBuilder>(toc(type));
+ auto p = lyx::make_unique<TocBuilder>(toc(type));
return * builders_.insert(make_pair(type, move(p))).first->second;
}
// TocItem creation and update should be made in a dedicated function and
// updateItem should be rewritten to uniformly update the matching items from
// all TOCs.
-bool TocBackend::updateItem(DocIterator const & dit_in)
+bool TocBackend::updateItem(DocIterator const & dit_in) const
{
+ if (dit_in.buffer() && dit_in.buffer()->isInternal())
+ return false;
+
// we need a text
DocIterator dit = dit_in.getInnerText();