X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetMarginal.cpp;h=094d2a22cb9e9e488add4e3cb5026f30749af7cb;hb=0362c6aae73c293d1c20277c12d362acfe0b2ef6;hp=ce16f7d327333006ab2385f75cc8e7d131d95472;hpb=688c186614a50a82b97733cb401e046ea8207352;p=lyx.git diff --git a/src/insets/InsetMarginal.cpp b/src/insets/InsetMarginal.cpp index ce16f7d327..094d2a22cb 100644 --- a/src/insets/InsetMarginal.cpp +++ b/src/insets/InsetMarginal.cpp @@ -14,8 +14,10 @@ #include "InsetMarginal.h" #include "Buffer.h" -#include "gettext.h" #include "OutputParams.h" +#include "TocBackend.h" + +#include "support/gettext.h" #include @@ -77,4 +79,16 @@ int InsetMarginal::docbook(Buffer const & buf, odocstream & os, } +void InsetMarginal::addToToc(Buffer const & buf, + ParConstIterator const & cpit) const +{ + ParConstIterator pit = cpit; + pit.push_back(*this); + + Toc & toc = buf.tocBackend().toc("marginalnote"); + docstring str; + str = getNewLabel(str); + toc.push_back(TocItem(pit, 0, str)); +} + } // namespace lyx