]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetMarginal.cpp
Andre's s/getTextClass/textClass/ cleanup.
[lyx.git] / src / insets / InsetMarginal.cpp
index 0193f5b33b84c59b12ce85fabfe7851bd8f9f817..094d2a22cb9e9e488add4e3cb5026f30749af7cb 100644 (file)
 #include "InsetMarginal.h"
 
 #include "Buffer.h"
-#include "gettext.h"
 #include "OutputParams.h"
+#include "TocBackend.h"
 
-#include "support/std_ostream.h"
+#include "support/gettext.h"
+
+#include <ostream>
 
 
 namespace lyx {
@@ -25,9 +27,7 @@ namespace lyx {
 
 InsetMarginal::InsetMarginal(BufferParams const & bp)
        : InsetFootlike(bp)
-{
-       setLayout(bp);
-}
+{}
 
 
 InsetMarginal::InsetMarginal(InsetMarginal const & in)
@@ -79,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