Bug 114337 - EDITING - Copying content from Calc to Base ignores clipboard changes
Summary: EDITING - Copying content from Calc to Base ignores clipboard changes
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.4.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-08 11:00 UTC by mkrebes
Modified: 2017-12-18 14:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
basic test file (9.44 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2017-12-17 16:40 UTC, mkrebes
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mkrebes 2017-12-08 11:00:50 UTC
Description:
Although the clipboard content was changed, LO Base keeps inserting the old out-of-date clipboard content which was current, when the program (Base) was started.

Steps to Reproduce:
1. Have an .odb file ready to quickly branch into a pre-setup database with LO base
2. Open a .xlsx file with lets say a basic table as simple as 1 column with a heading and some data below
3. copy the full data area (including header in my case but that doesnt matter)
4. open base (using the mentioned .odb file in my case)
5. insert your clipboard content to a suited database, check the db content with a double click
6. change the data in calc, save, copy to clipboard again
7. go to base again and insert the "new" clipboard content to the same file

Actual Results:  
The same old clipboard content that was current when base was started gets inserted to the database again.

Expected Results:
The new clipboard content should be inserted.
That the clipboard actually contains new data can be seen if the insert is done to any other programm let it be notepad or word or whatever.


Reproducible: Always


User Profile Reset: No



Additional Info:
My guess would be that base somehow reads out the clipboard when it is started, saves the content to another data structure and furthermore no longer checks if the clipboard was updated.
Problem can be worked around by closing base and starting it again AFTER the clipboard content was changed. Then the new content gets inserted, but again, as soon as its changed the new content is ignored.


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 Buovjaga 2017-12-16 18:14:26 UTC
Please attach test documents, so time is not spent on creating them for every tester. Also a more exact description of step 5 would be good.

Set to NEEDINFO.
Change back to UNCONFIRMED after you have provided the documents.
Comment 2 Robert Großkopf 2017-12-17 12:04:44 UTC
Couldn't confirm any buggy behavior here:
Opened Calc and created a little table with names and ID (for primarykey). Copied the table to clipbord and inserted it to an already open Base-file. Works as expected.
Then changed the ID for every field to new IDs and changed the other content. Added the content with "add data" to the table. Isn't shown directly, but after refreshing the table the GUI shows the new rows also.

So no bug on OpenSUSE 42.2
Version: 5.4.4.2
Build-ID: 2524958677847fb3bb44820e40380acbe820f960
CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; 
Gebietsschema: de-DE (de_DE.UTF-8); Calc: group
Comment 3 mkrebes 2017-12-17 16:39:24 UTC
(In reply to Buovjaga from comment #1)
> Please attach test documents, so time is not spent on creating them for
> every tester. Also a more exact description of step 5 would be good.
> 
> Set to NEEDINFO.
> Change back to UNCONFIRMED after you have provided the documents.

a test document would be rather useless, as i wrote it can be as simple as:

|field1| field2|
|1 | a
|1 | b
|1 | c

but i can attach this if this saves you time. But i cant attach a macro that changes all the one's to two's, thats something that needs to be done by hand. I also cant attach a pre-made .odb file as i cant know what database is on your system and what tables this contains, and what driver this requires and what login data this needs. Hope you understand.
Comment 4 mkrebes 2017-12-17 16:40:57 UTC
Created attachment 138493 [details]
basic test file
Comment 5 mkrebes 2017-12-17 16:44:55 UTC
(In reply to robert from comment #2)
> Couldn't confirm any buggy behavior here:
> Opened Calc and created a little table with names and ID (for primarykey).
> Copied the table to clipbord and inserted it to an already open Base-file.
> Works as expected.
> Then changed the ID for every field to new IDs and changed the other
> content. Added the content with "add data" to the table. Isn't shown
> directly, but after refreshing the table the GUI shows the new rows also.
> 
> So no bug on OpenSUSE 42.2
> Version: 5.4.4.2
> Build-ID: 2524958677847fb3bb44820e40380acbe820f960
> CPU-Threads: 4; BS: Linux 4.4; UI-Render: Standard; VCL: kde4; 
> Gebietsschema: de-DE (de_DE.UTF-8); Calc: group

nice to hear that this behaviour doenst appear in version 5.4.4.2 under Linux (i reported it for 5.4.3.2 / Windows) i will test the new version and give feedback.
Comment 6 Robert Großkopf 2017-12-17 19:13:21 UTC
A test-document would be something like an empty internal Database (with or without table) and a spreadsheet-file.

Content of your spreadsheet-file couldn't be added to a table without special description:
Where is the primarykey? Could only be field 2, because field 1 has all the same content. Or is it created automatically by another (unnamed) field?
What should be changed for second input? Must be all the content of field 2, if this field contents the primarykey. Must be only one field, if primarykey is created automatically. Only one field to have a look if content of clipboard will be recognized or not.
Comment 7 mkrebes 2017-12-17 20:53:14 UTC
(In reply to robert from comment #6)
> A test-document would be something like an empty internal Database (with or
> without table) and a spreadsheet-file.
> 
> Content of your spreadsheet-file couldn't be added to a table without
> special description:
> Where is the primarykey? Could only be field 2, because field 1 has all the
> same content. Or is it created automatically by another (unnamed) field?
> What should be changed for second input? Must be all the content of field 2,
> if this field contents the primarykey. Must be only one field, if primarykey
> is created automatically. Only one field to have a look if content of
> clipboard will be recognized or not.

why should there be a primary key?
I add all my data to an IBM Power i DB2 Database connected via ODBC, and there is no need for a primary key in the initial dataset in the classical way, IBM's DB2 handles this internally by assigning each incoming record a record number rrn(). So i could just add 1 billion lines containing just a 1 as the only field and it would be fine. 
But when i change this 1 (in calc) to let's say a 2, it is not fine if LibreOffice base keeps adding ones after i copied the new data content. 
All this worked fine with release 5.3, the problem appeared with version 5.4 and it's a highly critical killer bug for us. 

Thanks for your efforts going into the details here but i will first try to validate roberts input and check out if this bug was already fixed with 5.4.4
Comment 8 Buovjaga 2017-12-18 06:16:24 UTC
Like Robert said: "A test-document would be something like an empty internal Database (with or without table) and a spreadsheet-file"

So forget the IBM db for now and try to reproduce it with an HSQLDB document. Otherwise we cannot confirm there is a bug.
Comment 9 mkrebes 2017-12-18 11:19:11 UTC
bug fixed in 5.4.4.2