Download it now!
Bug 92315 - Writer incorrectly renders EMF file representing molecule with text in it
Summary: Writer incorrectly renders EMF file representing molecule with text in it
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: interoperability target:7.1.0 target:...
Keywords: filter:emf
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2015-06-24 16:37 UTC by g5827187
Modified: 2020-11-16 14:32 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
Copper phthalocyanine molecule in vector format (45.50 KB, image/x-emf)
2015-06-24 16:37 UTC, g5827187
Details
graph (30.71 KB, image/x-emf)
2016-02-12 14:22 UTC, giles
Details
Screenshot of the broken rendering in LO5.3.1.2 (126.54 KB, image/png)
2017-04-24 17:44 UTC, Joerg
Details
Screenshot of the correct rendering in Windows Paint (58.08 KB, image/png)
2017-04-24 17:46 UTC, Joerg
Details
Molecule compared MSO OO LO (119.56 KB, image/png)
2019-09-20 07:09 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description g5827187 2015-06-24 16:37:46 UTC
Created attachment 116809 [details]
Copper phthalocyanine molecule in vector format

1 Create a docx file
2 Create a EMF file with text. You can use the attached one.
3 link it.
4 Enjoy incorrectly rendered image
.....
N-2 Fix the bug
N-1 Close issue
N PROFIT!!!
Comment 1 raal 2015-06-24 17:36:29 UTC
I can confirm with Version: 5.1.0.0.alpha1+
Build ID: a64999511ae654131d997eec9a3d78478cfc1c75
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-06-22_05:01:17
Comment 2 giles 2016-02-12 14:22:24 UTC Comment hidden (obsolete)
Comment 3 giles 2016-02-12 14:23:34 UTC Comment hidden (obsolete)
Comment 4 giles 2016-02-12 16:05:44 UTC Comment hidden (obsolete)
Comment 5 giles 2016-02-15 15:06:41 UTC Comment hidden (obsolete)
Comment 6 Joerg 2016-05-03 06:26:11 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2016-09-12 12:41:24 UTC Comment hidden (obsolete)
Comment 8 Aron Budea 2016-09-18 04:12:18 UTC Comment hidden (obsolete)
Comment 9 Joerg 2016-09-18 06:55:31 UTC
Hello,

I just installed 5.2.1.2 and nothing has changed. The Text in the EMF images is completly wrong in size!

I'm a long time user of OpenOffice (since StarOffice 2.0 for Windows) and I'm not aware of any OpenOffice version that has problems with rendering WMF/EMF files. 
Because of the good implementation for the WMF/EMF vector graphics rendering, my company has used this format in several tools that generates ODF documents.

Currently we use OpenOffice 4.1.1, just because of this bug. Otherwise we would use LibreOffice.

Best regards,
Jörg
Comment 10 Aron Budea 2016-09-19 03:10:50 UTC
Hi Joerg, I tested both images with v5.2.1.2, and "graph" (filename: test.emf) looks exactly the same imported in Writer as it is when opened in Paint.
"Copper phthalocyanine molecule in vector format" still looks wrong, that's why the report is still open (and it seems the two issues weren't related).

If you think you got some good examples of this bug, feel free to upload example files, or if you think yours is different, file a new bug report. Even if the title suggests this is some kind of generic bug report, it isn't, and generally each issue is supposed to go in a separate report.

Note that currently there are more than 11k issues open in LibreOffice bugzilla, and unless someone takes particular interest in this, the chance of significant improvement in EMF handling is slim.
Comment 11 Joerg 2017-04-24 17:44:24 UTC
Created attachment 132798 [details]
Screenshot of the broken rendering in LO5.3.1.2

For me it looks different, I will attach screenshots how the graphic is rendered by LO5.3.1.2 form. My LO version is:

Version: 5.3.1.2 (x64)
Build-ID: e80a0e0fd1875e1696614d24c32df0f95f03deb2
CPU-Threads: 4; BS-Version: Windows 6.1; UI-Render: GL; Layout-Engine: neu; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 12 Joerg 2017-04-24 17:46:28 UTC
Created attachment 132799 [details]
Screenshot of the correct rendering in Windows Paint
Comment 13 QA Administrators 2018-06-20 02:48:49 UTC Comment hidden (obsolete)
Comment 14 Timur 2019-09-20 07:09:50 UTC
Created attachment 154310 [details]
Molecule compared MSO OO LO

Original issue with attachment 116809 [details] reproduced in LO 6.4+.
I cleaned some posts about other different example.
Comment 15 Commit Notification 2020-11-14 17:11:28 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b0b78838e795fcd7f3c53e7f74fb32b2921a5ccb

tdf#35986 tdf#92315 tdf#116335 tdf#116622 Add support for MapMode TEXT

It will be available in 7.1.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.
Comment 16 Xisco Faulí 2020-11-16 09:16:27 UTC
Verified in

Version: 7.1.0.0.alpha1+
Build ID: 548d77d0c06f7088dd3eb408797aa1fc1d7eb277
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Bartosz, thanks for fixing this issue!!
Comment 17 Commit Notification 2020-11-16 14:32:25 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/1c399bb1dc9af8d591258e936508200d38d3bb5a

tdf#35986 tdf#92315 tdf#116335 tdf#116622 Add support for MapMode TEXT

It will be available in 7.0.4.

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.