case LFUN_FLEX_INSERT: {
string s = cmd.getArg(0);
- TextClass tclass = params.getTextClass();
- InsetLayout il = tclass.insetlayout(from_utf8(s));
+ TextClass const & tclass = params.getTextClass();
+ InsetLayout const & il = tclass.insetlayout(from_utf8(s));
return new InsetFlex(params, il);
}
auto_ptr<Inset> inset;
- TextClass tclass = buf.params().getTextClass();
+ TextClass const & tclass = buf.params().getTextClass();
lex.next();
string tmptok = lex.getString();
} else if (tmptok == "Flex") {
lex.next();
string s = lex.getString();
- InsetLayout il = tclass.insetlayout(from_utf8(s));
+ InsetLayout const & il = tclass.insetlayout(from_utf8(s));
inset.reset(new InsetFlex(buf.params(), il));
} else if (tmptok == "Branch") {
inset.reset(new InsetBranch(buf.params(),
}
inset->read(buf, lex);
-
-// FIXME: hack..
- if (inset->lyxCode() == MATHMACRO_CODE) {
- MathMacroTemplate const * tmpl =
- static_cast<MathMacroTemplate*>(inset.get());
- MacroTable::globalMacros().insert
- (tmpl->name(), tmpl->asMacroData());
- LYXERR(Debug::DEBUG)
- << BOOST_CURRENT_FUNCTION
- << ": creating local macro " << to_utf8(tmpl->name())
- << endl;
- }
}
return inset.release();