Bug 56886 - WMF contents not shown
Summary: WMF contents not shown
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Lennard Wasserthal
QA Contact:
URL:
Whiteboard: target:4.1.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-08 18:13 UTC by Lennard Wasserthal
Modified: 2013-12-15 22:49 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
WMF-containing file whose wmf is shown all white. (1.04 MB, text/rtf)
2012-11-08 18:13 UTC, Lennard Wasserthal
Details
WMF extrected from OOo 3.1.1 document (520.24 KB, image/x-wmf)
2012-12-02 10:50 UTC, Rainer Bielefeld Retired
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lennard Wasserthal 2012-11-08 18:13:26 UTC
Created attachment 69765 [details]
WMF-containing file whose wmf is shown all white.

I have a file which contains a WMF file which shows a scientific curve (Proton resonance). Perhaps it was created with MestreC. Libre office shows it as blank. I have multiple of those but cant show more until it is published.
Comment 1 Urmas 2012-11-09 02:44:00 UTC
Confirmed.
Comment 2 Rainer Bielefeld Retired 2012-12-02 10:26:40 UTC
<https://wiki.documentfoundation.org/BugTriage#Process>  item 5
Comment 3 Rainer Bielefeld Retired 2012-12-02 10:50:48 UTC
Created attachment 70908 [details]
WMF extrected from OOo 3.1.1 document

MS WORD Viewer shows some kind of chart with measurement results.

Already [Reproducible] with
- "LibreOffice 3.6.4.3 rc" German UI/ German Locale [Build-ID: 2ef5aff] {pull date 2012-11-28} on German WIN7 Home Premium (64bit) 
- server installation of "LibreOffice 3.5.7.2 rc German UI/Locale [Build-ID: 3215f89-f603614-ab984f2-7348103-1225a5b] on German WIN7 Home Premium (64bit) 
- LibO 3.3.3
- OOo 3.4.0

But worked fine with OOo 3.1.1, so I was able to extract the wmf 

server installation of "LibreOffice 3.5.7.2 rc German UI/Locale [Build-ID: 3215f89-f603614-ab984f2-7348103-1225a5b] on German WIN7 Home Premium (64bit) fails with this task, too!

Even if I save reporter's sample from OOo 3.1.1 as .odt the chart will not be shown in LibO (but looks fine in OOo 3.1.1)

And also DRAW is not able th show the WMF I extracted from the OOo3.1.1 document (see attached WMF)

So this simply is a WMF problem
Comment 4 Rainer Bielefeld Retired 2012-12-02 11:18:54 UTC
This one might be related ot or DUP of one of these <https://bugs.freedesktop.org/buglist.cgi?list_id=176508&short_desc=wmf&resolution=---&resolution=INVALID&resolution=WONTFIX&resolution=DUPLICATE&resolution=WORKSFORME&resolution=MOVED&resolution=NOTABUG&resolution=NOTOURBUG&query_format=advanced&short_desc_type=allwordssubstr&longdesc=wmf&longdesc_type=allwordssubstr&product=LibreOffice>

The effect is that all contents of the WMF is shown at the same small place when I open sample 2012-12-02 10:50 UTC, Rainer Bielefeld wiht Draw. 

@Lennard Wasserthal:
Can you help to confirm or falsify my suspect concerning DUP?
Comment 5 Lennard Wasserthal 2012-12-02 16:16:54 UTC
Perhaps the same as:
Bug 39327
The onliest other bug which may be due the same reason is Bug 39256.

*** This bug has been marked as a duplicate of bug 39327 ***
Comment 6 Lennard Wasserthal 2013-01-13 20:46:42 UTC
OK. I came nearer to the spot here!

This is an EMF Problem!
This WMF contains an EMF.
If you remove that emf, the wmf is shown correctly.
the EMF shows the same content, too, but not with LibreOffice.

EXCEPT: if you modify svtools/source/filter/wmf/winmtf.cxx, ImplMap, default case so that 

mnDevHeight=-831;
mnDevWidth=831;
(both are 1 normally)

AND

delete the items 0x1E == EMR_INTERSECTCLIPRECT and 0x4b EMR_EXTSELECTCLIPRGN from the file. The fact that it is shown without text should hint that the error is further ,,upstream'' in the file processing process.

I am working on this. Problem appears on windows, too. Problem not there with OOo 3.3.
Comment 7 Not Assigned 2013-02-19 15:53:29 UTC
Lennard Wasserthal committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3998d1abb291309ddbbc2c9869736ebb1ea608f0

fdo#56886 EMF: Fixes some scaling problems of clipped regions, Twips



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.