#include "support/lstrings.h"
#include "support/ExceptionMessage.h"
-#include <boost/assert.hpp>
+#include "support/lassert.h"
#include <sstream>
case LFUN_FLEX_INSERT: {
string s = cmd.getArg(0);
- return new InsetFlex(buf, buf.params().documentClassPtr(), s);
+ return new InsetFlex(buf, s);
}
case LFUN_NOTE_INSERT: {
case LFUN_ENVIRONMENT_INSERT:
return new InsetEnvironment(buf, cmd.argument());
- case LFUN_INFO_INSERT:
- return new InsetInfo(buf, to_utf8(cmd.argument()));
+ case LFUN_INFO_INSERT: {
+ InsetInfo * inset = new InsetInfo(buf, to_utf8(cmd.argument()));
+ inset->updateInfo();
+ return inset;
+ }
case LFUN_INSET_INSERT: {
string const name = cmd.getArg(0);
auto_ptr<Inset> inset;
- lex.next();
- string tmptok = lex.getString();
+ string tmptok;
+ lex >> tmptok;
// test the different insets
} else if (tmptok == "Flex") {
lex.next();
string s = lex.getString();
- inset.reset(new InsetFlex(buf,
- buf.params().documentClassPtr(), s));
+ inset.reset(new InsetFlex(buf, s));
} else if (tmptok == "Branch") {
- inset.reset(new InsetBranch(buf,
- InsetBranchParams()));
+ inset.reset(new InsetBranch(buf, InsetBranchParams()));
} else if (tmptok == "Environment") {
lex.next();
inset.reset(new InsetEnvironment(buf, lex.getDocString()));