X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetCollapsable.cpp;h=beb9f6d4f151c6cc6a7151a151bdb503761682b3;hb=3391fed36a574fb729f243888258d1b6d45b0251;hp=fa9f01056ab685e00ae67280e2faafa1541dec5f;hpb=425c190d623daeb6d05bce1aa2244b548225305a;p=features.git diff --git a/src/insets/InsetCollapsable.cpp b/src/insets/InsetCollapsable.cpp index fa9f01056a..beb9f6d4f1 100644 --- a/src/insets/InsetCollapsable.cpp +++ b/src/insets/InsetCollapsable.cpp @@ -662,19 +662,19 @@ bool InsetCollapsable::canPaintChange(BufferView const & bv) const void InsetCollapsable::addToToc(DocIterator const & cpit, bool output_active, - UpdateType utype) const + UpdateType utype, TocBackend & backend) const { bool doing_output = output_active && producesOutput(); InsetLayout const & layout = getLayout(); if (layout.addToToc()) { - TocBuilder & b = buffer().tocBackend().builder(layout.tocType()); + TocBuilder & b = backend.builder(layout.tocType()); // Cursor inside the inset DocIterator pit = cpit; pit.push_back(CursorSlice(const_cast(*this))); docstring const label = getLabel(); b.pushItem(pit, label + (label.empty() ? "" : ": "), output_active); // Proceed with the rest of the inset. - InsetText::addToToc(cpit, doing_output, utype); + InsetText::addToToc(cpit, doing_output, utype, backend); if (layout.isTocCaption()) { docstring str; text().forOutliner(str, TOC_ENTRY_LENGTH); @@ -682,7 +682,7 @@ void InsetCollapsable::addToToc(DocIterator const & cpit, bool output_active, } b.pop(); } else - InsetText::addToToc(cpit, doing_output, utype); + InsetText::addToToc(cpit, doing_output, utype, backend); }