Bug 31814 - EMF regression: failure of displaying ChemDraw objects
Summary: EMF regression: failure of displaying ChemDraw objects
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
3.3.0 Beta3
Hardware: Other All
: medium normal
Assignee: Bartosz
QA Contact:
URL:
Whiteboard: target:5.4.0
Keywords: preBibisect, regression
: 57032 61083 (view as bug list)
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2010-11-21 06:16 UTC by Andras Timar
Modified: 2017-08-24 22:49 UTC (History)
20 users (show)

See Also:
Crash report or crash signature:


Attachments
File with example OLE objects that are not shown correctly under LibO/Fedora15 64bit (80.50 KB, application/msword)
2011-09-27 15:24 UTC, christian_l
Details
emf extracted from the doc (15.62 KB, image/x-emf)
2013-02-21 02:40 UTC, Valek Filippov
Details
2nd emf extracted from the doc (11.52 KB, image/x-emf)
2013-02-21 02:40 UTC, Valek Filippov
Details
Bug 31814 - LO 4.2 vs Word 2010 (82.88 KB, image/jpeg)
2013-07-24 13:43 UTC, bfoman (inactive)
Details
master screen shot as of today (110.76 KB, image/png)
2015-11-06 13:29 UTC, Caolán McNamara
Details
master screen shot with LO52+ in Windows (32.21 KB, image/png)
2016-04-08 06:59 UTC, Timur
Details
Another example of ole object (56.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2016-04-08 09:39 UTC, gvlatyshev
Details
Extracted emf+ image which illustrate wrong rendering of some lines (too thin) (88.99 KB, image/emf)
2017-05-07 00:32 UTC, Bartosz
Details
shaded box (21.98 KB, application/octet-stream)
2017-05-09 10:02 UTC, gvlatyshev
Details
gradient-filled boxes (39.23 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2017-05-09 10:13 UTC, gvlatyshev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2010-11-21 06:16:07 UTC
There are many ChemDraw objects (molecules) in the referenced presentation. These objects are not displayed in LibreOffice 3.3 beta 3. This is a regression, because:
Go-OO 3.2.1 - OK
OOo 3.3RC - OK
LibO 3.3b3 - BUG

http://ftp.fsf.hu/LibreOffice/Heteroarom%e1s%20vegy%fcletek%20k%e9mi%e1ja-V.ppt
Comment 1 Alex Thurgood 2010-11-21 20:22:19 UTC
I can confirm this behaviour. The objects are also displayed correctly in NeoOffice. In LibO beta 3, only the image handles are displayed.


Alex
Comment 2 Don't use this account, use tml@iki.fi 2010-11-25 05:23:27 UTC Comment hidden (obsolete)
Comment 3 Thorsten Behrens (CIB) 2010-11-25 07:04:07 UTC Comment hidden (obsolete)
Comment 4 Thorsten Behrens (CIB) 2010-11-25 07:04:28 UTC Comment hidden (obsolete)
Comment 5 Andras Timar 2011-06-02 04:00:45 UTC
The sample document opens correctly in LibreOffice 3.4.
Comment 6 gvlatyshev 2011-06-18 03:00:06 UTC
Presentation is displayed correctly in LO 3.4.0 in windows xp sp3 but not in Fedora 14
Comment 7 Phil Hord 2011-07-14 16:37:11 UTC
More data: The sample doc's images also fail to display for me in LO-3.4.1 on Ubuntu Linux x86_64.

(In reply to comment #6)
> Presentation is displayed correctly in LO 3.4.0 in windows xp sp3 but not in
> Fedora 14
Comment 8 christian_l 2011-09-27 15:24:57 UTC
Created attachment 51694 [details]
File with example OLE objects that are not shown correctly under LibO/Fedora15 64bit 

Is anybody working on this? This bug is really bothering me, as it does not only affect ChemDraw objects, but apparently /any/ chemical structure objects, both in document and presentation files, that people send me. Not sure if it affects all OLE objects, but I guess there's a chance for that, too. For me the problem exists since Fedora switched from OpenOffice to LibreOffice (Fedora 14 -> 15, 64bit version). 

I also tried with a recent nightly build, and the problem persists. 

I have attached a test file that has objects created with ChemDraw, Accelrys Draw (= formerly ISISDraw/SymyxDraw), and MarvinDraw, none of which are fully visible for me in LibO. I hope this helps for fixing the problem!

Christian
Comment 9 christian_l 2011-10-22 22:02:04 UTC Comment hidden (no-value)
Comment 10 Thorsten Behrens (CIB) 2011-10-24 06:13:35 UTC
Just checked a recent master build, MarvinDraw displays there, ChemDraw still not. Rodo, any cycles left to have a quick look?
Comment 11 Radek Doulik 2012-04-18 06:54:19 UTC
Checked the ChemDraw image and it is indeed emf+, but it opens in Draw (atom letters are missing though). So I guess it is Writer problem. I will try to fix the emf+ issue - missing letter. Giving Cc to Lubos so that he can check the Writer related part.
Comment 12 Radek Doulik 2012-04-18 10:11:48 UTC
I have fixed emf+ issue with atom names text drawing. All the embedded emf files now render OK in Draw.

Reassigning to Lubos for the Writer part.
Comment 13 Lubos Lunak 2012-07-16 15:46:27 UTC
(In reply to comment #12)
> I have fixed emf+ issue with atom names text drawing. All the embedded emf
> files now render OK in Draw.
> 
> Reassigning to Lubos for the Writer part.

I cannot confirm with current master, if I convert the .doc from comment #8 to .docx using MSO2k7, which I assume does not change the embedded .emf files, then Draw does not open the first two here.

Reassigning back.
Comment 14 Radek Doulik 2012-07-17 10:35:15 UTC
Must be another regression :-( I will look into it.
Comment 15 Radek Doulik 2012-07-17 14:29:13 UTC
OK, I was wrong, probably mistaken by exported env. variable EMF_PLUS_DISABLE set to 1 at some point.

I implemented uhnadled emf+ record DrawImage and it works now. There's another problem though, as it is rendered in very low resolution. I will need to look into whether we can draw embedded metafiles better (best without intermediate bitmap representation). It will take some time though.

Meanwhile the fix for DrawImage record is available in master branch.

Looks like writer part is OK as far as I can tell.
Comment 16 Lennard Wasserthal 2013-01-28 17:05:39 UTC
*** Bug 57032 has been marked as a duplicate of this bug. ***
Comment 17 Lennard Wasserthal 2013-01-28 17:15:55 UTC
Fails on Windows Version 3.6.3.2 Too. (32 Bit, 2x Intel Core2 Duo)
Displaying ChemDraw works when setting EMF_PLUS_DISABLE to 1.
strangely, the error occurred obviously with delay.
Comment 18 Valek Filippov 2013-02-21 02:40:04 UTC
Created attachment 75220 [details]
emf extracted from the doc
Comment 19 Valek Filippov 2013-02-21 02:40:39 UTC
Created attachment 75221 [details]
2nd emf extracted from the doc
Comment 20 Andras Timar 2013-05-13 11:43:39 UTC
It is a regression, because the bugdoc opens perfectly in Go-OO 3.2.1 (and even in AOO 3.4.1).
Comment 21 bfoman (inactive) 2013-07-24 13:43:06 UTC
Created attachment 82938 [details]
Bug 31814 	- LO 4.2 vs Word 2010

Confirmed with:
LO 4.2.0.0.alfa0
Build ID: 2013-06-24 own debug build 
Windows 7 Professional SP1 64 bit

Objects are displayed in LibreOffice, but don't look very well. Comparison screenshot LO vs Word 2010 is attached.
Comment 22 QA Administrators 2014-10-23 17:31:59 UTC Comment hidden (obsolete)
Comment 23 Andras Timar 2014-10-23 17:58:30 UTC
The bug is still there in Version: 4.4.0.0.alpha1+
Build ID: dc6052564600688c7baf2be7f5ae07b8706695aa
I tested it on Windows 7.
Comment 24 Matthew Francis 2014-12-30 03:32:03 UTC
Adding Cc: to chris.sherlock79@gmail.com

Chris, here's another EMF bug that may interest you
Comment 25 Robinson Tryon (qubit) 2015-02-19 00:42:07 UTC
*** Bug 89376 has been marked as a duplicate of this bug. ***
Comment 26 Caolán McNamara 2015-11-06 13:29:53 UTC
Created attachment 120324 [details]
master screen shot as of today
Comment 27 Robinson Tryon (qubit) 2015-12-17 11:00:28 UTC Comment hidden (no-value)
Comment 28 Timur 2016-04-05 16:53:56 UTC Comment hidden (obsolete)
Comment 29 Jean-Baptiste Faure 2016-04-08 05:11:51 UTC
(In reply to Timur from comment #28)
> Sorry, I can't see this as fixed in 5.1 or 5.2+. Please check.

Tested today with LO 5.1.3.0.0+ with the same bugdoc as Caolan and I get the same result.
I you disagree with Caolan and me, please attach your own screencopy showing how _this_ bug is still there.

If you see some problem with embedded EMF objects, please, open a new bug report with a detailed description and a test file.

Closing again. As we don't know which commit[s] fixed the bug, the right status is WorksForMe.

Best regards. JBF
Comment 30 Timur 2016-04-08 06:59:08 UTC
Created attachment 124176 [details]
master screen shot with LO52+ in Windows

My comment is for Windows, because bug is marked as "All". So please either mark as Linux or reopen.
Comment 31 Jean-Baptiste Faure 2016-04-08 08:05:02 UTC
(In reply to Timur from comment #30)
> Created attachment 124176 [details]
> master screen shot with LO52+ in Windows
> 
> My comment is for Windows, because bug is marked as "All". So please either
> mark as Linux or reopen.

It is another problem, the report is about OLE objects not displayed.
Please open a new bug report for this bad rendering.

Best regards. JBF
Comment 32 gvlatyshev 2016-04-08 09:39:11 UTC
Created attachment 124180 [details]
Another example of ole object

The content of the document is not displayed at all unless EMF_PLUS_DISABLE=1 variable is set

Fedora 21 x86_64
Libreoffice Version: 5.1.3.0.0+
Build ID: 8aa9fac23bc8f29de5e91293352f96c99418ddfc
CPU Threads: 1; OS Version: Linux 4.1; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:libreoffice-5-1, Time: 2016-04-07_13:49:34
Locale: ru-RU (ru_RU.UTF-8)
Comment 33 Bartosz 2017-05-05 00:11:21 UTC

*** This bug has been marked as a duplicate of bug 103639 ***
Comment 34 Bartosz 2017-05-05 19:32:58 UTC
A lot of EMF import issues was resolved witg LibreOffice 5.4.
Please download the LibreOffice 5.4 Daily Build from website:
http://dev-builds.libreoffice.org/daily/master/

and check if the problem was resolved for you.

Please check if LibreOffice is importing correctly OLE objects created by ChemDraw application.
Comment 35 Bartosz 2017-05-07 00:32:08 UTC
Created attachment 133111 [details]
Extracted emf+ image which illustrate wrong rendering of some lines (too thin)
Comment 36 Commit Notification 2017-05-07 17:02:31 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#31814 Introduce minimal value of line width to fix EMF+ import issues

It will be available in 5.4.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 37 Commit Notification 2017-05-08 22:06:37 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#31814 EMF+ Fix an issue when not all elements were displayed

It will be available in 5.4.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 38 Bartosz 2017-05-08 22:44:43 UTC
*** Bug 102321 has been marked as a duplicate of this bug. ***
Comment 39 Bartosz 2017-05-08 22:52:59 UTC
*** Bug 47243 has been marked as a duplicate of this bug. ***
Comment 40 Bartosz 2017-05-09 01:47:46 UTC
*** Bug 61083 has been marked as a duplicate of this bug. ***
Comment 41 gvlatyshev 2017-05-09 10:02:30 UTC
Created attachment 133184 [details]
shaded box
Comment 42 gvlatyshev 2017-05-09 10:04:37 UTC
The box is covered with gray box instead of shading
Comment 43 gvlatyshev 2017-05-09 10:13:43 UTC
Created attachment 133185 [details]
gradient-filled boxes

gradient filling is not displayed on all boxes

Version: 5.4.0.0.alpha1+
Build ID: 2b1737f648024328390bf44c4f2c614e748a92fd
CPU threads: 2; OS: Linux 4.1; UI render: default; VCL: kde4; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-05-07_03:08:54
Locale: ru-RU (ru_RU.UTF-8); Calc: group
Comment 44 Bartosz 2017-05-09 13:09:56 UTC
Thank you gvlatyshev.
Unfortunately I don't own ChemDraw. Could you please separate figures into separate EMF files?
It will simplify the investigation process.

It will be also great to create new ticket for every issue you will find.
Please let me know (eg. via email), about any new ticket for EMF import.
Comment 45 Commit Notification 2017-05-12 12:43:58 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=43f5268c6fa394b0d219f8653ef827bdd531b4e4

EMF+ tdf#31814 Add support of reading EmfPlusBoundaryPointData

It will be available in 5.4.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 46 Bartosz 2017-05-18 12:49:59 UTC
*** Bug 97720 has been marked as a duplicate of this bug. ***
Comment 47 Bartosz 2017-05-18 20:21:29 UTC
*** Bug 47240 has been marked as a duplicate of this bug. ***
Comment 48 V Stuart Foote 2017-05-28 23:56:59 UTC
*** Bug 108207 has been marked as a duplicate of this bug. ***
Comment 49 Timur 2017-08-24 16:58:19 UTC
In Windows, I can't see why this was fixed, 5.4 and 6.0+ showed it wrong similarly to 5.3. 
With https://cgit.freedesktop.org/libreoffice/core/commit/?id=ebc11ae0b132eefd3b1b1a837a8d0ad3ba73b460 it's not blurry anymore but still not correct. So I set to Reopen.
Comment 50 V Stuart Foote 2017-08-24 22:49:50 UTC
(In reply to Timur from comment #49)
> In Windows, I can't see why this was fixed, 5.4 and 6.0+ showed it wrong
> similarly to 5.3. 
> With
> https://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=ebc11ae0b132eefd3b1b1a837a8d0ad3ba73b460 it's not blurry anymore but
> still not correct. So I set to Reopen.

Yes, there is still something going on. Converting attachment 51694 [details] .doc with Word 2016 to OOXML, or to ODF, places all four images into a media directory.

The media are 3 EMF and a PNG as found in the document.

The EMF for the "Marvin Sketch" renders fine when the .doc/.docx/.odt is opened in current LO master. But the other two EMF (from Accelrys Draw, and ChemDraw) are only partially rendered and show a low resolution raster of the images lines but no lettering.

Weird as attachment 133111 [details] is pretty well formed (except for the dashed lines around the reaction box.