just move

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5121 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2002-08-27 15:00:59 +00:00
parent 527cd00d2f
commit b3d8d0d1a2
2 changed files with 32 additions and 37 deletions

View File

@ -40,7 +40,6 @@
#include "ParagraphParameters.h" #include "ParagraphParameters.h"
#include "undo_funcs.h" #include "undo_funcs.h"
#include "funcrequest.h" #include "funcrequest.h"
#include "factory.h"
#include "insets/insetbib.h" #include "insets/insetbib.h"
#include "insets/insettext.h" #include "insets/insettext.h"
@ -1541,42 +1540,6 @@ bool BufferView::Pimpl::dispatch(FuncRequest const & ev)
} }
break; break;
#if 0
case LFUN_INSET_LIST:
case LFUN_INSET_THEOREM:
#endif
case LFUN_INSERT_NOTE:
case LFUN_INSET_ERT:
case LFUN_INSET_EXTERNAL:
case LFUN_INSET_FLOAT:
case LFUN_INSET_FOOTNOTE:
case LFUN_INSET_MARGINAL:
case LFUN_INSET_MINIPAGE:
case LFUN_INSET_OPTARG:
case LFUN_INSET_WIDE_FLOAT:
{
FuncRequest cmd = ev;
cmd.setView(bv_);
Inset * inset = createInset(cmd);
if (inset) {
bool gotsel = false;
if (bv_->getLyXText()->selection.set()) {
bv_->getLyXText()->cutSelection(bv_, true, false);
gotsel = true;
}
if (insertInset(inset)) {
inset->edit(bv_);
if (gotsel)
owner_->dispatch(FuncRequest(LFUN_PASTESELECTION));
}
else
delete inset;
}
break;
}
case LFUN_INSET_CAPTION: case LFUN_INSET_CAPTION:
{ {
// Do we have a locking inset... // Do we have a locking inset...

View File

@ -21,6 +21,7 @@
#include "buffer.h" #include "buffer.h"
#include "ParagraphParameters.h" #include "ParagraphParameters.h"
#include "gettext.h" #include "gettext.h"
#include "factory.h"
#include "intl.h" #include "intl.h"
#include "language.h" #include "language.h"
#include "support/lstrings.h" #include "support/lstrings.h"
@ -1056,6 +1057,37 @@ Inset::RESULT LyXText::dispatch(FuncRequest const & cmd)
break; break;
} }
#if 0
case LFUN_INSET_LIST:
case LFUN_INSET_THEOREM:
#endif
case LFUN_INSERT_NOTE:
case LFUN_INSET_ERT:
case LFUN_INSET_EXTERNAL:
case LFUN_INSET_FLOAT:
case LFUN_INSET_FOOTNOTE:
case LFUN_INSET_MARGINAL:
case LFUN_INSET_MINIPAGE:
case LFUN_INSET_OPTARG:
case LFUN_INSET_WIDE_FLOAT: {
Inset * inset = createInset(cmd);
if (inset) {
bool gotsel = false;
if (selection.set()) {
cutSelection(bv, true, false);
gotsel = true;
}
if (bv->insertInset(inset)) {
inset->edit(bv);
if (gotsel)
bv->owner()->dispatch(FuncRequest(LFUN_PASTESELECTION));
}
else
delete inset;
}
break;
}
case LFUN_QUOTE: { case LFUN_QUOTE: {
Paragraph const * par = cursor.par(); Paragraph const * par = cursor.par();
lyx::pos_type pos = cursor.pos(); lyx::pos_type pos = cursor.pos();