]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTOC.cpp
Links between citations and bibliography entries were broken in XHTML
[lyx.git] / src / insets / InsetTOC.cpp
index 414d6780fd534f72806a12cf2b45147e11637ed4..08d77bb32868d3310f0837eca54cea6d33fa6b9a 100644 (file)
@@ -110,10 +110,11 @@ void InsetTOC::validate(LaTeXFeatures & features) const
 }
 
 
-int InsetTOC::plaintext(odocstream & os, OutputParams const &) const
+int InsetTOC::plaintext(odocstringstream & os,
+        OutputParams const &, size_t max_length) const
 {
        os << screenLabel() << "\n\n";
-       buffer().tocBackend().writePlaintextTocList(cmd2type(getCmdName()), os);
+       buffer().tocBackend().writePlaintextTocList(cmd2type(getCmdName()), os, max_length);
        return PLAINTEXT_NEWLINE;
 }
 
@@ -158,6 +159,11 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
        Toc::const_iterator const en = toc.end();
        int lastdepth = 0;
        for (; it != en; ++it) {
+               // do not output entries that are not actually included in the output,
+               // e.g., stuff in non-active branches or notes or whatever.
+               if (!it->isOutput())
+                       continue;
+
                // First, we need to manage increases and decreases of depth
                int const depth = it->depth();