void LaTeXFeatures::useLayout(docstring const & layoutname)
+{
+ useLayout(layoutname, 0);
+}
+
+
+void LaTeXFeatures::useLayout(docstring const & layoutname, int level)
{
// Some code to avoid loops in dependency definition
- static int level = 0;
const int maxlevel = 30;
if (level > maxlevel) {
lyxerr << "LaTeXFeatures::useLayout: maximum level of "
require(layout.requires());
if (!layout.depends_on().empty()) {
- ++level;
- useLayout(layout.depends_on());
- --level;
+ useLayout(layout.depends_on(), level + 1);
}
usedLayouts_.push_back(layoutname);
} else {
<< to_utf8(layoutname) << "' does not exist in this class"
<< endl;
}
-
- --level;
}
docstring const & htmlTitle() const { return htmltitle_; }
private:
+ ///
+ void useLayout(docstring const &, int);
///
std::list<docstring> usedLayouts_;
///