Bug 55160 - Fileopen: docx layout not imported correctly - support for nested floating tables
Summary: Fileopen: docx layout not imported correctly - support for nested floating ta...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.1.2 release
Hardware: Other All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:24.2.0 target:7.6.2
Keywords: filter:docx
: 75331 104578 (view as bug list)
Depends on:
Blocks: DOCX-Floatingtable
  Show dependency treegraph
 
Reported: 2012-09-20 18:05 UTC by Gabor Kelemen (allotropia)
Modified: 2023-09-21 06:18 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Document that is incorrectly displayed (27.61 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2012-09-20 18:05 UTC, Gabor Kelemen (allotropia)
Details
screenshot Word 2015 + LO 5 nightly, showing the issue (439.04 KB, image/jpeg)
2015-04-26 09:31 UTC, steve
Details
Current screenshot in 5.3 alpha (171.06 KB, image/png)
2016-09-20 10:16 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the file in current master (282.34 KB, image/png)
2018-05-10 21:01 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the document in current Writer master (186.46 KB, image/png)
2019-11-08 09:00 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2012-09-20 18:05:46 UTC
Created attachment 67460 [details]
Document that is incorrectly displayed

Layout of the attached docx document is not imported correctly. It looks good on Word 2003, but not on LO 3.6.1.2.
Comment 1 Miklos Vajna 2012-09-25 08:48:10 UTC
Confirmed. The document contains a table that has nested floating tables. On master, I recently added support for importing floating tables from DOCX, but support for nested floating tables are still missing.
Comment 2 Samuel Mehrbrodt (allotropia) 2014-01-23 13:59:29 UTC
Gabor, can you upload a screenshot or PDF of the correctly rendered Document?
Comment 3 Andras Timar 2014-01-23 14:45:11 UTC
@Samuel: the bug has been confirmed by a Writer developer, already.
Comment 4 steve 2015-04-26 09:31:15 UTC
Andras: and yet QA does not know what to look for when reading this description. Adding screenshot clearly indicating the issue.
Comment 5 steve 2015-04-26 09:31:32 UTC
Created attachment 115114 [details]
screenshot Word 2015 + LO 5 nightly, showing the issue
Comment 6 QA Administrators 2016-09-20 09:33:11 UTC Comment hidden (obsolete)
Comment 7 Gabor Kelemen (allotropia) 2016-09-20 10:16:03 UTC
Created attachment 127454 [details]
Current screenshot in 5.3 alpha

It's still falling apart.
Comment 8 Telesto 2016-12-11 16:44:32 UTC
*** Bug 104578 has been marked as a duplicate of this bug. ***
Comment 9 QA Administrators 2018-05-10 02:32:02 UTC Comment hidden (obsolete)
Comment 10 Gabor Kelemen (allotropia) 2018-05-10 21:01:45 UTC
Created attachment 142026 [details]
Screenshot of the file in current master

Still not good, although in a different way.
Comment 11 QA Administrators 2019-11-08 03:38:49 UTC Comment hidden (obsolete)
Comment 12 NISZ LibreOffice Team 2019-11-08 09:00:06 UTC
Created attachment 155627 [details]
Screenshot of the document in current Writer master

Still falling apart in:

Version: 6.4.0.0.alpha1+ (x86)
Build ID: 80109586e6cb6d3e2e0a53a9079c3125ec9b8368
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 13 Svatopluk Vít 2021-03-05 12:19:25 UTC
Bug is still present.

Version: 7.1.1.1 / LibreOffice Community
Build ID: 575c5867c4cc13d7ae78f9ce39a54a52ed38c769
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: kf5
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 14 QA Administrators 2023-03-06 04:23:16 UTC Comment hidden (obsolete)
Comment 15 Roman Kuznetsov 2023-04-14 11:57:31 UTC
Problem is still here

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4e70952efbc97bef7bc108e738bee346bf5de605
CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL threaded
Comment 16 Justin L 2023-08-18 15:42:41 UTC
*** Bug 75331 has been marked as a duplicate of this bug. ***
Comment 17 Miklos Vajna 2023-09-13 09:55:30 UTC
> support for nested floating tables are still missing
 3aa3f0a1638a8d8006955b62bb647526768be3d8 (sw floattable, nesting: fix position of the inner follow table, 2023-09-07) adds Writer layout support for nested floating tables in general.

I looked at attachment 67460 [details], and it seems to me that the primary problem is that we still create a single floating table (frame) when we import it, while the DOCX file has multiple <w:tblpPr> elements. This is because DOCX import/export for inner floating tables at table cell start is broken, so we disable that at import time.

So let's focus on this problem for the scope of this bug. (You can easily verify this using the navigator, it shows a single frame, it should show 19 frames.)

I'll take a look.
Comment 18 Commit Notification 2023-09-14 07:16:14 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d50e5d6d53c94124f825758a74e186b934fc2a4e

Related: tdf#55160 sw floattable, nested DOCX exp: fix inner tbl at cell start

It will be available in 24.2.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 19 Miklos Vajna 2023-09-14 07:19:27 UTC
This is just the export part, more work is needed on the import side.
Comment 20 Commit Notification 2023-09-15 13:31:17 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

Related: tdf#55160 sw floattable, nested DOCX imp: fix inner tbl at cell start

It will be available in 24.2.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 21 Miklos Vajna 2023-09-15 14:01:19 UTC
What's still broken is one cell where two floating tables are anchored at (outer) cell start.
Comment 22 Commit Notification 2023-09-18 07:43:47 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a33316afa4a20499159b8c900e56658512deb74a

tdf#55160 sw floattable, nested DOCX imp: fix inner tables at cell start

It will be available in 24.2.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 Miklos Vajna 2023-09-18 07:54:07 UTC
I think this now looks reasonable on master.
Comment 24 Commit Notification 2023-09-19 10:50:45 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/96d74b7d02aa4d7e143c67d2a55f2b5c00e56232

Related: tdf#55160 sw floattable, nested DOCX exp: fix inner tbl at cell start

It will be available in 7.6.2.

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 2023-09-20 12:17:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/b973401c5698135da831dbadca083a8f9d356a60

Related: tdf#55160 sw floattable, nested DOCX imp: fix inner tbl at cell start

It will be available in 7.6.2.

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 2023-09-21 06:18:29 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/0842e6ae7db830b7ccf540685174af101dc68bc0

tdf#55160 sw floattable, nested DOCX imp: fix inner tables at cell start

It will be available in 7.6.2.

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.