Bug 103906 - LO uses deprecated mime type "image/x-wmf" for WMF files instead of "image/wmf"
Summary: LO uses deprecated mime type "image/x-wmf" for WMF files instead of "image/wmf"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
(earliest affected)
Hardware: All All
: low normal
Assignee: Not Assigned
Keywords: filter:emf
Depends on:
Blocks: EMF-WMF ODF-export-invalid
  Show dependency treegraph
Reported: 2016-11-13 13:52 UTC by Joerg
Modified: 2021-12-10 19:13 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Joerg 2016-11-13 13:52:56 UTC
The IANA list the mime type "image/x-wmf" as depreciated in favor of "image/wmf", see: https://www.iana.org/assignments/media-types/media-types.xhtml#image

Steps to Reproduce:
1. Create an writer file
2. Embedd a WMF vector graphics file
3. Save the file as ODT
4. Open the file with a ZIP tool and you will find "image/x-wmf" as mime type in META-INF\manifest.xml

Actual Results:  
The depreciated mime type "image/x-wmf" is used by LibreOffice for WMF files 

Expected Results:
The mime type "image/wmf" should be used by LibreOffice for WMF files 

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0
Comment 1 V Stuart Foote 2016-11-13 17:18:06 UTC
Sure... deprecated not broken/removed.

Comment 2 Julien Nabet 2016-11-14 15:22:00 UTC
To start:

Now I suppose it doesn't just need a pure replace since we want:
1) To be able to read file with the deprecated mimetype.
2) Creation of brand new files must have the last mimetype

Modification on existing files should have the mimetype changed in case of deprecated mimetype?
Comment 3 Joerg 2016-11-14 19:39:25 UTC
Since opengrok didn't report any entry for "image/wmf", the first step should be to support this mime type for reading as well as "image/x-wmf".
There are other tools that write ODF out there. It's unlikely, that new implementations would write the deprecated "image/x-wmf" mime type to their ODF files.
Comment 4 QA Administrators 2018-05-29 02:37:05 UTC Comment hidden (obsolete)
Comment 5 Joerg 2018-05-29 09:54:48 UTC
The deprecated mimetype is still written by Version: (x64)
Build ID: 5f1ce0a77c63df597fba9d4cbd45be3a266343c3
Comment 6 QA Administrators 2019-05-30 02:54:51 UTC Comment hidden (obsolete)
Comment 7 Regina Henschel 2020-09-12 21:12:10 UTC
The wrong mime-type is still written in Version: (x64)
Build ID: 1e0cfd5662d95cea84e80e4fe10d52c3b1101ae6
CPU threads: 8; OS: Windows 10.0 Build 18362; UI render: Skia/Vulkan; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

Opening file with image/wmf works.
Comment 8 Regina Henschel 2021-12-10 19:13:59 UTC
The wrong mimetype is still written in Version: (x64) / LibreOffice Community
Build ID: 4ac9032163cf55c160145373e7c41741c9c339ca
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL

The wrong string is in https://opengrok.libreoffice.org/xref/core/comphelper/source/misc/graphicmimetype.cxx
But it is not enough to change the string. Files with type image/x-wmf would not be read correctly then. The import needs to be adapted to replace the deprecated string with the correct one.

Perhaps doable as EasyHack?