Bug 164474 - Docx import drops table with anchor
Summary: Docx import drops table with anchor
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.2.0.2 rc
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks: DOCX-Tables DOCX-Section
  Show dependency treegraph
 
Reported: 2024-12-27 07:32 UTC by Pasi Ahopelto
Modified: 2024-12-27 15:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Word docx showing the problem (29.37 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-12-27 07:33 UTC, Pasi Ahopelto
Details
Screen capture showing the problem (2.87 KB, image/png)
2024-12-27 07:34 UTC, Pasi Ahopelto
Details
Screen capture showing how it should look (12.17 KB, image/png)
2024-12-27 07:34 UTC, Pasi Ahopelto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pasi Ahopelto 2024-12-27 07:32:52 UTC
Description:
A Word document (docx) is opened in LibreOffice. It has a table inside an anchor that is followed by subject and text. The table is visible in Word, but not in LibreOffice. 

If the anchor is removed in Word (click on table, right click on anchor icon, "format frame..." and "remove frame"), then LibreOffice loads the docx correctly.

It's quite difficult to create a table in Word with anchor for testing different scenarios, but this doesn't happen on every anchored table. It happens always with the attached docx.

This started to happen in LibreOffice 24.2.0.2. 24.2.0.1 is OK. Tested in Windows LibreOffice, and in Linux with headless mode's docx to pdf conversion.


Steps to Reproduce:
1. Open attached docx in LibreOffice.


Actual Results:
There should be table above "TEST TITLE". This isn't visible. See attached image 24.2.0.2-NOK.png.


Expected Results:
Table should be visible as shown in attached 24.2.0.1-OK.png.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.0.2 (X86_64) / LibreOffice Community
Build ID: b1fd3a6f0759c6f806568e15c957f97194bbec8f
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: fi-FI
Calc: threaded
Comment 1 Pasi Ahopelto 2024-12-27 07:33:52 UTC
Created attachment 198279 [details]
Word docx showing the problem
Comment 2 Pasi Ahopelto 2024-12-27 07:34:30 UTC
Created attachment 198280 [details]
Screen capture showing the problem
Comment 3 Pasi Ahopelto 2024-12-27 07:34:54 UTC
Created attachment 198281 [details]
Screen capture showing how it should look
Comment 4 zcrhonek 2024-12-27 07:50:11 UTC
Confirm with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: cac9c7db6257b27724d90d4a355e52e456ef7e08
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Works in Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 6f227b0dd912d4c70a01eb3872fff15d52de543a
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 5 zcrhonek 2024-12-27 08:05:22 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2.
Adding Cc: to Mike Kaganski ; Could you possibly take a look at this one?
Thanks
 ef53d924fcce06949903c46bf7e0b10abe420874 is the first bad commit
commit ef53d924fcce06949903c46bf7e0b10abe420874
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Wed Jan 3 10:35:01 2024 +0100

    source 62e8b576b287111bd0dc79e71334f77dcf909938

161300: tdf#158855: Make sure to not add extra paragraph after a table in a section | https://gerrit.libreoffice.org/c/core/+/161300
Comment 6 Mike Kaganski 2024-12-27 12:37:12 UTC
https://gerrit.libreoffice.org/c/core/+/179443
Comment 7 Commit Notification 2024-12-27 13:57:15 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/647aa0f596e899176a088e47c16124cccdff4fc8

tdf#164474: do not delete anchor node, when the anchor didn't move

It will be available in 25.8.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 8 BogdanB 2024-12-27 15:22:28 UTC
Thanks, Mike, working well in
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 647aa0f596e899176a088e47c16124cccdff4fc8
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

The table is here.