+ << style << "' to InsetLayout `"
+ << name() << "'\n"
+ << "All InsetLayouts so far:");
+ TextClass::InsetLayouts::const_iterator lit =
+ tclass.insetLayouts().begin();
+ TextClass::InsetLayouts::const_iterator len =
+ tclass.insetLayouts().end();
+ for (; lit != len; ++lit)
+ lyxerr << lit->second.name() << "\n";
+ }
+ break;
+ }
+ case IL_OBSOLETEDBY: {
+ docstring style;
+ lex >> style;
+ style = support::subst(style, '_', ' ');
+
+ // We don't want to apply the algorithm in DocumentClass::insetLayout()
+ // here. So we do it the long way.
+ TextClass::InsetLayouts::const_iterator it =
+ tclass.insetLayouts().find(style);
+ if (it != tclass.insetLayouts().end()) {
+ docstring const tmpname = name_;
+ this->operator=(it->second);
+ name_ = tmpname;
+ if (obsoleted_by().empty())
+ obsoleted_by_ = style;
+ } else {
+ LYXERR0("Cannot replace InsetLayout `"
+ << name()
+ << "' with unknown InsetLayout `"