Bug 39327 - WMF object not visible in .doc with LibO - ChemDraw Drawing Object
Summary: WMF object not visible in .doc with LibO - ChemDraw Drawing Object
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.3 release
Hardware: All All
: high major
Assignee: Bartosz
QA Contact:
URL:
Whiteboard: target:5.4.0
Keywords:
: 37192 68810 97720 102321 108207 (view as bug list)
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2011-07-18 04:00 UTC by Witek
Modified: 2017-08-25 12:46 UTC (History)
12 users (show)

See Also:
Crash report or crash signature:


Attachments
a scheme that works OK in OpenOffice3.2.0 and not in LibreOffice 3.3.3 (95.50 KB, application/msword)
2011-07-18 04:00 UTC, Witek
Details
.doc with wmf (10.50 KB, application/msword)
2011-07-24 13:26 UTC, Witek
Details
ODT created with OOO3.2 illustrating bug (97.80 KB, application/vnd.oasis.opendocument.text)
2011-09-05 16:09 UTC, michaelp
Details
Sample Document, See comment 12 (97.80 KB, application/vnd.oasis.opendocument.text)
2011-09-05 22:15 UTC, Rainer Bielefeld Retired
Details
EMF extracted from the sample. Not rendered in LO 4.0 (62.66 KB, image/x-emf)
2013-02-21 02:26 UTC, Valek Filippov
Details
emf image is missing, only text is shown, tdf#103639 (40.04 KB, image/png)
2017-07-28 02:19 UTC, krishna [:kr1shna]
Details
a scheme that works OK - compared (129.29 KB, image/jpeg)
2017-08-23 08:58 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Witek 2011-07-18 04:00:59 UTC
Created attachment 49244 [details]
a scheme that works OK in OpenOffice3.2.0 and not in LibreOffice 3.3.3

Some drawings that are visible in OpenOffice 3.2 are not visible in LibreOffice 3.3.3. Not tested in 3.4.0 yet.
Comment 1 Witek 2011-07-18 05:17:04 UTC
Not tested in MS Windows either.
Comment 2 noname 2011-07-18 11:04:30 UTC
Unconfirmed with [Win2K LibreOffice 3.4.2 OOO340m1 (Build:201)]
I can see the scheme picture without a problem.
Comment 3 tester8 2011-07-18 11:45:52 UTC
Reproduced with

LO 3.4.1 (OOO340m1 (Build:101))
Ubuntu 10.04.2 x86
Linux 2.6.32-33-generic Russian UI
Comment 4 Witek 2011-07-18 12:00:32 UTC
I`ve just tested in 3.4.1 and still the drawings are not visible under Linux. Under MS Windows indeed the picture is visible.
Comment 5 Witek 2011-07-18 12:02:21 UTC
It doesn`t seem to be distro-related as I tested under Ubuntu, Fedora (packages from repo) and Slackware (packages built from libreoffice website)
Comment 6 Rainer Bielefeld Retired 2011-07-24 08:11:05 UTC
NOT reproducible with "LibreOffice 3.4.1 RC2 - WIN7  Home Premium (64bit) German UI [OOO340m1 (Build:202)]"
NOT reproducible  with "LibreOffice Portable 3.3.0  - WIN7  Home Premium (64bit) German UI [OOO330m19 (Build:6 Tag 3.3.0.4)]" 

Due to comments: seems to be Linux related

CONFIRMED due to Comment 3

The Object is some WMF drawing

Related to / DUP of ?
Bug 37192 - Unable to see wmf image from .doc          (looks very similar)
Bug 39327 - WMF object not visible in .doc with LibO   
Bug 32170 - FILEOPEN Opened DOCX-file is empty
Bug 36862 - Docx file displays nothing
Bug 33072 - .docx import - graphics missing (JPEG), wordart messed up
Bug 31036 - docx import: Imported images (png) not shown

@Cédric:
Please feel free to reassign if it’s not your area
Comment 7 Rainer Bielefeld Retired 2011-07-24 08:56:18 UTC
*** Bug 37192 has been marked as a duplicate of this bug. ***
Comment 8 Witek 2011-07-24 13:26:25 UTC
Created attachment 49477 [details]
.doc with wmf

It looks this is not WMF problem and the bug is not duplicate. In the attachment there is .doc with wmf file and it is visible.
Comment 9 Rainer Bielefeld Retired 2011-07-24 22:26:54 UTC
@Witek
We sometimes had problems with particular WMFs that were not shown or shown crippled, other ones were shown fine. 
It might be a difference in the wmf or in the kind of embedding, in "Example of scheme I am unable to see.doc" LibO was unable to recognize the embedded object, after unzipping of "Example of scheme I am unable to see.odt" (I saved you document with LibO") the object was shown in folder "ObjectReplacements" without extension "Object 1". 
Unzipping "test-wmf.odt" showed "200000180000631E00003ACF112792B5.wmf" in folder "Pictures", it seems that image has been recognized correctly.

Currently I would prefer to leave all as it is, the object that is not shown is a WMF. if a developer will see that the problem is a more general one the subject can be changed. 

Concerning Bug 37192 there are new facts, I will have to do some further investigations.

@Radek:
I saw that you are active in some WMF problems, may be you can have a look?
Comment 10 Rainer Bielefeld Retired 2011-07-24 22:30:30 UTC
@Witek:
You created "Example of scheme I am unable to see.doc" with OOo? So this all might be an OOo bug?
How did you create "test-wmf.doc"?
Comment 11 Witek 2011-07-25 00:45:44 UTC
We receive many documents from our partners with schemas created with chemical software that are no longer visible after change from OOfice 3.2 to LibreOffice 3.3. I took one of them opened in MSWord 2000 and deleted some sensitive information and saved again as "Example of scheme I am unable to see.doc". I don`t know exactly what type of object is embedded in this file as it was created by someone else.

As regards test-wmf I created it using LibreOffice 3.3. The embedded WMF was created using ISIS Draw (chemical software) and exported to wmf under Wine.
Comment 12 michaelp 2011-09-05 16:09:05 UTC
Created attachment 50928 [details]
ODT created with OOO3.2 illustrating bug

I've attached an Open Office document, created from a Word doc in Open Office 3.2. It just has one picture (in wmf format) that is viewable with Open Office 3.2 but is blank for me with LibreOffice 3.4.3. I'm running ubuntu 10.04 amd64.
Comment 13 Rainer Bielefeld Retired 2011-09-05 22:15:53 UTC
Created attachment 50930 [details]
Sample Document, See comment 12

@michaelp@ibsglobalweb.com 
I deleted your document accidently. Same effect as in other samples, the embedded WMF showing "BaseRequestMessage is visible

A second .jpg I find in unpacked document showing sundown or similar is not visible, Navigator shows 2 hidden watermarks, what are also invisible for me.; what ever that might have to do with the WMF problem.
Comment 14 Witek 2011-10-11 04:09:39 UTC
I tested in 3.4.3 and still the drawings are not visible under Linux
Comment 15 tester8 2011-12-30 12:48:07 UTC
LOdev 3.5.0beta2 
4ca392c-760cc4d-f39cf3d-1b2857e-60db978
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI

Sample Document, See comment 12
Only border, no scheme.
Comment 16 Witek 2012-03-04 02:25:43 UTC
Libre Office 3.5.0/ Xubuntu12.04 beta - still not working
Comment 17 Rainer Bielefeld Retired 2012-03-04 04:00:49 UTC
<http://wiki.documentfoundation.org/BugReport_Details#Version>
Comment 18 Roman Eisele 2012-05-05 09:27:46 UTC
Talking about DOC import, this issue is (at least at the surface) a Writer issue, therefore changed the 'Component' field accordingly.

The 'Version' field should contain the FIRST version in which the bug appeared, NOT the last one etc., therefore changed 'Version' back to 3.3.3 according to original description (cf. comment #11). Please do not change the 'Version' filed to a newer 'Version' if you don't have very special reasons to do so ;-)
Comment 19 Witek 2012-06-26 05:20:50 UTC
Apache office 3.4.0 works well :(
Comment 20 Lennard Wasserthal 2012-12-02 16:16:54 UTC
*** Bug 56886 has been marked as a duplicate of this bug. ***
Comment 21 Lennard Wasserthal 2012-12-22 10:25:42 UTC
Hey, I am getting those problems In windows XP, 32 bit too, not just linux related
(see attachment of bug 56886)
Comment 22 Witek 2013-02-09 12:49:52 UTC
LO 4 still not showing the WMF
Comment 23 Lennard Wasserthal 2013-02-11 08:25:58 UTC
It is seen in most Libreoffice versions...
JUST SET THE ENVIRONMENT VARIABLE

EMF_PLUS_DISABLE to 1

!!!!

So that picture got an EMF_PLUS Part which is not properly processed. Aoo perhaps uses the non-plus EMF Part!
Comment 24 Valek Filippov 2013-02-21 02:26:27 UTC
Created attachment 75218 [details]
EMF extracted from the sample. Not rendered in LO 4.0
Comment 25 Rainer Bielefeld Retired 2013-02-21 05:54:28 UTC
Back to list due to facts

I am afraid we are mixing several .emf / .wmf problems here. We should have different bugs for different problems, an indication might be that problems with the documents / pictures appear in different Versions.

I did some quick tests

Optimum would be that test-wmf.doc, Example of scheme I am unable to see.doc, LibOBugTest2.odt show the pictures in the documents (when opened from Empty writer document) and 39327_example.emf is shown whein picture inserted into empty Writer document:

[WORKSFORME] with Server Installation of "LibreOffice 3.3.3  English UI/ German Locale [OOO330m19 (Build:301) tag libreoffice-3.3.3.1] on German WIN7 Home Premium (64bit) 

[WORKSFORME] with Server Installation of   "LibreOffice 3.4.5 English UI [Build ID: OOO340m1 (Build:502)]" parallel Server installation on German WIN7 Home Premium (64bit) 

So the source problem of original report might have been Linux only?

We have to clarify what problem we are talking about! Only Problems with 3.3.3 and original sample document!

@Lennard Wasserthal
With what Version did you test?

@Roman Eisele:
Can you do a test with an early Mac version concerning my "Linux Only" suspect?
Comment 26 Lennard Wasserthal 2013-02-21 15:45:06 UTC
With LibreOffice 4.0
Version 4.0.0.3 (Build ID: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Win XP sp3, 32 Bit (intel core 2)

and

Version 4.1.0.0.alpha0+ (Build ID: 42c0fa1b60fa0780ed4ac57679f118cab8f1f14)
Linux Mint, 64 Bit (intel core 2)

Version number is not as important as switching off EMF+.
both don't work when EMF_PLUS_DISABLE is not set.

at least, we got a workaround.

Thorsten said that he fixed some cdx issue (also an EMF plus issue) upstream, but not yet in 4.0.0.
perhaps I should check the latest master...
Comment 27 tommy27 2013-09-07 13:54:52 UTC
*** Bug 68810 has been marked as a duplicate of this bug. ***
Comment 28 mattia.b89 2013-09-07 14:25:04 UTC
I'm on LO-4.1.1 x86_64 so I think you should update platform entry

anyway, the first and third attachment give me a blank/white image
while the second I see only a chemical formula COOH over a polygon

PS: trying to convert the .emf image for seeing it on linux (there is another way except converting it to see it?) with unoconv I get this error; maybe it's useful:

[mattia@arch-dekstop ~]$ unoconv 39327_example.emf 
Error: Unable to connect or start own listener. Aborting.
Comment 29 mattia.b89 2013-09-07 16:27:14 UTC
errata corrige:

unoconv creates, like LO, a white .pdf or .tiff
Comment 30 Lennard Wasserthal 2013-09-09 07:38:09 UTC
@mattia.b89

That bug can be "solved" by setting the Environment variable EMF_PLUS_DISALE to 1

Obviously, there is still an issue with the emf- PLUS file format.
Thorsten's patch was intended for chemDRAW emfplus files.

you know how to set the environment variable, mattia?


Just enter 
export EMF_PLUS_DISABLE=1 
in your system startup script, and everything will be fine


Tested with LO 3.5.7.2 (bug and workaround)

in 4.1.0.4, the workaround works but it was not tested whether the bug occurs.

Sadly, I dont have time to care about this right now.
Comment 31 mattia.b89 2013-09-09 08:28:05 UTC
I confirm:

exporting EMF_PLUS_DISABLE=1

LO-4.1.1-x86_64 shows correctly the image, in all the four attachments

also the image in my attachment (proof.doc in the issue 68810) is shown correctly!
Comment 32 Timur 2015-02-12 11:05:56 UTC Comment hidden (obsolete)
Comment 33 Timur 2015-02-12 11:09:17 UTC Comment hidden (obsolete)
Comment 34 Timur 2015-06-16 16:08:40 UTC
There were many changes in versions, but in Windows this seemed to work up to 3.5.7 and stopped in 3.6. Since reports for Linux are different, this might have been 2 different bugs. Anyway, problem persists in LO 5.1+.
Comment 35 QA Administrators 2016-09-20 10:01:33 UTC Comment hidden (obsolete)
Comment 36 Witek 2016-09-20 11:22:51 UTC
The scheme is still not visible in the LibreOfiice 5.2.1.2 in Ubuntu Linux. So the bug is still valid.
Comment 37 Witek 2016-10-22 14:10:26 UTC
Today I installed Onlyoffice for Linux and it also, unlike LibreOffice, displays the drawing correctly.
Comment 38 Bartosz 2017-04-01 02:32:58 UTC

*** This bug has been marked as a duplicate of bug 103639 ***
Comment 39 Bartosz 2017-04-01 14:03:30 UTC
The issue is resolved with:
https://gerrit.libreoffice.org/#/c/35991/
Comment 40 Commit Notification 2017-04-24 07:56:33 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 41 Commit Notification 2017-04-27 14:28:40 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 42 krishna [:kr1shna] 2017-07-28 02:19:08 UTC
Created attachment 134914 [details]
emf image is missing, only text is shown, tdf#103639
Comment 43 krishna [:kr1shna] 2017-07-28 02:20:47 UTC
attachment 50928 [details] on tdf#39327
displays blank document


attachment 128431 [details] on tdf#103639
display text only, image is not shown, please find attachment

Version: 6.0.0.0.alpha0+
Build ID: 1e87e93

device: lyf flame 3 [ ls-4001 ]
os: android 5.1
Comment 44 Timur 2017-08-23 08:58:37 UTC
Created attachment 135747 [details]
a scheme that works OK - compared

This is seen now from 5.4. It's blurry, can't say whether it will be dealt with some new "EMF+ importer that uses primitives and will replace the direct renderer". To be seen in 6.0+, I guess.
Comment 46 Timur 2017-08-24 17:46:26 UTC
*** Bug 108207 has been marked as a duplicate of this bug. ***
Comment 47 Timur 2017-08-24 17:51:20 UTC
*** Bug 97720 has been marked as a duplicate of this bug. ***
Comment 48 Timur 2017-08-25 12:46:23 UTC
*** Bug 102321 has been marked as a duplicate of this bug. ***