| Summary: | EMF image lost in command-line conversion from .odt to .doc | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Luke Deller <luke> |
| Component: | filters and storage | Assignee: | Luke Deller <luke> |
| Status: | VERIFIED FIXED | ||
| Severity: | normal | CC: | quikee, telesto, vmiklos, xiscofauli |
| Priority: | medium | Keywords: | bibisected, bisected, regression |
| Version: | 6.1.0.0.alpha0+ | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=118140 https://bugs.documentfoundation.org/show_bug.cgi?id=138515 |
||
| Whiteboard: | target:6.4.0 target:6.3.1 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 103859 | ||
| Attachments: | containsemf.odt | ||
|
Description
Luke Deller
2019-08-05 13:19:29 UTC
Created attachment 153140 [details]
containsemf.odt
Regression introduced by: https://cgit.freedesktop.org/libreoffice/core/commit/?id=7b355669c6ddeab2e6cec692d6afdff41c61d0fb author Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> 2018-04-14 15:13:05 +0900 committer Tomaž Vajngerl <quikee@gmail.com> 2018-04-20 09:15:22 +0200 commit 7b355669c6ddeab2e6cec692d6afdff41c61d0fb (patch) tree 46c55326bccfa68a2bb5fad6d637e0f4576c8d68 parent 663fd3d6e1f93ec989dc289e688d5dbfe434cbca (diff) Function to load graphic swapped out (loaded on demand) Bisected with: bibisect-linux64-6.1 Adding Cc: to Tomaž Vajngerl Thanks Xisco, that is really helpful!
I think the trouble is that we cannot get the size of the EMF when it is not properly loaded yet ("swapped in"). Tomaž' change means that the image will be swapped out until we scroll to the page, which doesn't happen when not using the GUI!
Other image formats work because we have some code to sniff the image size from the first few bytes of the file without fully loading it.
(in vcl/source/filter/graphicfilter2.cxx in GraphicDescriptor::Detect)
Adding a proper implementation of GraphicDescriptor::ImpDetectEMF in vcl/source/filter/graphicfilter2.cxx seems to fix the problem for me. I'll try to get a cppunit test case working and then submit a patch.
Luke Deller committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/6369cab9b1e16275c8700692bb717aec3c42d346%5E%21 tdf#126708 Fix EMF image size in CLI .doc export 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. Verified in Version: 6.4.0.0.alpha0+ Build ID: 6d024a69164716f7856ec936a72d01a6630d2a7c 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 @Luke, thanks for fixing this issue!! Luke Deller committed a patch related to this issue. It has been pushed to "libreoffice-6-3": https://git.libreoffice.org/core/+/bea53649cb9716c48ab2a5518ef2cea76a2cbe3b%5E%21 tdf#126708 Fix EMF image size in CLI .doc export It will be available in 6.3.1. 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. I guess we can close it as VERIFIED FIXED, specially after finding bug 118140 was fixed by this issue. @Luke, revert my change if you disagree... |