+ case LFUN_INSET_WRAP:
+ if (cmd.argument == "figure")
+ return new InsetWrap(params, cmd.argument);
+ lyxerr << "Non-existent floatflt type: " << cmd.argument << endl;
+ return 0;
+
+ case LFUN_INDEX_INSERT: {
+ string entry = cmd.argument;
+ if (entry.empty())
+ entry = bv->getLyXText()->getStringToIndex(bv);
+ if (!entry.empty())
+ return new InsetIndex(InsetCommandParams("index", entry));
+ bv->owner()->getDialogs().createIndex();
+ return 0;
+ }
+
+ case LFUN_TABULAR_INSERT:
+ if (!cmd.argument.empty()) {
+ int r = 2;
+ int c = 2;
+ ::sscanf(cmd.argument.c_str(),"%d%d", &r, &c);
+ return new InsetTabular(*bv->buffer(), r, c);
+ }
+ bv->owner()->getDialogs().showTabularCreate();
+ return 0;
+
+ case LFUN_INSET_CAPTION:
+ if (bv->theLockingInset()) {
+ lyxerr << "Locking inset code: "
+ << static_cast<int>(bv->theLockingInset()->lyxCode());
+ InsetCaption * inset = new InsetCaption(params);
+ inset->setOwner(bv->theLockingInset());
+ inset->setAutoBreakRows(true);
+ inset->setDrawFrame(0, InsetText::LOCKED);
+ inset->setFrameColor(0, LColor::captionframe);
+ return inset;
+ }
+ return 0;
+
+ case LFUN_INDEX_PRINT:
+ return new InsetPrintIndex(InsetCommandParams("printindex"));
+
+ case LFUN_TOC_INSERT:
+ return new InsetTOC(InsetCommandParams("tableofcontents"));
+
+ case LFUN_PARENTINSERT:
+ return new InsetParent(
+ InsetCommandParams("lyxparent", cmd.argument), *bv->buffer());
+
+ case LFUN_INSERT_URL:
+ {
+ InsetCommandParams p;
+ p.setFromString(cmd.argument);
+ return new InsetUrl(p);
+ }
+