Bug 87350 - FILTERS WMF elements missing
Summary: FILTERS WMF elements missing
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
Whiteboard: filter:WMF confirmed: ...
Depends on:
Reported: 2014-12-16 08:22 UTC by Marcus Nemes
Modified: 2016-03-22 08:28 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:

screen.wmf: test file; screen.png: screenshot with incorrent LO display (left) and correct OO display (right) (166.82 KB, application/zip)
2014-12-16 08:22 UTC, Marcus Nemes
complex WMF one PalletedAlpha one TrueColorAlpha (121.78 KB, application/zip)
2014-12-16 17:25 UTC, V Stuart Foote
the OPs screen.wmf as opened in OOo 3.3.0 (35.99 KB, image/png)
2014-12-16 19:44 UTC, V Stuart Foote
the OPs screen.wmf as opened in LO 3.3.0, same as through current master (43.17 KB, image/png)
2014-12-16 19:47 UTC, V Stuart Foote

Note You need to log in before you can comment on or make changes to this bug.
Description Marcus Nemes 2014-12-16 08:22:37 UTC
Created attachment 110894 [details]
screen.wmf: test file; screen.png: screenshot with incorrent LO display (left) and correct OO display (right)

LO4.3.4.1 @ Win7 32-bit does not correctly import some WMF pictures, about 80% of the elements are missing (grid, all text including the "Date:" line, cyan and green annotations). See attached png for the differences. IrfanView 4.35 also displays the WMF correctly.

In Writer or Impress: Insert|Picture|From file and select the attached wmf.
Comment 1 Buovjaga 2014-12-16 11:11:56 UTC
Reproduced -> NEW.

Win 7 64-bit Version:
Build ID: 170616e9f2d30c1302bbb5a7a4b588bc05cd5cc9
TinderBox: Win-x86@39, Branch:master, Time: 2014-12-12_01:58:46

Ubuntu 14.10 64-bit Version:
Build ID: f92183833fa569006602ac7e93c906d2094e0d4d
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2014-12-14_00:21:45
Comment 2 V Stuart Foote 2014-12-16 17:25:40 UTC
Created attachment 110916 [details]
complex WMF one PalletedAlpha one TrueColorAlpha


Looking at the .wmf with ImageMagick's identify it shows type as PalletedAlpha

Do you have any control on how you generate your WMF? Also, ImageMagick or GraphicsMagick morgify might allow transformation.

As example I've attached two rendering tests in WMF from DIA (the render-test.dia from v 0.97.2 on Windows), one is generated using DIA's own WMF code and results in a TrueColorAlpha. The other is generated using DIA's embeded Cairo based code, which generates a PalletedAlpha WMF and that has issues being opened in Draw or inserted into Draw, Writer or Impress.

The TrueColorAlpha formatted WMF seems to be handled in LibreOffice without issue.  Of course there could be a different aspect than palleted  vs. TrueColor formatting of the WMF, e.g. a drawing element extending beyond image boundaries.

Point is, not all WMF are equal. And the proprietary Microsoft format has changed over the years as have their DIB headers--device independent bitmaps--(aka BMP) and with the LogicalColorSpace as defined by MS.

Unfortunately, with changes to .WMF image formats over the years (functional as well as security issues) it is easy for things to get lost with LibreOffice's import filters.

Challenge here is teasing out the details for the few devs with mastery of the image filters to determine if this is just a corner case--or is something that needs rework.

Comment 3 V Stuart Foote 2014-12-16 17:30:18 UTC
Probably inherited from OOo, but issue confirmed version (Build ID: 5b93205)
Comment 4 V Stuart Foote 2014-12-16 18:05:11 UTC

I need to dig a bit deeper, I just realized that AOO does open this WMF fine--like you said--4.0.0, but also 4.1.0, and their 4.2.0 nightlies.

Will go ahead and try to identify when LibreOffice lost its support.
Comment 5 V Stuart Foote 2014-12-16 19:43:24 UTC
So LibreOffice mishandling of this WMF goes all the way back to at least

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice- (2011-01-19)

On the other side, the WMF will fully render in Draw of AOO 3.4.0 (AOO340m1(9590) rev 1327774 (2012-04-19)

And it fully opens in Draw OOo 3.2.1 (OOO320m18 (Build:9502)) (2010-05-21)

But, it does not open in Draw OOo 3.3.0  (OOO330m20(Build:9567)) (2011-01-17), with no rendering at all (attaching screen clip).

So, probably inherited from OOo, and we then did changes to WMF/EMF filter very early in the LibreOffice branch.

Not sure where to look for those.

@Caolan, Stephen?
Comment 6 V Stuart Foote 2014-12-16 19:44:39 UTC
Created attachment 110924 [details]
the OPs screen.wmf as opened in OOo 3.3.0
Comment 7 V Stuart Foote 2014-12-16 19:47:08 UTC
Created attachment 110925 [details]
the OPs screen.wmf as opened in LO 3.3.0, same as through current master
Comment 8 Marcus Nemes 2014-12-17 08:57:31 UTC

sadly, I han't help you much. The wmf is created by a 15 years old laboratory measurement instrument. It is based on Win2k, but has its own "desktop", where I can press the "hardcopy to file" button only.
Comment 9 QA Administrators 2015-12-20 16:16:30 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.4 or later)

If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 

1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)


2. Test your bug 

3. Leave a comment with your results. 

4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 

4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-12-20
Comment 10 Marcus Nemes 2016-03-22 08:28:49 UTC
I tested it with the Windows version Build-ID: 55b006a02d247b5f7215fc6ea0fde844b30035b3

The WMF is now displayed correctly.