Bug 147818

Summary: [EMF/EMF+] FILEOPEN Schematic Lines are not displayed. Workaround: export EMF_PLUS_DISABLE=1
Product: LibreOffice Reporter: Gregory G. <skygregs>
Component: DrawAssignee: Bartosz <gang65>
Status: RESOLVED FIXED    
Severity: normal CC: gang65, skygregs
Priority: medium    
Version: 7.2.5.2 release   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard: target:7.4.0
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 55058, 103859    
Attachments: Files showing the good and bad results
Line drawing issue with LibreOffice (PNG picture file)
EMF Test file
Reduced EMF file
Minimal EMF image where the issue is reproducible
Minimal EMF image opened in MS Paint
Minimal EMF image with removed EmfPlusSave and EmfPlusRestore is displayed correctly

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