Bug 166092 - FILEOPEN DOCX: Image displayed above top of the first page
Summary: FILEOPEN DOCX: Image displayed above top of the first page
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.2.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:26.2.0 target:25.8.0.0.beta2
Keywords: bibisected, bisected
Depends on:
Blocks:
 
Reported: 2025-04-08 15:50 UTC by Justin L
Modified: 2025-06-26 23:12 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ooo127821-1_compat14.docx: the example document (311.42 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-04-08 15:50 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-04-08 15:50:14 UTC
Created attachment 200228 [details]
ooo127821-1_compat14.docx: the example document

A wrap-none (Top and Bottom) image that is set to be 6.29cm above the top of the first paragraph on the first page ought to be forced to start at the top of the page. In LO 25.2 though, it is being forced to start below the header.

This was created by roundtripping a (generated?) document using Word 2010.

The problem started with 25.2 commit 1de6bea27ed36167ec138818607da7b49e92ec4a
Author: Justin Luth on Wed Aug 28 09:30:18 2024 -0400
    tdf#143899 compat15 layout: restrict body fly to PAGE_PRINT_AREA
    
    For some inexplicable reason,
    Microsoft decided to change a non-table layout restriction
    for DOCX >= 2013.
Comment 1 Justin L 2025-06-23 15:31:18 UTC
Lovely. In DomainMapper DTOR where these ApplyProperties are called, there is a preceding UNREPORTED exception from m_pImpl->RemoveTemporaryFootOrEndnotes(), so none of these critical values are set...
Comment 2 Commit Notification 2025-06-24 12:04:03 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0df64acd9190e36ad53f8fa111b0becf0893630b

tdf#166092 writerfilter: exception killed critical settings

It will be available in 26.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 3 Commit Notification 2025-06-24 23:52:49 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

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

tdf#166092 writerfilter: exception killed critical settings

It will be available in 25.8.0.0.beta2.

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.