Bug 126310 - FILEOPEN DOCX Two pages document containing WMF images appears as one page
Summary: FILEOPEN DOCX Two pages document containing WMF images appears as one page
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Gabor Kelemen (allotropia)
URL:
Whiteboard: target:6.4.0 target:6.3.0.2 target:6....
Keywords: bibisected, bisected, filter:docx, regression
Depends on:
Blocks:
 
Reported: 2019-07-09 13:27 UTC by NISZ LibreOffice Team
Modified: 2024-04-17 18:14 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with WMF images (3.09 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-09 13:29 UTC, NISZ LibreOffice Team
Details
The same example file from Word with JPG images (350.49 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-09 13:30 UTC, NISZ LibreOffice Team
Details
Screenshot of the two documents in Word – no difference (260.29 KB, image/png)
2019-07-09 13:30 UTC, NISZ LibreOffice Team
Details
Screenshot of the two documents in LO 6.1 alpha right before the suspected commit – no difference (302.21 KB, image/png)
2019-07-09 13:30 UTC, NISZ LibreOffice Team
Details
Screenshot of the two documents in LO 6.1 alpha at the suspected commit. (246.86 KB, image/png)
2019-07-09 13:31 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2019-07-09 13:27:17 UTC
Description:
Attached user made document has two scanned images in WMF format on subsequent pages. In 6.0 these appeared the same way as in Word, but now they are aligned on top of each other.
The problem does not occur if the same two images are inserted in JPG format. 
I saved these to WMF with Draw (as the original document contained some scanned papers in this format) and the bug occurred after replacing the original documents images with these in Word.
I’m not sure how the original document was made, I could not reproduce the problem from scratch


Steps to Reproduce:
1.	Open attached document in Word and Writer

Actual Results:
The image from the second page is not visible and the text is at the top of the first page.

Expected Results:
Both images are visible.


Reproducible: Always


User Profile Reset: No



Additional Info:
LibreOffice details:
Version: 6.4.0.0.alpha0+ (x86)
Build ID: 49422a469646ad8be43ba828ca24c2484c26b9e8
CPU threads: 4; OS: Windows 6.3; UI render: GL; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2019-07-08_00:50:19
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL
Comment 1 NISZ LibreOffice Team 2019-07-09 13:28:12 UTC
Bibisected using bibisect-win32-6.1 to: 
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=edda1e5fc8113aa4744e32f97c96a3cc311485ca
Comment 2 NISZ LibreOffice Team 2019-07-09 13:29:36 UTC
Created attachment 152681 [details]
Example file from Word with WMF images
Comment 3 NISZ LibreOffice Team 2019-07-09 13:30:06 UTC
Created attachment 152682 [details]
The same example file from Word with JPG images
Comment 4 NISZ LibreOffice Team 2019-07-09 13:30:34 UTC
Created attachment 152683 [details]
Screenshot of the two documents in Word – no difference
Comment 5 NISZ LibreOffice Team 2019-07-09 13:30:57 UTC
Created attachment 152684 [details]
Screenshot of the two documents in LO 6.1 alpha right before the suspected commit – no difference
Comment 6 NISZ LibreOffice Team 2019-07-09 13:31:36 UTC
Created attachment 152685 [details]
Screenshot of the two documents in LO 6.1 alpha at the suspected commit.

The file with WMF images appears on one page, now with actual image content shown.
Comment 7 NISZ LibreOffice Team 2019-07-09 13:33:15 UTC
Adding CC to: Miklos Vajna

Bibisected using bibisect-win32-6.1 to: 
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=edda1e5fc8113aa4744e32f97c96a3cc311485ca 
 
author	Miklos Vajna <vmiklos@collabora.co.uk>	2018-04-20 16:32:00 +0200
Committer	Miklos Vajna <vmiklos@collabora.co.uk>	2018-04-20 21:04:35 +0200
Summary: DOCX import: lazy-read images without external headers
Comment 8 Xisco Faulí 2019-07-09 13:53:31 UTC
Reproduced in

Version: 6.4.0.0.alpha0+
Build ID: 7a0164f0d82d91e2ac481d74cdacfe9a7ad6080f
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded
Comment 9 Xisco Faulí 2019-07-12 16:46:45 UTC
Adding Cc: to Miklos Vajna
Comment 10 Gabor Kelemen (allotropia) 2019-07-15 05:50:35 UTC
Proposed patch: https://gerrit.libreoffice.org/#/c/75599/
Comment 11 Commit Notification 2019-07-15 07:59:10 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/184a4771dad448a37f80b29bc62ad62e0a6a4bb6%5E%21

tdf#126310 Disable lazy loading of WMF images

It will be available in 6.4.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 12 Commit Notification 2019-07-15 10:06:34 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/1c04b5c97ca3b12e52ec55572da77f7b6636e34c%5E%21

tdf#126310 Disable lazy loading of WMF images

It will be available in 6.3.0.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 13 Xisco Faulí 2019-07-15 11:07:06 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: ed2107f0488887528d8e49135d3270705f389ed5
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Gabor, thanks for fixing this issue!! Could it be possible to have a unittest for this fix ?
Comment 14 Commit Notification 2019-07-15 12:14:57 UTC
Gabor Kelemen committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/f88d51e1f27896e5339033671bac158d2436abcf%5E%21

tdf#126310 Disable lazy loading of WMF images

It will be available in 6.2.6.

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 15 Commit Notification 2021-03-07 20:33:18 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1238ca8d100c107656b707ed3a6b662f0a1867fb

Revert "tdf#126310 Disable lazy loading of WMF images"

It will be available in 7.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.