Bug 92960 - Calc doesn't merge cells correctly when pasting merged content from HTML
Summary: Calc doesn't merge cells correctly when pasting merged content from HTML
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium minor
Assignee: Eike Rathke
URL:
Whiteboard: target:7.4.0 target:7.3.1 target:7.2.6
Keywords: bibisected, regression
: 67883 (view as bug list)
Depends on:
Blocks: Paste Calc-Merge-Split
  Show dependency treegraph
 
Reported: 2015-07-27 13:35 UTC by RoMan
Modified: 2022-02-07 16:08 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Table with merged cells in first row (822 bytes, text/html)
2015-07-27 13:35 UTC, RoMan
Details
Table without merged cells in first row (822 bytes, text/html)
2015-07-27 13:36 UTC, RoMan
Details
Inserted table with merged cells in first row in LibreOffice 4.2 (9.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-07-27 13:37 UTC, RoMan
Details
Inserted table with merged cells in first row in LibreOffice 3.5 (9.03 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-07-27 13:38 UTC, RoMan
Details
Inserted table with merged cells in first row in LibreOffice 4.2 (18.75 KB, application/vnd.oasis.opendocument.spreadsheet)
2015-07-27 21:03 UTC, RoMan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RoMan 2015-07-27 13:35:48 UTC
Created attachment 117466 [details]
Table with merged cells in first row

LibreOffice Calc have problem with inserting table with merged cells in first row.

Problem exists in all version >= 4.2 (Ubuntu 14.04 and latest).

Problem does not exists in version 3.5 (Ubuntu 12.04).

How to reproduce:
1) copy table with merged cells in first row
2) insert it in LibreOffice Calc
Comment 1 RoMan 2015-07-27 13:36:39 UTC
Created attachment 117467 [details]
Table without merged cells in first row
Comment 2 RoMan 2015-07-27 13:37:58 UTC Comment hidden (obsolete)
Comment 3 RoMan 2015-07-27 13:38:26 UTC
Created attachment 117469 [details]
Inserted table with merged cells in first row in LibreOffice 3.5
Comment 4 m_a_riosv 2015-07-27 20:55:52 UTC
Please could you explain exactly what is the issue and step by step how to reproduce it.
Comment 5 RoMan 2015-07-27 21:03:46 UTC
Created attachment 117482 [details]
Inserted table with merged cells in first row in LibreOffice 4.2
Comment 6 RoMan 2015-07-27 21:16:41 UTC
Sorry, I attached wrong file "Inserted table with merged cells in first row in LibreOffice 4.2", I replaced it.

How to reproduce:
1) copy table with merged cells in first row (attached)
2) insert it in LibreOffice Calc >= 4.2

inserted table should look as in file:
"Inserted table with merged cells in first row in LibreOffice 3.5"

but it look as in file:
"Inserted table with merged cells in first row in LibreOffice 4.2"

problem exist only if table contain merged cells in first row
Comment 7 RoMan 2015-07-27 21:26:18 UTC
Problem exist in LibreOffice 4.4.4.3 from https://launchpad.net/~libreoffice/+archive/ubuntu/ppa
Comment 8 m_a_riosv 2015-07-27 22:33:37 UTC
From which version are you copying?
Or are you opening the file with 4.2 and pasting in a new file created inside 4.2?
Comment 9 RoMan 2015-07-27 22:37:26 UTC
From HTML table "Table with merged cells in first row"
Comment 10 m_a_riosv 2015-07-27 22:49:26 UTC
Well seems that the issue is pasting (not the same than inserting) from HTML into a spreadsheet.

For me the issue happens not only in the first, but when the merged cells include the last cell in the row. For example in the fifth row.

Please change the title for a better explanation about the issue.
Comment 11 RoMan 2015-07-28 06:09:01 UTC
Title was changed
Comment 12 Chris Peñalver 2016-01-13 05:01:46 UTC
I'm going to provide a revamped Description, given it wasn't as obvious as possible what the problem was as originally described:
What is expected to happen is when one opens the following URL via Firefox https://bugs.documentfoundation.org/attachment.cgi?id=117466 > highlights all content in the top row > paste into Calc then A1 contains:
Cell1

and B1 and C1 are merged together containing:
Cell2 + 3

as it does in Excel 2013.

What happens instead is that while cell A1 contains Cell1, B1 and C1 are not merged, and B1 contains Cell2 + 3.
Comment 13 QA Administrators 2017-03-06 13:49:27 UTC Comment hidden (obsolete)
Comment 14 RoMan 2017-03-06 16:09:55 UTC
The bug is still present on:

Ubuntu 16.04, LibreOffice 5.2.5.1 from https://launchpad.net/~libreoffice/+archive/ubuntu/libreoffice-5-2

Ubuntu 16.04, LibreOffice 5.3.0.3 from https://launchpad.net/~libreoffice/+archive/ubuntu/ppa

Windows 10, LibreOffice 5.2.5.1

Windows 10, LibreOffice 5.3.0.3

The bug does not present on LibreOffice 3.5 and lower, it's a regression
Comment 15 Xisco Faulí 2017-03-07 09:54:18 UTC
I can reproduce it in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 16 RoMan 2017-03-07 10:53:40 UTC
From http://downloadarchive.documentfoundation.org/libreoffice/old/

Version 3.6.7.2 (Build ID: e183d5b) - last version without bug
Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89) - first version with bug
Comment 17 Buovjaga 2018-05-23 16:23:40 UTC
Still repro.

Arch Linux 64-bit
Version: 6.1.0.0.alpha1+
Build ID: 5956828c88501ef1366e60010b05053a8e1e642e
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 23rd 2018
Comment 19 Johnny_M 2019-08-11 12:25:09 UTC
This looks like a duplicate of the bug 67883.
Comment 20 Buovjaga 2019-08-11 13:11:07 UTC
*** Bug 67883 has been marked as a duplicate of this bug. ***
Comment 21 Stéphane Guillou (stragu) 2020-08-11 21:13:52 UTC
Reproducible in LO 7.0.0 as per comment 12.

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 22 Commit Notification 2022-02-06 10:48:26 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/8a9b870a40c41c7cae6e43452b593804fa17f831

Resolves: tdf#74577 tdf#92960 Create missing offsets in very outer table

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Eike Rathke 2022-02-06 10:52:03 UTC
Pending review https://gerrit.libreoffice.org/c/core/+/129550 for 7-3
Comment 24 Commit Notification 2022-02-07 07:28:29 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/2ea7055ea6115051a92c66a439b02d83bb067db7

Resolves: tdf#74577 tdf#92960 Create missing offsets in very outer table

It will be available in 7.3.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 25 Commit Notification 2022-02-07 14:25:23 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/04c0a05f58618f53e1be83856ebc2b615066391a

tdf#74577 tdf#92960: sc: Add UItest

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 26 Commit Notification 2022-02-07 16:08:06 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/23821b60107d4d2e46f8f0e17b016bc84379b29e

Resolves: tdf#74577 tdf#92960 Create missing offsets in very outer table

It will be available in 7.2.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.