]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetMarginal.cpp
* src/insets/InsetSpace.cpp:
[lyx.git] / src / insets / InsetMarginal.cpp
index 2b5090561e56c7dbc15a7ebbd63a56087a5f3cb2..9a21a89a788d14207ad85569f2ab7dd2e6b8e754 100644 (file)
@@ -21,9 +21,6 @@
 #include "support/docstream.h"
 #include "support/gettext.h"
 
-#include <ostream>
-
-
 namespace lyx {
 
 
@@ -69,15 +66,17 @@ int InsetMarginal::docbook(odocstream & os,
 }
 
 
-void InsetMarginal::addToToc(ParConstIterator const & cpit) const
+void InsetMarginal::addToToc(DocIterator const & cpit)
 {
-       ParConstIterator pit = cpit;
-       pit.push_back(*this);
+       DocIterator pit = cpit;
+       pit.push_back(CursorSlice(*this));
 
        Toc & toc = buffer().tocBackend().toc("marginalnote");
        docstring str;
        str = getNewLabel(str);
        toc.push_back(TocItem(pit, 0, str));
+       // Proceed with the rest of the inset.
+       InsetFootlike::addToToc(cpit);
 }
 
 } // namespace lyx