- }
- break;
-
- case LFUN_FLOAT_LIST:
- if (tclass.floats().typeExist(cmd.argument)) {
- InsetBase * inset = new InsetFloatList(cmd.argument);
-
- // not quite sure if we want this...
- bv_->text()->recUndo(bv_->text()->cursor().par());
- freezeUndo();
-
- cur.clearSelection();
- bv_->text()->breakParagraph(bv_->buffer()->paragraphs());
-
- if (!bv_->text()->cursorPar()->empty()) {
- bv_->text()->cursorLeft(true);
- bv_->text()->breakParagraph(bv_->buffer()->paragraphs());
- }
-
- bv_->text()->setLayout(tclass.defaultLayoutName());
- bv_->text()->setParagraph(Spacing(), LYX_ALIGN_LAYOUT, string(), 0);
- bv_->getLyXText()->insertInset(inset);
- unFreezeUndo();
- } else {
- lyxerr << "Non-existent float type: "
- << cmd.argument << endl;
- }
- break;
-
- case LFUN_PARAGRAPH_APPLY:
- setParagraphParams(*bv_, cmd.argument);
- break;
-
- case LFUN_THESAURUS_ENTRY: {
- string arg = cmd.argument;
-
- if (arg.empty()) {
- arg = bv_->getLyXText()->selectionAsString(*buffer_,
- false);
-
- // FIXME
- if (arg.size() > 100 || arg.empty()) {
- // Get word or selection
- bv_->getLyXText()->selectWordWhenUnderCursor(lyx::WHOLE_WORD);
- arg = bv_->getLyXText()->selectionAsString(*buffer_, false);
- // FIXME: where is getLyXText()->unselect(bv_) ?
- }
- }
-
- bv_->owner()->getDialogs().show("thesaurus", arg);