#include <boost/assert.hpp>
-#include <stdlib.h>
#include <sstream>
using namespace std;
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.textClassIndex(), s);
}
case LFUN_NOTE_INSERT: {
case LFUN_FLOAT_INSERT: {
// check if the float type exists
string const argument = to_utf8(cmd.argument());
- if (params.getTextClass().floats().typeExist(argument))
+ if (params.textClass().floats().typeExist(argument))
return new InsetFloat(params, argument);
lyxerr << "Non-existent float type: " << argument << endl;
}
case LFUN_FLOAT_WIDE_INSERT: {
// check if the float type exists
string const argument = to_utf8(cmd.argument());
- if (params.getTextClass().floats().typeExist(argument)) {
+ if (params.textClass().floats().typeExist(argument)) {
auto_ptr<InsetFloat> p(new InsetFloat(params, argument));
p->wide(true, params);
return p.release();
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().textClassIndex(), s));
} else if (tmptok == "Branch") {
inset.reset(new InsetBranch(buf.params(),
InsetBranchParams()));