]> git.lyx.org Git - features.git/commitdiff
Re-order things a little bit.
authorRichard Heck <rgheck@lyx.org>
Wed, 27 Mar 2013 21:17:57 +0000 (17:17 -0400)
committerRichard Heck <rgheck@lyx.org>
Wed, 27 Mar 2013 21:17:57 +0000 (17:17 -0400)
src/insets/InsetTOC.cpp

index 6ed1fa91e94c534d81b5a730053ffaff84c38f26..a5d3d4cff8ebfd972e82fa5b936c20519977701c 100644 (file)
@@ -245,10 +245,6 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
                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();
        string const & tocclass = lay.defaultCSSClass();
        string const tocattr = "class='tochead " + tocclass + "'";
@@ -271,6 +267,10 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
                 << title
                 << 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
        if (use_depth)
                makeTOCWithDepth(xs, toc, op);