Bug 165068 - LAYOUT: Floating image misplaced somehow by a following floating table.
Summary: LAYOUT: Floating image misplaced somehow by a following floating table.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, filter:docx
Depends on:
Blocks:
 
Reported: 2025-02-05 22:30 UTC by Justin L
Modified: 2025-02-22 20:00 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
tdf94598-6.docx_mso.pdf: how it looks in Word 2019 (318.34 KB, application/pdf)
2025-02-05 22:30 UTC, Justin L
Details
Claims_good.docx: The good round-tripped file, with xmllint --format document.xml (295.58 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-10 21:33 UTC, Justin L
Details
Claims_bad.docx: The bad round-tripped file, with bookmark removed (295.54 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-10 21:35 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Justin L 2025-02-05 22:30:39 UTC
Created attachment 199007 [details]
tdf94598-6.docx_mso.pdf: how it looks in Word 2019

The image at the top of the page (defined well before any tables are seen) has been pushed to the bottom of the page.

I'm not sure what is going on here, so not marking as a regression. If I round-trip the file first (I'm using Word 2010), then it opens OK in LibreOffice.

It was opening fine until 7.6 commit ce3308a926f036b87515b8cd97d2b197063dc77a
Author: Miklos Vajna on Wed Apr 12 08:13:07 2023
    tdf#61594 sw floattable: import floating tables as split flys by default

Steps to reproduce
1.) open Claims Form - Motor Vehicle Accident Report Form - Mar17-1.docx (attachment 134965 [details] from bug 94598)

Notice that the top of the page is filled with empty paragraphs. This area should be covered by the picture that you see at the bottom of the page.

If I select the second empty paragraph, I notice that the picture is selected as well - confirming that it is anchored there. If I delete the selected second paragraph and then undo, then the image is now laid out properly.

Found by Collabora's. mso-test
Comment 1 Justin L 2025-02-10 21:33:05 UTC
Created attachment 199122 [details]
Claims_good.docx: The good round-tripped file, with xmllint --format document.xml

(In reply to Justin L from comment #0)
> I'm not sure what is going on here, so not marking as a regression. If I
> round-trip the file first (I'm using Word 2010), then it opens OK
This has almost certainly exposed some strange layout bug. Using this "always good" document, I can make it an "always bad" layout by just removing
    <w:bookmarkStart w:id="0" w:name="_GoBack"/>
    <w:bookmarkEnd w:id="0"/>
Comment 2 Justin L 2025-02-10 21:35:03 UTC
Created attachment 199123 [details]
Claims_bad.docx: The bad round-tripped file, with bookmark removed

The only difference between the good and bad version is hand-removal of the mentioned bookmark before re-zipping it.
Comment 3 mikhail.machine 2025-02-11 07:41:18 UTC Comment hidden (no-value)
Comment 4 Justin L 2025-02-22 20:00:37 UTC
confirmed still opening wrong in master.