Created attachment 167529 [details] Example file from Word This is a followup to bug #77685 The example docx file contains an OLE object in the footer which has a replacement image. This used to appear horizontally shrunk to the left half of the page before 5.2, then it was full page width like in Word until 6.1. Since then it is shrunk to the left half ot the page again. Steps to reproduce: 1. Open attached document Actual results: Background image covers left half of the document. Expected results: Background image covers all of the document. LibreOffice details: Version: 7.2.0.0.alpha0+ (x64) Build ID: f313e27fb7f2d42247407e26e16f264e30f87ca5 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL Additional Information: Bibisected using bibisect-win32-6.1 to: URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=8484e52675052848d2d3ffe07378ce2ad29fd288 author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2018-05-11 00:22:06 +0900 committer Tomaž Vajngerl <quikee@gmail.com> 2018-05-12 10:07:09 +0200 tdf#117427 missing API for determining and loading linked graphic Adding CC to: Tomaž Vajngerl
Created attachment 167530 [details] Screenshot of the original document side by side in Word and Writer master
Verified in Version: 7.1.0.0.beta1+ Build ID: e2cffcf55b04838abc7497f6c18518c7600b670b CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
repro 7.4+
repro 7.6+
repro 24.8+ with comment 0's wrong_background_object_size.docx As mentioned, it started working in 5.2 with commit bb646c1472d3b77066b01128baf1c9cafdb40233 Author: Miklos Vajna on Tue Apr 12 09:18:47 2016 +0200 tdf#99135 VML import: handle image crop
Created attachment 193733 [details] wrong_background_object_size_min.docx: minimized to remove the OLE, header, etc. OLE is irrelevant to this bug. It just describes how the image was created. So I removed all OLE stuff from the document. The header is also irrelevant, so I moved the image into document.xml. I verified that this minimized version is affected by the same 5.2 and 6.1 commits.
The document was loading OK again in 6.2.6, but broken again in 7.2.0 when reverting commit 1c04b5c97ca3b12e52ec55572da77f7b6636e34c Author: Gabor Kelemen on Sun Jul 14 20:21:08 2019 +0200 tdf#126310 Disable lazy loading of WMF images So that suggests that GraphicHelper::importEmbeddedGraphic should include all of the wmf formats when avoiding bLazyLoad.
hmm - comment 0's document is not fixed by avoiding lazy load there. Perhaps it crops differently when it is in a header?
Created attachment 193734 [details] wrong_background_object_size_header_tiff.docx: TIFF in header - works since 5.2 So being in the header seems to be a complicating factor, but it doesn't guarantee that cropping doesn't work - it works fine for PNG and even TIFF formats.