]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetNote.cpp
Add list of notes and list of footnotes to the outline pane.
[features.git] / src / insets / InsetNote.cpp
index 94463a64decc44880a0602962359b269fca6cb39..dc57f5ffff7da8ef804a1bfe14354a61dd4a2fd4 100644 (file)
@@ -30,7 +30,9 @@
 #include "Lexer.h"
 #include "MetricsInfo.h"
 #include "OutputParams.h"
+#include "ParIterator.h"
 #include "TextClass.h"
+#include "TocBackend.h"
 
 #include "support/docstream.h"
 #include "support/Translator.h"
@@ -218,6 +220,18 @@ void InsetNote::updateLabels(Buffer const & buf, ParIterator const & it)
 }
 
 
+void InsetNote::addToToc(TocList & toclist, Buffer const & buf, ParConstIterator const &) const
+{
+       ParConstIterator pit = par_const_iterator_begin(*this);
+
+       Toc & toc = toclist["note"];
+       // FIXME: we probably want the note type too.
+       docstring str;
+       str = getNewLabel(str);
+       toc.push_back(TocItem(pit, 0, str));
+}
+
+
 bool InsetNote::isMacroScope(Buffer const & buf) const
 {
        // LyX note has no latex output