// This string should not be translated here,
// because it is a layout identifier.
-docstring const TextClass::emptylayout_ = from_ascii("Plain Layout");
+docstring const TextClass::plain_layout_ = from_ascii("Plain Layout");
-InsetLayout DocumentClass::empty_insetlayout_;
+InsetLayout DocumentClass::plain_insetlayout_;
/////////////////////////////////////////////////////////////////////////
LYXERR(Debug::TCLASS, "Reading " + translateRT(rt) + ": " +
to_utf8(makeDisplayPath(filename.absFilename())));
- // Define the `empty' layout used in table cells, ert, etc. Note that
+ // Define the plain layout used in table cells, ert, etc. Note that
// we do this before loading any layout file, so that classes can
// override features of this layout if they should choose to do so.
- if (rt == BASECLASS && !hasLayout(emptylayout_))
- layoutlist_.push_back(createEmptyLayout(emptylayout_));
+ if (rt == BASECLASS && !hasLayout(plain_layout_))
+ layoutlist_.push_back(createBasicLayout(plain_layout_));
Lexer lexrc(textClassTags);
lexrc.setFile(filename);
case TC_INSETLAYOUT:
if (lexrc.next()) {
InsetLayout il;
- if (il.read(lexrc))
+ if (il.read(lexrc, *this))
insetlayoutlist_[il.name()] = il;
// else there was an error, so forget it
}
bool TextClass::deleteLayout(docstring const & name)
{
- if (name == defaultLayoutName() || name == emptyLayoutName())
+ if (name == defaultLayoutName() || name == plainLayoutName())
return false;
LayoutList::iterator it =
void DocumentClass::addLayoutIfNeeded(docstring const & n) const
{
if (!hasLayout(n))
- layoutlist_.push_back(createEmptyLayout(n, true));
+ layoutlist_.push_back(createBasicLayout(n, true));
}
size_t i = n.find(':');
if (i == string::npos)
break;
- n = n.substr(0,i);
+ n = n.substr(0, i);
}
- return empty_insetlayout_;
+ return plain_insetlayout_;
}
bool TextClass::isPlainLayout(Layout const & layout) const
{
- return layout.name() == emptyLayoutName();
+ return layout.name() == plainLayoutName();
}
-Layout TextClass::createEmptyLayout(docstring const & name, bool unknown) const
+Layout TextClass::createBasicLayout(docstring const & name, bool unknown) const
{
static Layout * defaultLayout = NULL;