#include "insets/insetmarginal.h"
#include "insets/insetminipage.h"
#include "insets/insetnote.h"
+#include "insets/insetbox.h"
#include "insets/insetbranch.h"
#include "insets/insetoptarg.h"
#include "insets/insetref.h"
#include "support/lstrings.h"
#include "support/std_sstream.h"
+#include <boost/assert.hpp>
+
using lyx::support::compare_ascii_no_case;
using std::endl;
+using std::string;
InsetOld * createInset(FuncRequest const & cmd)
arg = "Note";
return new InsetNote(params, arg);
}
+ case LFUN_INSERT_BOX:
+ {
+ string arg = cmd.getArg(0);
+ if (arg.empty())
+ arg = "Boxed";
+ return new InsetBox(params, arg);
+ }
case LFUN_INSERT_BRANCH:
{
string arg = cmd.getArg(0);
} else if (name == "external") {
Buffer const & buffer = *cmd.view()->buffer();
- InsetExternal::Params iep;
+ InsetExternalParams iep;
InsetExternalMailer::string2params(cmd.argument,
buffer, iep);
InsetExternal * inset = new InsetExternal;
inset = new InsetFloatList("table");
} else if (cmdName == "printindex") {
inset = new InsetPrintIndex(inscmd);
+ } else {
+ lyxerr << "unknown CommandInset '" << cmdName << "'" << std::endl;
+ BOOST_ASSERT(false);
}
} else {
if (tmptok == "Quotes") {
} else if (tmptok == "Note" || tmptok == "Comment"
|| tmptok == "Greyedout") {
inset = new InsetNote(buf.params(), tmptok);
+ } else if (tmptok == "Boxed" || tmptok == "ovalbox"
+ || tmptok == "Shadowbox" || tmptok == "Doublebox"
+ || tmptok == "Ovalbox" || tmptok == "Frameless") {
+ inset = new InsetBox(buf.params(), tmptok);
} else if (tmptok == "Branch") {
inset = new InsetBranch(buf.params(), string());
} else if (tmptok == "Include") {
inset = new InsetCaption(buf.params());
} else if (tmptok == "FloatList") {
inset = new InsetFloatList;
+ } else {
+ lyxerr << "unknown Inset type '" << tmptok << "'" << std::endl;
+ BOOST_ASSERT(false);
}
- if (inset)
- inset->read(buf, lex);
+ inset->read(buf, lex);
}
return inset;