X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffactory.cpp;h=fd823085ee6e6b194dbc2f95ca3b05585224946e;hb=3256dbc78a76f947080dc8e3414abc60e4b5c5af;hp=5b1b44e20ba9760e3e8507afca822e9e720065aa;hpb=efbd1d30cb119692dd11276cd01e9399ee9d124c;p=lyx.git diff --git a/src/factory.cpp b/src/factory.cpp index 5b1b44e20b..fd823085ee 100644 --- a/src/factory.cpp +++ b/src/factory.cpp @@ -65,7 +65,6 @@ #include -#include #include using namespace std; @@ -103,9 +102,7 @@ Inset * createInset(Buffer & buf, FuncRequest const & cmd) 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: { @@ -386,8 +383,6 @@ Inset * readInset(Lexer & lex, Buffer const & buf) auto_ptr inset; - TextClass const & tclass = buf.params().getTextClass(); - lex.next(); string tmptok = lex.getString(); @@ -481,8 +476,8 @@ Inset * readInset(Lexer & lex, Buffer const & buf) } 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()));