From 15fd8d740081aa1ffe9fd0d1c122efc936cd711b Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 25 Mar 2013 17:33:54 -0400 Subject: [PATCH] Fix bug #8608: Don't output index entries from notes, etc. --- src/insets/InsetIndex.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/insets/InsetIndex.cpp b/src/insets/InsetIndex.cpp index de46f9b776..57c0d07a3a 100644 --- a/src/insets/InsetIndex.cpp +++ b/src/insets/InsetIndex.cpp @@ -689,12 +689,19 @@ docstring InsetPrintIndex::xhtml(XHTMLStream &, OutputParams const & op) const if (toc.empty()) return docstring(); - // Collection the index entries in a form we can use them. + // Collect the index entries in a form we can use them. Toc::const_iterator it = toc.begin(); Toc::const_iterator const en = toc.end(); vector entries; for (; it != en; ++it) - entries.push_back(IndexEntry(it->str(), it->dit())); + if (it->isOutput()) + entries.push_back(IndexEntry(it->str(), it->dit())); + + if (entries.empty()) + // not very likely that all the index entries are in notes or + // whatever, but.... + return docstring(); + stable_sort(entries.begin(), entries.end()); Layout const & lay = bp.documentClass().htmlTOCLayout(); -- 2.39.5