Bug 155511 - Table's cells copy and paste with merged cells appears incorrect
Summary: Table's cells copy and paste with merged cells appears incorrect
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2023-05-26 11:52 UTC by Alexander Kurakin
Modified: 2023-08-17 02:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Test case file (10.99 KB, application/vnd.oasis.opendocument.text)
2023-05-26 11:52 UTC, Alexander Kurakin
Details
Screenshot (1.17 KB, image/png)
2023-05-26 11:53 UTC, Alexander Kurakin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kurakin 2023-05-26 11:52:19 UTC
1. Open the test case file.
2. Select the cells with: "1", "2", "3", "4", "5".
3. Press <Ctrl-X>.
4. Select the cells with: "6", "7", "8", "9".
5. Press <Del>.
6. Move the cursor to the cell which was "4".
7. Press <Ctrl-V>.
8. Expected second column: "", "", "", "1", "2", "3", "4", "5", "".
9. Actual second column: "", "", "", "1", "3", "", "", "5", "" (see the screenshot).
Comment 1 Alexander Kurakin 2023-05-26 11:52:47 UTC
Created attachment 187522 [details]
Test case file
Comment 2 Alexander Kurakin 2023-05-26 11:53:13 UTC
Created attachment 187523 [details]
Screenshot
Comment 3 Alexander Kurakin 2023-05-26 11:54:19 UTC
Reproduced in:

Version: 7.4.6.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: ru-RU (ru_RU.UTF-8); UI: ru-RU
Gentoo official package
Calc: threaded
Comment 4 Adam664 2023-06-06 04:02:06 UTC
Reproduced in:

Version: 7.5.2.2 (X86_64)
Build ID: 50(Build:2)
CPU threads: 1; OS: Linux 6.3; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 5 Robert Großkopf 2023-06-06 07:01:32 UTC
You have designed a table with many hidden fields. Have a look at second column. The fields are named:
B1,B2,B3,B5,B7,B8,B10,B11,B12
Then you have copied the content of B1,B2,B3,B5,B7
Move to B5
Inserted.
This will happen:
B1 → B5
B2 → B6 (but it doesn't exist)
B3 → B7
B4 has no content
B5 → B9 (but it doesn't exist)
B7 → B10

You could get the content if you create another table and press Ctrl+V there. There you could see the empty cells also.

You expect it should use only the visible columns. But this will only happen when creating a table without splitting an merging cells.

Might be this is an ask for enhancement.
Following comment 4 I will set this to NEW.
Comment 6 Alexander Kurakin 2023-06-06 10:44:58 UTC
(In reply to Robert Großkopf from comment #5)
> You have designed a table with many hidden fields.

Robert, thanks!
But what is "hidden fields" here?
Comment 7 Robert Großkopf 2023-06-06 12:38:33 UTC
(In reply to Alexander Kurakin from comment #6)
> (In reply to Robert Großkopf from comment #5)
> > You have designed a table with many hidden fields.
> 
> Robert, thanks!
> But what is "hidden fields" here?

The Table has 2 columns. There are 5 rows on the left and 9 rows on the right visible.
First field on the left is A1. Second field A4. So there have been gone the fields A2 and A3 by splitting cells. 
Properties of the table will show, inspected by macro, 12 rows.
OK, these fields aren't hidden - you can't get them back. But the content isn't saved row by row, because there are lost some cells in counting from A1 to A4: A2 and A3 aren't there. 
Try copying of column 2 ("B") the whole content and put it into column 1 ("A"). Only "1" seems to be copied, because it couldn't find A2, A3, A5 …
Comment 8 Alexander Kurakin 2023-06-06 12:53:21 UTC
Robert, now I see how the structure is difficult.

BTW, HTML version of the document is pretty strange. Should I fill a new bug about it?
Comment 9 Alexander Kurakin 2023-06-08 21:56:49 UTC
(In reply to Alexander Kurakin from comment #8)
> BTW, HTML version of the document is pretty strange. Should I fill a new bug
> about it?

Described in bug #155742 .
Comment 10 Laynerhold 2023-08-17 02:38:30 UTC
Thank you for sharing the information. 
https://papasfreezeria.io