]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insettabular.C
some reindentation, revert workarea xpos++, constify, remove all traces of LyXParagra...
[lyx.git] / src / insets / insettabular.C
index c5521d3a2755ec889536d8fdc95de6ae6be1943c..73aaf52f8bb123741b2ecd47552cf02f214c5447 100644 (file)
 #include "lyxtext.h"
 #include "lyx_gui_misc.h"
 #include "LyXView.h"
-#include "lyxfunc.h"
 #include "insets/insettext.h"
 #include "frontends/Dialogs.h"
 #include "debug.h"
-#include "lyxfunc.h"
 #include "WorkArea.h"
 #include "gettext.h"
 #include "language.h"
@@ -943,14 +941,8 @@ InsetTabular::LocalDispatch(BufferView * bv,
                if (!copySelection(bv))
                        break;
                bv->text->SetUndo(bv->buffer(), Undo::DELETE,
-#ifndef NEW_INSETS
-                                 bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous_,
-                                 bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next_
-#else
                                  bv->text->cursor.par()->previous(),
-                                 bv->text->cursor.par()->next()
-#endif
-                       );
+                                 bv->text->cursor.par()->next());
                cutSelection();
                UpdateLocal(bv, INIT, true);
                break;
@@ -962,7 +954,7 @@ InsetTabular::LocalDispatch(BufferView * bv,
                break;
        case LFUN_PASTESELECTION:
        {
-               string clip(bv->workarea()->getClipboard());
+               string clip(bv->getClipboard());
        
                if (clip.empty())
                        break;
@@ -1029,14 +1021,8 @@ InsetTabular::LocalDispatch(BufferView * bv,
        case LFUN_PASTE:
                if (hasPasteBuffer()) {
                        bv->text->SetUndo(bv->buffer(), Undo::INSERT,
-#ifndef NEW_INSETS
-                                         bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous_,
-                                         bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next_
-#else
                                          bv->text->cursor.par()->previous(),
-                                         bv->text->cursor.par()->next()
-#endif
-                               );
+                                         bv->text->cursor.par()->next());
                        pasteSelection(bv);
                        UpdateLocal(bv, INIT, true);
                        break;
@@ -1560,14 +1546,8 @@ void InsetTabular::TabularFeatures(BufferView * bv,
                sel_row_start = sel_row_end = tabular->row_of_cell(actcell);
        }
        bv->text->SetUndo(bv->buffer(), Undo::FINISH,
-#ifndef NEW_INSETS
-                         bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->previous_,
-                         bv->text->cursor.par()->ParFromPos(bv->text->cursor.pos())->next_
-#else
                          bv->text->cursor.par()->previous(),
-                         bv->text->cursor.par()->next()
-#endif
-               );
+                         bv->text->cursor.par()->next());
 
        int row = tabular->row_of_cell(actcell);
        int column = tabular->column_of_cell(actcell);