]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTOC.cpp
Cocoa based Qt-4.6 needs to paint every character separately to match metrics computa...
[lyx.git] / src / insets / InsetTOC.cpp
index b5159f937fda1edbcce1b7f62cae509110900b29..bac2f43699b27c9aa5dd92656ab4aabfa3bea2d6 100644 (file)
@@ -159,6 +159,10 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
                
                // Now output TOC info for this entry
                Paragraph const & par = it->dit().innerParagraph();
+
+               string const attr = "href='#" + par.magicLabel() + "' class='tocentry'";
+               xs << html::StartTag("a", attr);
+
                // First the label, if there is one
                docstring const & label = par.params().labelString();
                if (!label.empty())
@@ -168,7 +172,9 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
                ours.for_toc = true;
                Font const dummy;
                par.simpleLyXHTMLOnePar(buffer(), xs, ours, dummy);
-               xs << " ";
+
+               xs << html::EndTag("a") << " ";
+
                // Now a link to that paragraph
                string const parattr = "href='#" + par.magicLabel() + "' class='tocarrow'";
                xs << html::StartTag("a", parattr);