case LT_CATEGORY:
if (lexrc.next())
- category_ = lowercase(lexrc.getDocString());
+ category_ = lexrc.getDocString();
break;
case LT_COPYSTYLE: // initialize with a known style
if (tclass.hasLayout(style)) {
docstring const tmpname = name_;
- this->operator=(*tclass[style]);
+ this->operator=(tclass[style]);
name_ = tmpname;
} else {
lyxerr << "Cannot copy unknown style `"
<< to_utf8(style) << "'\n"
<< "All layouts so far:"
<< endl;
- for (size_t i = 0; i != tclass.layoutCount(); ++i)
- lyxerr << to_utf8(tclass.layout(i)->name())
- << endl;
+ DocumentClass::const_iterator lit = tclass.begin();
+ DocumentClass::const_iterator len = tclass.end();
+ for (; lit != len; ++lit)
+ lyxerr << to_utf8(lit->name()) << endl;
//lexrc.printError("Cannot copy known "
// "style `$$Token'");
if (tclass.hasLayout(style)) {
docstring const tmpname = name_;
- this->operator=(*tclass[style]);
+ this->operator=(tclass[style]);
name_ = tmpname;
if (obsoleted_by().empty())
obsoleted_by_ = style;
}
+bool Layout::operator==(Layout const & rhs) const
+{
+ // This is enough for the applications we actually make,
+ // at least at the moment. But we could check more.
+ return name() == rhs.name()
+ && latexname() == rhs.latexname()
+ && latextype == rhs.latextype;
+}
+
+
Layout * Layout::forCaption()
{
Layout * lay = new Layout();