- inset = new InsetGraphics;
- } else if (tmptok == "Note" || tmptok == "Comment"
- || tmptok == "Greyedout") {
- inset = new InsetNote(buf.params, tmptok);
+ inset.reset(new InsetGraphics);
+ } else if (tmptok == "Note") {
+ inset.reset(new InsetNote(buf.params(), tmptok));
+ } else if (tmptok == "Box") {
+ inset.reset(new InsetBox(buf.params(), tmptok));
+ } else if (tmptok == "CharStyle") {
+ lex.next();
+ string s = lex.getString();
+ CharStyles::iterator found_cs = tclass.charstyle(s);
+ inset.reset(new InsetCharStyle(buf.params(), found_cs));
+ } else if (tmptok == "Branch") {
+ inset.reset(new InsetBranch(buf.params(),
+ InsetBranchParams()));