]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetNomencl.cpp
Fix bug http://bugzilla.lyx.org/show_bug.cgi?id=4910 by creating InsetText::addToToc().
[lyx.git] / src / insets / InsetNomencl.cpp
index 10aef0f51d62d63f2bbbd857fc8cff8bbef4a2f7..75e639083adf856c998571120d6c91d1110b5071 100644 (file)
@@ -119,13 +119,13 @@ int InsetPrintNomencl::docbook(odocstream & os, OutputParams const &) const
 {
        os << "<glossary>\n";
        int newlines = 2;
-       for (InsetIterator it = inset_iterator_begin(buffer().inset()); it;) {
+       InsetIterator it = inset_iterator_begin(buffer().inset());
+       while (it) {
                if (it->lyxCode() == NOMENCL_CODE) {
                        newlines += static_cast<InsetNomencl const &>(*it).docbookGlossary(os);
                        ++it;
-               } else if(it->lyxCode() == NOTE_CODE &&
-                         static_cast<InsetNote const &>(*it).params().type == InsetNoteParams::Note) {
-                       // Don't output anything nested in note insets
+               } else if (!it->producesOutput()) {
+                       // Ignore contents of insets that are not in output
                        size_t const depth = it.depth();
                        ++it;
                        while (it.depth() > depth)