Bug 70827 - EDITING: copy/paste of rows not implemented (drag-n-drop is)
Summary: EDITING: copy/paste of rows not implemented (drag-n-drop is)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
Keywords: needsDevEval
Depends on:
Blocks: Clipboard
  Show dependency treegraph
Reported: 2013-10-24 07:41 UTC by Robert Großkopf
Modified: 2020-07-04 06:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Database for trying to copy and paste with table-menu and with drag and drop (3.42 KB, application/vnd.oasis.opendocument.base)
2013-10-24 07:41 UTC, Robert Großkopf

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2013-10-24 07:41:58 UTC
Created attachment 88068 [details]
Database for trying to copy and paste with table-menu and with drag and drop

Open a database.
Open a table with "AutoValue"-primarykey.
Mark a row with the mouse → right button → copy.
Go to the row for new records.
Try the menu Insert → Record. No reaction of the GUI. 

You could try the same with two tables. Both must have the same fields. Primary-Key mustn't be AutoValue, when the copied value isn't in the second table. But this doesn't work, too.

Seems there is no function behind Insert → Record. Didn't work in any LO-Version. Have tested it with 3.3.0 beta 1.

But this functionality is implemented:
Mark the header of a row you will copy.
Press the left mouse-button and draw it out of the row.
The sign appears, that the row will be copied.
Works with tables with AutoValue. Works from one table to another, if the primarykey isn't in the second table. Throws an error, when it couldn't be inserted.
You could also copy many rows the same time - but not by the menu Insert → Record.
Comment 1 Robert Großkopf 2013-11-04 17:39:04 UTC
Have tried a little bit more.
The menue in the table Insert → Record let the cursor jump to "New Row". That is all behind this menue.

So it seems that there is no possibility planned to insert a new record with the content of a copied row in the GUI.
Comment 2 Alex Thurgood 2015-01-03 17:38:52 UTC Comment hidden (no-value)
Comment 3 Julien Nabet 2015-10-11 18:27:58 UTC
Indeed, this is the code called:
   1879         case ID_BROWSER_INSERT_ROW:
   1880             try
   1881             {
   1882                 if (SaveModified())
   1883                 {
   1884                     getRowSet()->afterLast();
   1885                     // check if it is available
   1886                     Reference< XResultSetUpdate >  xUpdateCursor(getRowSet(), UNO_QUERY_THROW);
   1887                     xUpdateCursor->moveToInsertRow();
   1888                 }
   1889             }
   1890             catch(Exception&)
   1891             {
   1892                 SAL_WARN("dbaccess.ui", "Exception caught!");
   1893             }
   1894             break;
So, "Insert Row" just moves the cursor to last line for inserting a new row
Comment 4 Lionel Elie Mamane 2015-10-11 18:50:13 UTC
Insert Record indeed is *not* a paste, but is a "give me an empty record that I can type inside to insert new values".

However, if you select 1 (or even several) rows and then drag'n drop them to the same table (or a different table with the same structure), then it works, a copy is inserted as new rows. Works with AutoValue primary key. If the Primary Key column is not an AutoValue, it tries to insert, it  gives an error because giving the same value to the primary key is forbidden, *but* the row is there (at the bottom) prefilled and ready to be inserted if one manually gives an OK value to the primary key (and any other UNIQUE column).

Copy/Paste of rows indeed does not work. That's rather unfortunate, since basically the feature is there, and accessible by drag'n drop; one just would have to do "the same thing" in the case of a copy-paste.
Comment 5 Robinson Tryon (qubit) 2015-12-10 07:56:41 UTC Comment hidden (obsolete)
Comment 6 QA Administrators 2017-01-03 19:43:23 UTC Comment hidden (obsolete)
Comment 7 Robert Großkopf 2017-01-04 07:23:19 UTC
Bug still exists. copy/paste in tables isn't implemented in menue, but works with drag-n-drop.
Tested with 
Build-ID: 3d5603e1122f0f102b62521720ab13a38a4e0eb0
CPU-Threads: 4; BS-Version: Linux 4.1; UI-Render: Standard; VCL: kde4; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 8 QA Administrators 2018-07-04 02:49:17 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2020-07-04 03:37:01 UTC Comment hidden (obsolete)
Comment 10 Robert Großkopf 2020-07-04 06:15:38 UTC
Bug still exists. copy/paste in tables isn't implemented in menue, but works with drag-n-drop.
Tested with Version:
Build-ID: a726b36747cf2001e06b58ad5db1aa3a9a1872d6
CPU-Threads: 6; BS: Linux 4.12; UI-Render: Standard; VCL: kf5; 
Gebietsschema: de-DE (de_DE.UTF-8); UI-Sprache: de-DE
Calc: threaded