Re-order things a little bit.

This commit is contained in:
Richard Heck 2013-03-27 17:17:57 -04:00
parent 050142de1b
commit 2d34e48869

View File

@ -245,10 +245,6 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
return docstring(); return docstring();
} }
// with lists of listings, at least, there is no depth
// to worry about. so the code can be simpler.
bool const use_depth = (command == "tableofcontents");
Layout const & lay = buffer().params().documentClass().htmlTOCLayout(); Layout const & lay = buffer().params().documentClass().htmlTOCLayout();
string const & tocclass = lay.defaultCSSClass(); string const & tocclass = lay.defaultCSSClass();
string const tocattr = "class='tochead " + tocclass + "'"; string const tocattr = "class='tochead " + tocclass + "'";
@ -271,6 +267,10 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
<< title << title
<< html::EndTag("div"); << html::EndTag("div");
// with lists of listings, at least, there is no depth
// to worry about. so the code can be simpler.
bool const use_depth = (command == "tableofcontents");
// Output of TOC // Output of TOC
if (use_depth) if (use_depth)
makeTOCWithDepth(xs, toc, op); makeTOCWithDepth(xs, toc, op);