Bug 147818 - [EMF/EMF+] FILEOPEN Schematic Lines are not displayed. Workaround: export EMF_PLUS_DISABLE=1
Summary: [EMF/EMF+] FILEOPEN Schematic Lines are not displayed. Workaround: export EMF...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
7.2.5.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:7.4.0
Keywords:
Depends on:
Blocks: emf-testbed EMF-WMF
  Show dependency treegraph
 
Reported: 2022-03-07 05:57 UTC by Gregory G.
Modified: 2022-04-03 12:45 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Files showing the good and bad results (221.49 KB, application/x-zip-compressed)
2022-03-07 06:04 UTC, Gregory G.
Details
Line drawing issue with LibreOffice (PNG picture file) (29.28 KB, image/png)
2022-03-07 06:07 UTC, Gregory G.
Details
EMF Test file (195.27 KB, image/x-emf)
2022-03-07 06:18 UTC, Gregory G.
Details
Reduced EMF file (13.19 KB, image/x-emf)
2022-03-22 17:17 UTC, Valek Filippov
Details
Minimal EMF image where the issue is reproducible (1.11 KB, image/emf)
2022-03-31 19:07 UTC, Bartosz
Details
Minimal EMF image opened in MS Paint (7.13 KB, image/png)
2022-03-31 19:08 UTC, Bartosz
Details
Minimal EMF image with removed EmfPlusSave and EmfPlusRestore is displayed correctly (1.08 KB, image/emf)
2022-03-31 19:25 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gregory G. 2022-03-07 05:57:57 UTC
Description:
An EMF file has been created on Windows with Office Visio.
When opening the file with LibreOffice Draw or LibreOffice Writer, the lines are not displayed.


Steps to Reproduce:
1. Open the file "Drawing.emf" with LibreOffice Draw
2. See the displayed picture

Actual Results:
The connecting lines are not displayed from the schematic

Expected Results:
We see the line displayed which connect all components of the schematic.


Reproducible: Always


User Profile Reset: No



Additional Info:
See the right and wrong results in the attached pictures
Comment 1 Gregory G. 2022-03-07 06:04:18 UTC
Created attachment 178689 [details]
Files showing the good and bad results

- file 1: Drawing.emf : Original EMF file 
- file 2: Drawing_issue_with_LibreOffice.png: Show the issue with LibreOffice Draw, the line are not displayed properly
- file 3: Drawing_ExpectedResult.png: Correct result with all lines diplayed
Comment 2 Gregory G. 2022-03-07 06:07:24 UTC
Created attachment 178690 [details]
Line drawing issue with LibreOffice (PNG picture file)
Comment 3 Gregory G. 2022-03-07 06:18:41 UTC
Created attachment 178691 [details]
EMF Test file
Comment 4 Bartosz 2022-03-22 15:07:40 UTC
To workaround the issue:
1. Open terminal
2. Set export EMF_PLUS_DISABLE=1 environment 
3. Run LibreOffice
Comment 5 Valek Filippov 2022-03-22 17:17:33 UTC
Created attachment 179045 [details]
Reduced EMF file

Bartosz, look at the 3rd GDIComment.
If you remove that, LO Draw shows missed lines.

I will try to remove some of the EMF+ records from that later.
Comment 6 Bartosz 2022-03-31 19:07:58 UTC
Created attachment 179241 [details]
Minimal EMF image where the issue is reproducible
Comment 7 Bartosz 2022-03-31 19:08:36 UTC
Created attachment 179242 [details]
Minimal EMF image opened in MS Paint
Comment 8 Bartosz 2022-03-31 19:25:31 UTC
Created attachment 179243 [details]
Minimal EMF image with removed EmfPlusSave and EmfPlusRestore is displayed correctly

After removing two instances of EmfPlusSave and EmfPlusRestore records, the image is displayed correctly
Comment 9 Commit Notification 2022-04-01 15:25:10 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#147818 EMF+ Fix restoring clipping states

It will be available in 7.4.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 10 Bartosz 2022-04-03 12:45:52 UTC
Please verify if the issue is resolved with LO Daily builds