X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetFlex.cpp;h=0b14973faa46fe06c323f4738371e5a62aa4a44d;hb=ed7d3a33abad4e1b5141b2ec626b542d1603782c;hp=ee3b7c89c45677274218ea35bb629e5015c14cd2;hpb=68109443f3738b89574cfc82bc30b14e0c31a8be;p=lyx.git diff --git a/src/insets/InsetFlex.cpp b/src/insets/InsetFlex.cpp index ee3b7c89c4..0b14973faa 100644 --- a/src/insets/InsetFlex.cpp +++ b/src/insets/InsetFlex.cpp @@ -23,7 +23,6 @@ #include "Lexer.h" #include "ParIterator.h" #include "TextClass.h" -#include "TocBackend.h" #include "support/gettext.h" #include "support/lstrings.h" @@ -166,28 +165,4 @@ void InsetFlex::updateBuffer(ParIterator const & it, UpdateType utype) } -void InsetFlex::addToToc(DocIterator const & cpit, bool output_active, - UpdateType utype) const -{ - InsetLayout const & layout = getLayout(); - if (layout.addToToc()) { - TocBuilder & b = buffer().tocBackend().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. - InsetCollapsable::addToToc(cpit, output_active, utype); - if (layout.isTocCaption()) { - docstring str; - text().forOutliner(str, TOC_ENTRY_LENGTH); - b.argumentItem(str); - } - b.pop(); - } else - InsetCollapsable::addToToc(cpit, output_active, utype); -} - - } // namespace lyx