Bug 47243 - VIEWING: OLE images (EMF) incorrectly rendered in Linux, Mac, Win
Summary: VIEWING: OLE images (EMF) incorrectly rendered in Linux, Mac, Win
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
3.3.4 release
Hardware: All All
: high major
Assignee: Bartosz
URL:
Whiteboard: target:5.4.0
Keywords: preBibisect, regression
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2012-03-12 10:07 UTC by Sean Greenhow
Modified: 2018-04-10 20:44 UTC (History)
14 users (show)

See Also:
Crash report or crash signature:


Attachments
Problem document (112.00 KB, application/msword)
2012-03-12 10:07 UTC, Sean Greenhow
Details
Image showing rendering issue (90.40 KB, image/png)
2012-03-12 10:09 UTC, Sean Greenhow
Details
wrong preview view in libreoffice despide of correct pdf rendering (2.81 KB, image/png)
2012-08-20 09:13 UTC, Heinrichmeyer
Details
part of document correctly exported to pdf (5.68 KB, image/png)
2012-08-20 09:14 UTC, Heinrichmeyer
Details
WMF extracted from doc (18.53 KB, image/x-emf)
2013-02-22 04:41 UTC, Valek Filippov
Details
WMF from doc with removed EMF/EMF+ records (3.04 KB, image/x-wmf)
2013-02-22 04:42 UTC, Valek Filippov
Details
EMF/EMF+ extracted from WMF extracted from doc (15.38 KB, image/x-emf)
2013-02-22 04:44 UTC, Valek Filippov
Details
White rectangle obscures image (88.00 KB, application/msword)
2015-08-08 01:23 UTC, rossnixon
Details
One of the contained/extracted metafiles (wmf) (15.38 KB, image/x-emf)
2016-07-07 08:58 UTC, Armin Le Grand (allotropia)
Details
Comparison of the document in LO 6.1 and Office365 (41.28 KB, image/png)
2018-04-10 20:43 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Greenhow 2012-03-12 10:07:12 UTC
Created attachment 58333 [details]
Problem document

When viewing the attached file in Linux the OLE objects are not drawn correctly. Note under Windows rendering is ok (although not as clear as Word).
Comment 1 Sean Greenhow 2012-03-12 10:09:33 UTC
Created attachment 58334 [details]
Image showing rendering issue

A comparison between OpenOffice and LibReOffice when rendering the problem document. Note this document is also the source document for the (non-rendering) OLE bug 47240.
Comment 2 sasha.libreoffice 2012-06-05 02:03:59 UTC
Thanks for bugreport
reproduced in 3.3.4 and 3.5.4 on Fedora 64 bit (bug is Linux specific)
Changing version to 3.3.4 as most early reproducible
Comment 3 Heinrichmeyer 2012-08-20 09:13:56 UTC
Created attachment 65820 [details]
wrong preview view in libreoffice despide of correct pdf rendering
Comment 4 Heinrichmeyer 2012-08-20 09:14:55 UTC
Created attachment 65821 [details]
part of document correctly exported to pdf
Comment 5 Heinrichmeyer 2012-08-20 09:15:26 UTC
another example with libreoffice  3.5.6-1 x86_64 arch linux:
one image shows wrong document preview (it is wrong in normal view and in print preview). The next image shows correct preview after exporting the document to pdf.

Document preview works with libreoffice in windows. It was created in windows with libreoffice 3.6.0 but i think this is a long standing linux/x11 render bug.
Comment 6 Heinrichmeyer 2012-08-22 07:33:42 UTC
earlier there where linux rendering bugs depending on graphics hw. Here i have
Intel® Ironlake Desktop (intel graphics onboard)
Comment 7 Heinrichmeyer 2012-08-22 07:51:24 UTC
(In reply to comment #6)
> earlier there where linux rendering bugs depending on graphics hw. Here i have
> Intel® Ironlake Desktop (intel graphics onboard)

[Workaround]
the bug vanishes under linux when i disable the grapics rendering option 
Antialiasing (i use a german version).
Comment 8 sasha.libreoffice 2012-08-22 08:25:42 UTC
but with first attachment in 3.6.0rc on Fedora 64 bit it not helps
Comment 9 Heinrichmeyer 2012-08-23 07:09:28 UTC
(In reply to comment #8)
> but with first attachment in 3.6.0rc on Fedora 64 bit it not helps


i tried on another linux box with a very old ati graphics card, same effect, same workaround possible.

Maybe i tripped over another bug concerning X11 and antialias view.
Comment 10 Heinrichmeyer 2012-08-23 07:25:08 UTC
reported bug #53959
Comment 11 Alex Thurgood 2012-08-23 08:48:25 UTC
Not just Linux, also reproducible on Mac OSX, tested with :

Test file was a Word XML document containing a graph inserted from Excel

3.3.4 : no image visible, just the image frame/placeholder 
3.5.5.3 : incomplete image visible, most elements of OLE object missing
3.7.0 from daily build of 21/08 : incomplete image visible most elements of OLE object missing

AOOo 340 : graphs displayed correctly
Comment 12 Alex Thurgood 2012-08-23 08:49:13 UTC
Changed title to reflect situation.

Alex
Comment 13 Alex Thurgood 2012-08-23 08:50:30 UTC
For me, this is a clear blocker, as professionally, it means I have to use other software to open and edit documents containing OLE objects.


Alex
Comment 14 Alex Thurgood 2012-08-23 08:57:43 UTC
This is also a regression over OOo 3.3.0 where the OLE objects are shown correctly (some overlap of axis titles).

Setting regression keyword, upping priority.

This bug affects all those users who have to interact with e.g. scientists, who integrate Excel spreadsheet graphs or other Office or MS system declared objects into their documents.  


Alex
Comment 15 Alex Thurgood 2012-08-23 09:01:12 UTC
I can't provide the document that is causing me the trouble (confidentiality issues). Will have to see if I can cobble one together on Windows that displays the problem.


Alex
Comment 16 Alex Thurgood 2012-08-23 09:14:25 UTC
I can also reproduce with initial submitter's test file.

LO 3.5.5.3 : apparently empty image frames or incomplete image object
LO 3.7.0 (master build from 21/08) : apparently empty image frames or incomplete image object

AOOo 340 : chemical formulae displayed correctly
AOOo 330 : chemical formulae displayed correctly
NeoOffice 321 patch 7 : chemical formulae displayed correctly
Symphony 3.0.1 : chemical formulae displayed correctly (last one has been resized and is a bit small compared to others, but still clearly visible)


Alex
Comment 17 Julien Nabet 2012-10-30 22:55:32 UTC
On pc Debian x86-64 with master sources updated today, there's almost nothing of the objects.

Noticed this log 6 times in console:
warn:legacy.osl:7156:1:/home/julien/compile-libreoffice/libo/sw/source/filter/ww8/ww8graf.cxx:2390: unknown version.
Comment 18 Julien Nabet 2012-10-30 23:01:20 UTC
I tried the workaround:
Menu Tools/Options/LibreOffice/View
Option "Use Anti-Aliasing" unchecked.
Restart LO

I've got the same=>KO
Comment 19 Valek Filippov 2013-02-22 04:41:51 UTC
Created attachment 75285 [details]
WMF extracted from doc
Comment 20 Valek Filippov 2013-02-22 04:42:30 UTC
Created attachment 75286 [details]
WMF from doc with removed EMF/EMF+ records
Comment 21 Valek Filippov 2013-02-22 04:44:17 UTC
Created attachment 75287 [details]
EMF/EMF+ extracted from WMF extracted from doc

All three chemical formula files are EMF/EMF+ wrapped into WMF.
LO can draw this WMF properly (try with attached "filtered" WMF), but not EMF/EMF+ part of it.
Comment 22 Alex Thurgood 2013-02-27 18:50:24 UTC
Confirming that with LO dev 

Version 4.1.0.0.alpha0+ (Build ID: f5cde53719544c7445ab6fdb465e332ac5678b0)

on Mac OSX

the problem is still there.

The test file WMF from doc with removed EMF records appears to open fine, if the following is supposed to be what is displayed :

CH3CH(OH)-CH2-O-CH2-C(CH3)2-CH2-O-CH2-CH(CH3)-O-CH=CH     ??


However, if I open the EMF/EMF+ extracted from WMF extracted from doc file, I get a huge recatangular object with half an "O" in the bottom right hand corner.


Alex
Comment 23 Alex Thurgood 2013-02-27 18:52:05 UTC
Who's the graphics expert on the dev team ?

Alex
Comment 24 Michael Meeks 2013-02-28 16:47:02 UTC
Hi Alex - this build:

Version 4.1.0.0.alpha0+ (Build ID: f5cde53719544c7445ab6fdb465e332ac5678b0)

Seems to be from: commit f5cde53719544c7445ab6fdb465e332ac5678b02
Date:   Fri Jan 11 15:07:10 2013 +0200

We did a chunk of WMF/EMF work recently for 4.0.1 - but sadly we're still not getting this one right it seems.
Comment 25 Michael Meeks 2013-02-28 17:05:39 UTC
<frob_tea> mmeeks, rodo_: fdo#47243 has EmfPlusTypeSetClipRect (not supported in LO?), probably that's the reason for "I see only part of 'O'"
Comment 26 Alex Thurgood 2013-03-08 14:49:29 UTC
If I open the EMF/EMF+ extracted file with LibreOfficeDev under gdb, this is what I see :

2013-03-08 15:47:32.304 soffice[27743:7207] Failed to create connection to the daemon: connection timeout: did not receive reply


No idea, what kind of daemon soffice is trying to connect to here ?


Alex
Comment 27 Michael Stahl (allotropia) 2013-03-12 11:52:39 UTC
this is probably not a Writer bug but in VCL / canvas.
Comment 28 Julien Nabet 2013-03-16 17:35:17 UTC
Caolán: following Michael's last comment about a VCL/canvas bug, you might be interested in this one.
Comment 29 Joel Madero 2013-06-10 16:43:50 UTC
Hm I'm unsure if this is a regression if it hasn't been confirmed to have ever worked in LibreOffice .....any version that worked within LibreOffice?
Comment 30 Alex Thurgood 2013-06-11 07:05:45 UTC
Errm, I would be inclined to say that it is a regression because it displays fine in OOo 3.3.0 and the LO project based its initial tree on that code (or so I understand) ?

Seems to me to be a very narrow point of view to refuse to admit that we might have introduced a regression by playing with the initial OOo code we took over when the LO project was created. Just my 2c.


Alex
Comment 31 Alex Thurgood 2013-06-11 07:09:47 UTC
FWIW, both the MS Word document containing the OLE images and the separate EMF provided by the reporter all open correctly in OOo 3.4.1 on Mac.



Alex
Comment 32 Joel Madero 2013-06-11 13:53:33 UTC
to be honest - if it worked in the first release of a libreoffice branded package then it's a regression, if OOo broke it just before we branched, then it's not - I will verify this info
Comment 33 Fridrich Strba 2013-06-11 19:51:40 UTC
Just for your information. I am working on it, but it will not be a quick easy fix.
Comment 34 retired 2014-11-11 09:29:10 UTC
Persisting with Version: 4.4.0.0.alpha2+
Build ID: b9efff1c738af14ae4ee89732e3bb09e515e7959
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2014-11-11_01:57:35

Fridrich are you still on this, or should we free this bug?
Comment 35 Matthew Francis 2014-12-29 15:35:57 UTC
Adding Cc: to chris.sherlock79@gmail.com

Perhaps you can do something with this one? (apparently WMF containing EMF is a thing that exists too...)
Comment 36 Robinson Tryon (qubit) 2015-03-05 18:22:57 UTC
(In reply to Alex Thurgood from comment #30)
> Errm, I would be inclined to say that it is a regression because it displays
> fine in OOo 3.3.0 

Far too old of a regression for bibisect to be of help:
Whiteboard -> notBibisectable
Comment 37 rossnixon 2015-08-08 01:23:56 UTC
Created attachment 117763 [details]
White rectangle obscures image

Word doc appears to contain an EMF object which is mostly covered by a white rectangle when opened in Writer. I thought I would bring this problem over from an OOo bug I reported in 2007. See https://bz.apache.org/ooo/show_bug.cgi?id=79511
The problem still exists under LO 5 32-bit
Comment 38 Robinson Tryon (qubit) 2015-12-10 01:26:26 UTC Comment hidden (obsolete)
Comment 39 Armin Le Grand (allotropia) 2016-07-07 08:56:20 UTC
The doc contains a table with three fields, each containing a group object. These have a text and a wmf representing the graphic. Loading in LO and saving as odt puts these correctly fom doc file format to Pictuires folder of the odt file (checked those graphics on win).
So problem is (again) importing/painting wmf files in LO, see other tasks/issues, grep for 'wmf'.
Inserting the extracted wmf's to a new draw/impress shows the same effect, debugging leads to usage of rendering::MtfRenderer and the Canvas Metafile renderer with it's problems (ressources, zoom not cipped, ...) since MetaFile.GetUseCanvas() is set, but decomposition is not better.
Another reminder that we urgently need a wmf/emf metafile importer to primitives, neither the canvas metafile renderer is a good solution nor the current emf/wmf import that is massively incomplete.
Comment 40 Armin Le Grand (allotropia) 2016-07-07 08:58:31 UTC
Created attachment 126101 [details]
One of the contained/extracted metafiles (wmf)

Adding one of the extracted wmf's. Just insert this as grahic to e.g. draw/impress to have a simpler way to show this bug.
Comment 41 Armin Le Grand (allotropia) 2016-07-07 09:37:50 UTC
Prominent task describing this is e.g. tdf#90677
Comment 42 Armin Le Grand (allotropia) 2016-07-08 12:03:25 UTC
When disabling emf+ import by setting the env var EMF_PLUS_DISABLE to true, result is slightly better. Problem is to programatically find out if it may be better to disable it for a given wmf file or not.
Comment 43 Xisco Faulí 2016-09-14 22:14:42 UTC
Replacing keyword 'notBibisectable' by 'preBibisect' as this bug is outside the bibisect range
Comment 44 Commit Notification 2017-04-24 07:55:53 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#47243 tdf#39327 Add support for SetPageTransform

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 45 Commit Notification 2017-04-27 14:28:15 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#47243 tdf#39327 tdf#103639 Proper scaling of SetPageTransform

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-08 22:52:59 UTC

*** This bug has been marked as a duplicate of bug 31814 ***
Comment 47 Bartosz 2018-04-10 20:43:14 UTC
Created attachment 141272 [details]
Comparison of the document in LO 6.1 and Office365
Comment 48 Bartosz 2018-04-10 20:44:21 UTC
Original EMF+ issue was already resolved, see comparison LO-6.1 and Office365:
https://bugs.documentfoundation.org/attachment.cgi?id=141272

If you want to fix another issue please submit new bug report.