# HG changeset patch
# User Torsten <mttl@mailbox.org>
# Date 1527797007 -7200
#      Thu May 31 22:03:27 2018 +0200
# Node ID ca43ebf99232dd5bc2e457f29686ed1588bdfe69
# Parent  b529e3e1393db7cb648b79f21dcbc0025a83e0cd
imported patch vepaste

diff -r b529e3e1393d -r ca43ebf99232 libgui/src/variable-editor.cc
--- a/libgui/src/variable-editor.cc	Sun May 27 14:26:43 2018 -0500
+++ b/libgui/src/variable-editor.cc	Thu May 31 22:03:27 2018 +0200
@@ -579,12 +579,6 @@ namespace octave
                      tr ("Paste"),
                      this, SLOT (pasteClipboard ()));
 
-    // FIXME: Different icon for Paste Table?
-
-    menu->addAction (resource_manager::icon ("edit-paste"),
-                     tr ("Paste Table"),
-                     this, SLOT (pasteTableClipboard ()));
-
     menu->addSeparator ();
 
     menu->addAction (resource_manager::icon ("edit-delete"),
@@ -855,38 +849,6 @@ namespace octave
     QClipboard *clipboard = QApplication::clipboard ();
     QString text = clipboard->text ();
 
-    if (indices.isEmpty ())
-      {
-        if (size () == QSize (1,1))
-          mod->setData (mod->index (0,0), text.toDouble ());
-        else if (size () == QSize (0,0))
-          {
-            mod->insertColumn (0);
-            mod->insertRow (0);
-            mod->setData (mod->index (0,0), text.toDouble ());
-          }
-      }
-    else
-      {
-        QStringList cells = text.split(QRegExp("\n|\r\n|\r"));
-        int clen = cells.size ();
-        for (int i = 0; i < indices.size (); i++)
-          mod->setData (indices[i], cells.at (i % clen).toDouble ());
-      }
-  }
-
-  void variable_editor_view::pasteTableClipboard (void)
-  {
-    if (! hasFocus ())
-      return;
-
-    QAbstractItemModel *mod = model ();
-    QItemSelectionModel *sel = selectionModel ();
-    QList<QModelIndex> indices = sel->selectedIndexes ();
-
-    QClipboard *clipboard = QApplication::clipboard ();
-    QString text = clipboard->text ();
-
     QPoint start, end;
 
     QPoint tabsize = QPoint (mod->rowCount (), mod->columnCount ());
@@ -1258,8 +1220,6 @@ namespace octave
              edit_view, SLOT (copyClipboard ()));
     connect (this, SIGNAL (paste_clipboard_signal ()),
              edit_view, SLOT (pasteClipboard ()));
-    connect (this, SIGNAL (paste_table_clipboard_signal ()),
-             edit_view, SLOT (pasteTableClipboard ()));
     connect (this, SIGNAL (selected_command_signal (const QString&)),
              edit_view, SLOT (selected_command_requested (const QString&)));
     connect (edit_view->horizontalHeader (),
@@ -1560,14 +1520,6 @@ namespace octave
   }
 
   void
-  variable_editor::pasteTableClipboard (void)
-  {
-    emit paste_table_clipboard_signal ();
-
-    emit updated ();
-  }
-
-  void
   variable_editor::levelUp (void)
   {
     emit level_up_signal ();
@@ -1674,13 +1626,6 @@ namespace octave
                                   tr ("Paste"), this, SLOT (pasteClipboard ()));
     action->setStatusTip(tr("Paste clipboard into variable data"));
 
-    // FIXME: Different icon for Paste Table?
-
-    action = add_tool_bar_button (resource_manager::icon ("edit-paste"),
-                                  tr ("Paste Table"),
-                                  this, SLOT (pasteTableClipboard ()));
-    action->setStatusTip(tr("Another paste clipboard into variable data"));
-
     m_tool_bar->addSeparator ();
 
     // FIXME: Add a print item?
diff -r b529e3e1393d -r ca43ebf99232 libgui/src/variable-editor.h
--- a/libgui/src/variable-editor.h	Sun May 27 14:26:43 2018 -0500
+++ b/libgui/src/variable-editor.h	Thu May 31 22:03:27 2018 +0200
@@ -194,8 +194,6 @@ namespace octave
 
     void pasteClipboard (void);
 
-    void pasteTableClipboard (void);
-
     void handle_horizontal_scroll_action (int action);
 
     void handle_vertical_scroll_action (int action);
@@ -329,8 +327,6 @@ namespace octave
 
     void pasteClipboard (void);
 
-    void pasteTableClipboard (void);
-
     void levelUp (void);
 
     // Send command to Octave interpreter.
@@ -353,8 +349,6 @@ namespace octave
 
     void paste_clipboard_signal (void);
 
-    void paste_table_clipboard_signal (void);
-
     void level_up_signal (void);
 
     void save_signal (void);
