Bug 103913 - LibreOffice changes file extension and mime type of EMF file to .wmf and image/x-wmf
Summary: LibreOffice changes file extension and mime type of EMF file to .wmf and imag...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: László Németh
URL:
Whiteboard: target:6.2.0 target:6.1.0.1 target:6.0.6
Keywords: filter:emf
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2016-11-13 18:31 UTC by Joerg
Modified: 2021-11-22 10:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
file_with_embedded_emf_file_and_untouched_file_name_extension.odt (16.15 KB, application/vnd.oasis.opendocument.text)
2016-11-13 18:32 UTC, Joerg
Details
file_with_embedded_emf_file_after_saving_asCopy_with_LOdev5.3alpha1.odt (15.45 KB, application/vnd.oasis.opendocument.text)
2016-11-13 18:33 UTC, Joerg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joerg 2016-11-13 18:31:15 UTC
Description:
Attached is a file containing an embedded EMF file with the matching file extension .emf and the assigned mime type image/emf.

After opening this file and saving it under a different name (no other modification), the image file in the ODT got a new name with .wmf filen name extension. Also the mime type in the manifest file is changed to image/x-wmf.
But the image file is binary identical to the one in the original .odt document, therefore it must be still an EMF file, but now with the wrong file name extension and mime type assigned.

Steps to Reproduce:
1. Open the attached file file_with_embedded_emf_file_and_untouched_file_name_extension.odt
2. Save a copy of it
3. Open both files in a ZIP tool, you will see that the file in the Pictures subdirectory got a new name. 

Actual Results:  
EMF file is saved with wrong file extension .wmf
EMF file got the wrong mime type image/x-wmf in the META-INF/manifest.xml 

Expected Results:
EMF file is saved with the correct file extension .emf
EMF file get the correct mime type image/emf (or image/x-emf) in the META-INF/manifest.xml 


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 Joerg 2016-11-13 18:32:29 UTC
Created attachment 128733 [details]
file_with_embedded_emf_file_and_untouched_file_name_extension.odt
Comment 2 Joerg 2016-11-13 18:33:06 UTC
Created attachment 128734 [details]
file_with_embedded_emf_file_after_saving_asCopy_with_LOdev5.3alpha1.odt
Comment 3 Thomas Hackert 2016-12-04 13:22:18 UTC
Hello Joerg, *,
thank you very much for reporting this bug :) I can confirm it with

OS: Debian Testing AMD64
LO: back to OOO320m12 (Build:9483)

so setting status to "NEW" and version to "Inherited From OOo" (as the above mentioned version is OOo 3.2.0, my oldest parallelly installed version of OOo).
HTH
Thomas.
Comment 4 QA Administrators 2017-12-05 09:37:30 UTC Comment hidden (obsolete)
Comment 5 László Németh 2018-06-18 14:57:44 UTC
Fix in https://gerrit.libreoffice.org/#/c/56045/
Comment 6 Commit Notification 2018-06-19 07:10:39 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4cb1e86e5217f09e1d98e51e46803a06fb72f5ce

tdf#103913 keep ".emf" file extension and mime type

It will be available in 6.2.0.

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.
Comment 7 Commit Notification 2018-06-25 13:38:38 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9ff1a70edfd2cf92a65825a5c6b0a68cd79c9056&h=libreoffice-6-1

tdf#103913 keep ".emf" file extension and mime type

It will be available in 6.1.0.1.

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.
Comment 8 Commit Notification 2018-06-25 13:41:15 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c959815d55919967c9697dc8862ddec6844b7796&h=libreoffice-6-0

tdf#103913 keep ".emf" file extension and mime type

It will be available in 6.0.6.

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.
Comment 9 Xander Peter 2021-11-22 08:07:13 UTC Comment hidden (spam)