Bug 118559 - Calc: Bug with copy+paste for joined cells that breaks neighbor cells into pieces (and breaks Undo/Redo in LO 5.x)
Summary: Calc: Bug with copy+paste for joined cells that breaks neighbor cells into pi...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Undo-Redo Cut-Copy
  Show dependency treegraph
 
Reported: 2018-07-05 19:38 UTC by marcusman
Modified: 2023-07-07 08:09 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Calc file that contains a simple testcase. (20.61 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-05 19:40 UTC, marcusman
Details
first screenshot (69.23 KB, image/png)
2018-07-05 19:41 UTC, marcusman
Details
2nd screenshot (44.01 KB, image/png)
2018-07-05 19:41 UTC, marcusman
Details
3rd screenshot (47.02 KB, image/png)
2018-07-05 19:42 UTC, marcusman
Details
4th screenshot (46.76 KB, image/png)
2018-07-05 19:42 UTC, marcusman
Details
after the copy-paste you can see the damage in neighbor cells (17.11 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-07-06 15:16 UTC, marcusman
Details
screenshot (119.40 KB, image/png)
2018-07-06 16:13 UTC, Xavier Van Wijmeersch
Details
screenshot (21.14 KB, image/png)
2018-07-08 08:54 UTC, Xavier Van Wijmeersch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description marcusman 2018-07-05 19:38:17 UTC
Description:
Consider this .ods (Calc) file:
C:\fakepath\problem_1.ods
When trying to copy and paste the green cell into the cells below, the neighboring cells get damaged. When trying to Undo, the previous state of the document isn't restored - thus Undo fails.
Could this bug please be fixed? My only workaround currently is to copy and paste only one cell at a time which is quite annoying.
Here is a series of screenshot images that illustrates the problem:
(See screenshot images)

Steps to Reproduce:
1. Open the attached file problem_1.ods
2. Try to copy and paste the green cell into the cells below
3. Examine the damage
4. Try to Undo
5. Examine the damage

Workaround: Copy one cell at a time does not destroy the other cells.
Workaround is very cumbersome and not a practical solution.
Undo not working is especially concerning...

Actual Results:
a) Combined cells get destroyed.

b) An Undo does not repair the cells (by returning to the previous state).

Expected Results:
a) Combined cells stay the way they are.

b) An Undo does at least restore the previous state.


Reproducible: Always


User Profile Reset: No



Additional Info:
a) The thing that every normal user would expect.

b) The thing that every normal user would expect.

NOTE:
I have a series of screenshots that illustrates the problem.
I have a Calc file problem_1.ods that contains the problem.
See the attachment for this bug.
Comment 1 marcusman 2018-07-05 19:40:58 UTC
Created attachment 143325 [details]
Calc file that contains a simple testcase.

I would like to add four .png images (screenshots) too.
Hope that I can add more than one file?
Comment 2 marcusman 2018-07-05 19:41:33 UTC
Created attachment 143326 [details]
first screenshot
Comment 3 marcusman 2018-07-05 19:41:55 UTC
Created attachment 143327 [details]
2nd screenshot
Comment 4 marcusman 2018-07-05 19:42:14 UTC
Created attachment 143328 [details]
3rd screenshot
Comment 5 marcusman 2018-07-05 19:42:32 UTC
Created attachment 143329 [details]
4th screenshot
Comment 6 marcusman 2018-07-05 20:21:58 UTC
"User Profile" problem checked by restarting in safe mode.
Does not change anything.
Comment 7 m_a_riosv 2018-07-05 22:29:59 UTC
Not reproducible with
Version: 6.0.5.2 (x64)
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: es-ES (es_ES); Calc: CL

Please test with a newer version.
Comment 8 marcusman 2018-07-05 23:54:36 UTC
Still persists in this latest 5.4.7.2 version:

Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 8; BS: Windows 6.19; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group


Installing the version 6.0.5 now and will be reporting back in a few minutes...
Comment 9 marcusman 2018-07-06 00:07:33 UTC
Tested with 6.0.5 with following results:

Aspect a) (the destruction of neighboring cells) still persists: Reproduced.

Aspect b) (the ineffectiveness of Undo) was fixed: Can't be reproduced anymore.

So, the bug is half fixed and half not fixed.

Version: 6.0.5.2 (x64)
Build-ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU-Threads: 8; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 10 m_a_riosv 2018-07-06 11:16:14 UTC
I can't reproduce any issue on the copied cell.
Comment 11 Xisco Faulí 2018-07-06 12:44:33 UTC
Thank you for reporting the bug. 
Could you please create and attach a screencast showing the steps?
There are various free screencast software available for use, including Camstudio (Windows), Jing (Mac), Simple Screen Recorder (Linux) or screencast-o-matic.com (Web).

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested screencast is provided.
Comment 12 marcusman 2018-07-06 15:16:33 UTC
Created attachment 143359 [details]
after the copy-paste you can see the damage in neighbor cells

Here you can see the damage in the neighbor cells (right next to the copied green cells). I just copied the cell C21 into the cells below.

I won't do a screencast, but thanks for pointing me to that software. I provided four screenshots that show the simple action and what happens. You can see the screenshots here:
https://ask.libreoffice.org/en/question/159774/found-bug-that-also-breaks-undo/
Comment 13 Xavier Van Wijmeersch 2018-07-06 16:13:38 UTC
Created attachment 143360 [details]
screenshot

It seems to me that the borders are not correct set, see screenshot.
but when copy the green cell and then pasting to C22:C33; then it will undo in the next column, the merged cells.
Pressing ctrl+z will reset to the normal state.

Version: 5.3.7.2
Build ID: 6b8ed514a9f8b44d37a1b96673cbbdd077e24059
CPU Threads: 8; OS Version: Linux 4.14; UI Render: default; VCL: kde4; Layout Engine: new; 
Locale: nl-BE (en_US.UTF-8); Calc: group

Version: 6.2.0.0.alpha0+
Build ID: df8589bd49d7eb1bb42ae78abcb91d33cf9255ce
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group threaded
Comment 14 marcusman 2018-07-06 17:51:29 UTC
Yes, Undo works (Aspect b).

But the cells get destroyed (Aspect a).

Thus, the bug is 50% fixed and 50% not fixed.

Only workaround to prevent the damage is to dopy one cell at a time (C21 -> C22, C21 -> C23, C21 -> C24) which works but is very painful.

Note, that it's not just the borders, but also the combination (joining) of the cells which breaks - instead of 1 combined cell you get 5 non-combined cells. That's what I call "damage" since it ruins not only the layout (border lines) but also breaks 1 combined cell into 5 smaller cells which has many negative effects.
Comment 15 marcusman 2018-07-06 22:58:41 UTC Comment hidden (obsolete)
Comment 16 marcusman 2018-07-06 23:06:00 UTC Comment hidden (obsolete)
Comment 17 Xavier Van Wijmeersch 2018-07-08 08:54:10 UTC
Created attachment 143386 [details]
screenshot

confirm the problem when copying and pasting, see attachment

Version: 6.2.0.0.alpha0+
Build ID: df8589bd49d7eb1bb42ae78abcb91d33cf9255ce
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: nl-BE (en_US.UTF-8); Calc: group threaded
Comment 18 Xisco Faulí 2018-07-09 14:10:20 UTC
I can't reproduce it in

Version: 6.2.0.0.alpha0+
Build ID: 67f3063b7c334d4d5c59132d90b938671aad09f0
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Xavier, Could you please share the specific steps to reproduce it ? Do you use paste or paste special?
Comment 19 marcusman 2018-07-09 15:35:44 UTC
Hello, may I?

Actually, paste or paste special doesn't matter.

How to reproduce:
Using the file (from the first attachment)...
- select the cells H22 and H23 and observe: they are combined cells
- now select cell C21
- copy (CTRL+C)
- now select cells C22 to C39
- paste (CTRL+V)
- select the cells H22, I22, H23, I23 and observe: cells not combined anymore


Forget about the "Undo broken" part of this bug - that got fixed in 6.0 of LO.
It's now only about the breaking apart of random neighboring cells.
Comment 20 Xavier Van Wijmeersch 2018-07-10 12:24:55 UTC
@Xisco

I only used the past option not past special
retested it with past special still can reproduce the problem
Comment 21 Xavier Van Wijmeersch 2018-07-10 12:29:00 UTC
@Xisco

see comment13 and followed the description from the reporter
Comment 22 QA Administrators 2019-07-12 02:52:52 UTC Comment hidden (obsolete)
Comment 23 QA Administrators 2021-07-12 03:42:31 UTC Comment hidden (obsolete)
Comment 24 Diana Vides 2023-07-04 05:32:13 UTC
This bug is not present in the current version: Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hr-HR (en_US); UI: en-US
Calc: threaded

Neither present in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 105f057f5b994b7d79a55ca719240839c2d45b54
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hr-HR (en_US); UI: en-US
Calc: CL threaded
Comment 25 Buovjaga 2023-07-06 17:48:47 UTC
Comment 24 did not mention reproducing with an older version and now I tested with 6.3, couldn't repro, so I think we need to hear from marcusman and Xavier. Setting back to NEW.
Comment 26 ady 2023-07-06 20:09:23 UTC
Following comment 19 on MS Windows using attachment 143325 [details] from comment 1, for me this is repro up to LO 7.0, and solved since LO 7.1. I have not tested under other OSes.
Comment 27 Buovjaga 2023-07-07 08:09:16 UTC
Great, thanks ady. In that case we can confidently close.