}
-void DocumentClass::addLayoutIfNeeded(docstring const & n) const
+bool DocumentClass::addLayoutIfNeeded(docstring const & n) const
{
- if (!hasLayout(n))
- layoutlist_.push_back(createBasicLayout(n, true));
+ if (hasLayout(n))
+ return false;
+
+ layoutlist_.push_back(createBasicLayout(n, true));
+ return true;
}