+ case LABEL_CODE: {
+ InsetCommandParams icp(code);
+ InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+ return new InsetLabel(buf, icp);
+ }
+
+ case LINE_CODE: {
+ InsetCommandParams icp(code);
+ InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+ return new InsetLine(buf, icp);
+ }
+
+ case LISTINGS_CODE: {
+ InsetListingsParams par;
+ InsetListings::string2params(to_utf8(cmd.argument()), par);
+ return new InsetListings(buf, par);
+ }
+
+ case NOMENCL_CODE: {
+ InsetCommandParams icp(code);
+ InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+ return new InsetNomencl(buf, icp);
+ }
+
+ case REF_CODE: {
+ InsetCommandParams icp(code);
+ InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+ return new InsetRef(buf, icp);
+ }
+
+ case SCRIPT_CODE: {
+ InsetScriptParams isp;
+ InsetScript::string2params(to_utf8(cmd.argument()), isp);
+ return new InsetScript(buf, isp);
+ }
+
+ case SPACE_CODE: {
+ InsetSpaceParams isp;
+ InsetSpace::string2params(to_utf8(cmd.argument()), isp);
+ return new InsetSpace(isp);
+ }
+
+ case TOC_CODE: {
+ InsetCommandParams icp(code);
+ InsetCommand::string2params(to_utf8(cmd.argument()), icp);
+ return new InsetTOC(buf, icp);
+ }
+
+ case VSPACE_CODE: {
+ VSpace vspace;
+ InsetVSpace::string2params(to_utf8(cmd.argument()), vspace);
+ return new InsetVSpace(vspace);
+ }
+
+ case PREVIEW_CODE:
+ return new InsetPreview(buf);
+
+ default:
+ lyxerr << "Inset '" << name << "' not permitted with LFUN_INSET_INSERT."
+ << endl;
+ return 0;