case LFUN_FLEX_INSERT: {
string s = cmd.getArg(0);
- TextClass const & tclass = params.getTextClass();
- InsetLayout const & il = tclass.insetlayout(from_utf8(s));
- return new InsetFlex(params, il);
+ return new InsetFlex(params, params.getTextClassPtr(), s);
}
case LFUN_NOTE_INSERT: {
} catch (ExceptionMessage const & message) {
if (message.type_ == ErrorException) {
+ // This should never happen!
Alert::error(message.title_, message.details_);
- LyX::cref().emergencyCleanup();
- abort();
+ LyX::cref().exit(1);
} else if (message.type_ == WarningException) {
Alert::warning(message.title_, message.details_);
return 0;
auto_ptr<Inset> inset;
- TextClass const & tclass = buf.params().getTextClass();
-
lex.next();
string tmptok = lex.getString();
} else if (tmptok == "Flex") {
lex.next();
string s = lex.getString();
- InsetLayout const & il = tclass.insetlayout(from_utf8(s));
- inset.reset(new InsetFlex(buf.params(), il));
+ inset.reset(new InsetFlex(buf.params(),
+ buf.params().getTextClassPtr(), s));
} else if (tmptok == "Branch") {
inset.reset(new InsetBranch(buf.params(),
InsetBranchParams()));