Bug 138087 - [EMF EMF+]: EMF created by SigmaPlot displays incorrectly. Workaround: export EMF_PLUS_DISABLE=1
Summary: [EMF EMF+]: EMF created by SigmaPlot displays incorrectly. Workaround: export...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.6.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://systatsoftware.com/products/s...
Whiteboard:
Keywords: filter:emf
Depends on: 142203 142548 142941
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2020-11-09 11:51 UTC by Frederic Parrenin
Modified: 2023-06-26 08:18 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
.docx file to reproduce the problem (380.14 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-09 11:51 UTC, Frederic Parrenin
Details
The file as it appears in LO. (398.30 KB, image/png)
2020-11-09 11:53 UTC, Frederic Parrenin
Details
The figure as it appears in Word. (95.97 KB, image/png)
2020-11-09 11:56 UTC, Frederic Parrenin
Details
Problematic emf image extracted from the file (3.11 MB, image/x-emf)
2020-11-09 13:02 UTC, NISZ LibreOffice Team
Details
EMF compared in MSO and LO (171.11 KB, image/png)
2020-11-09 14:53 UTC, Timur
Details
.docx file to reproduce the problem (5.96 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-09 15:39 UTC, Frederic Parrenin
Details
Another .docx file with a similar problem (467.98 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-10 08:05 UTC, Frederic Parrenin
Details
EMF image exported to PNG via Paint (566.48 KB, image/png)
2020-11-12 01:41 UTC, Bartosz
Details
Second PNG image exported via Paint (4.01 MB, image/png)
2020-11-25 14:48 UTC, Bartosz
Details
.emf file as exported from SigmaPlot corresponding to the third .docx document (1.46 MB, application/x-crossover-emf)
2020-11-26 16:23 UTC, Frederic Parrenin
Details
.emf file to reproduce the problem. (4.20 KB, application/x-crossover-emf)
2020-11-27 07:50 UTC, Frederic Parrenin
Details
.emf file to reproduce the problem. (2.90 KB, application/x-crossover-emf)
2020-11-27 07:58 UTC, Frederic Parrenin
Details
.pptx source file to used to reproduce the issues in comment #25 (1.58 MB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2020-11-30 08:37 UTC, Frederic Parrenin
Details
LO Logs from importing emf file (18.64 MB, text/x-log)
2021-05-06 07:09 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Parrenin 2020-11-09 11:51:54 UTC
Created attachment 167125 [details]
.docx file to reproduce the problem

Steps to reproduce:
- open the attached .docx file in LO
- open the same file in MS-Word
- compare
=> the figure does not appear the same. In particular, the left figure appears way too small.
I have tested with LO 6.4, 7.0 and 7.1 and the problem seems to be the same.
Comment 1 Frederic Parrenin 2020-11-09 11:53:06 UTC Comment hidden (obsolete)
Comment 2 Frederic Parrenin 2020-11-09 11:56:32 UTC Comment hidden (obsolete)
Comment 3 NISZ LibreOffice Team 2020-11-09 13:02:37 UTC
Created attachment 167136 [details]
Problematic emf image extracted from the file
Comment 4 NISZ LibreOffice Team 2020-11-09 13:05:08 UTC
Confirming with

Version: 7.1.0.0.alpha1+ (x64)
Build ID: 00e5c63c35307faacf76a5e2ca7953c4208244ed
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

In 6.0 and older the size of the left part was similarly bad, so this does not seem like a recent regression.
Comment 5 Timur 2020-11-09 14:24:25 UTC
DOCX is not important. Also if EMF inserted in new Writer file.
Comment 6 Timur 2020-11-09 14:53:09 UTC
Created attachment 167140 [details]
EMF compared in MSO and LO

As seen in screenshot, LO opened EMF differently up to 3.5, with right size but part missing. 
From 3.6 there was a change, likely EMF+ enabled. With EMF_PLUS_DISABLE=1 in 7.1+ it looks like in 3.5.
Comment 7 Frederic Parrenin 2020-11-09 15:39:57 UTC
Created attachment 167143 [details]
.docx file to reproduce the problem

Another figure from the same original document which appears incorrectly in LO.
Comment 8 Frederic Parrenin 2020-11-10 08:05:22 UTC
Created attachment 167161 [details]
Another .docx file with a similar problem

Another figure which does not display correctly in LO.
Comment 9 Bartosz 2020-11-10 19:32:44 UTC Comment hidden (obsolete)
Comment 10 Frederic Parrenin 2020-11-11 09:46:14 UTC Comment hidden (obsolete)
Comment 11 Bartosz 2020-11-12 01:41:43 UTC
Created attachment 167225 [details]
EMF image exported to PNG via Paint
Comment 12 Bartosz 2020-11-13 19:37:39 UTC
After disable EMF+ with terminal command:
export EMF_PLUS_DISABLE=1

the image is partially fixed.
Comment 13 Bartosz 2020-11-25 14:48:30 UTC
Created attachment 167569 [details]
Second PNG image exported via Paint
Comment 14 Bartosz 2020-11-25 15:06:29 UTC Comment hidden (obsolete)
Comment 15 Frederic Parrenin 2020-11-25 15:43:25 UTC
I received two documents from a colleague with some 3 figures which displayed incorrectly.
I uploaded all the 3 incorrect figures, I don't have more at this stage.
I will ask her how she produced the figures.
Comment 16 Frederic Parrenin 2020-11-25 16:12:57 UTC
So apparently my colleague created the figures in PowerPoint, by assembling different figures and adding text/drawing items.
Comment 17 Frederic Parrenin 2020-11-25 16:13:34 UTC
She created the charts using SigmaPlot.
Comment 18 Bartosz 2020-11-26 08:14:36 UTC
Thanks Frederic for information.
Which version of SigmaPlot was used for creation of these EMF images?

I see several problems here:
- vertical text are rotated by 180 degrees (both with and without EMF_PLUS_DISABLE) - first image - https://bug-attachments.documentfoundation.org/attachment.cgi?id=167225
- bitmaps are not scaled properly - first image - https://bug-attachments.documentfoundation.org/attachment.cgi?id=167225
- duplicated bitmap images - second image - https://bug-attachments.documentfoundation.org/attachment.cgi?id=167569
- missing characters (eg. "+-" near "Antarctique" text on second image) - https://bug-attachments.documentfoundation.org/attachment.cgi?id=167569

Do you think you will be able to create images with these issues (one image per issue) with SigmaPlot? It will drastically simplify the process of analysing these issues.
Comment 19 Frederic Parrenin 2020-11-26 09:25:14 UTC
I have asked my colleague about the version of SigmaPlot she uses.
I will keep you informed.
I don't have SigmaPlot myself, so I am not sure I will be able to provide simpler reproducible examples.
Comment 20 Frederic Parrenin 2020-11-26 16:23:42 UTC
Created attachment 167598 [details]
.emf file as exported from SigmaPlot corresponding to the third .docx document

Please find attached the .emf file as exported from SigmaPlot corresponding to the third .docx document.
As you can see, there are problems with axes labels placements and rotations.
In the .docx document, the figure has also probably been cropped to remove the three axes on the right of the figure, and the cropping seems to be mis-interpreted by LO.
I exported that figure using SigmaPlot 14.5 (you can download an evaluation version for free and it lasts one month).
Comment 21 Bartosz 2020-11-27 07:48:24 UTC
Could you please attach original/native SigmaPlot files, so I could edit/export it by myself. You could send it to my private e-mail.
Comment 22 Frederic Parrenin 2020-11-27 07:50:44 UTC
Created attachment 167611 [details]
.emf file to reproduce the problem.

Attached a simplification of the last image provided in comment #20.
It contains only an axis with its label.
You can see that the axis label is rotated 180° and that it is misplaced.
Comment 23 Frederic Parrenin 2020-11-27 07:58:16 UTC
Created attachment 167612 [details]
.emf file to reproduce the problem.

Attached another simplification of the .emf image in comment #20.
It contains only one grey vertical rectangle.
Comment 24 Frederic Parrenin 2020-11-27 08:03:09 UTC
@Bartosz: I prefer avoiding sending the SigmaPlot file since it is not my file but my colleague's file.
But I am available to isolate the problems one by one.
Just let me know.
Comment 25 Bartosz 2020-11-27 09:28:18 UTC
Thanks you. It is very useful.
Could you please isolate following issues
- the scaling issue from image (the chart is too small): https://bugs.documentfoundation.org/attachment.cgi?id=167125
- duplicate globes from EMF file: https://bugs.documentfoundation.org/attachment.cgi?id=167143
Comment 26 Frederic Parrenin 2020-11-27 19:18:31 UTC
@Bartosz: I have asked the source files to my colleagues for the two issues you mentioned. I will keep you informed.
Comment 27 Frederic Parrenin 2020-11-30 08:37:22 UTC
Created attachment 167672 [details]
.pptx source file to used to reproduce the issues in comment #25

@Bartosz: my colleague provided a source file in .pptx format to reproduce the two issues in comment #25.
Unfortunately, I am not able to reproduce the two issues from this source file.
There is no duplicate globe and the size of the chart is correct.
So I am not sure how to proceed from here.
Comment 28 Bartosz 2021-05-06 07:09:13 UTC
Created attachment 171670 [details]
LO Logs from importing emf file
Comment 29 QA Administrators 2023-06-25 03:13:24 UTC Comment hidden (obsolete)
Comment 30 Frederic Parrenin 2023-06-26 08:18:20 UTC
I confirm the problem still exists in 7.4.5.