Bug Hunting Session
Bug 117015 - "EMF+ Only" mode is not displaying object after GetDC record
Summary: "EMF+ Only" mode is not displaying object after GetDC record
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.0.6.3 release
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:6.1.0 target:6.0.5
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-14 23:47 UTC by Bartosz
Modified: 2018-04-19 11:22 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Sample EMF+ file with dual mode, where the issue occur (18.64 KB, image/x-emf)
2018-04-14 23:48 UTC, Bartosz
Details
Sample EMF+ file with dual mode in XnView - all elements are displayed (5.26 KB, image/png)
2018-04-14 23:52 UTC, Bartosz
Details
Sample EMF+ file with dual mode in Libreoffice - some arrows and boxes are not displayed (12.77 KB, image/png)
2018-04-14 23:54 UTC, Bartosz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bartosz 2018-04-14 23:47:52 UTC
Description:
EMF+ with dual mode are not displayed correctly.

Metafiles identified as EMF+ Dual can also contain both EMF+ records and EMF records. The EMF+ Dual flag indicates that the metafile contains a complete set of EMF records sufficient to correctly render the entire drawing on a system that cannot playback EMF+ records. This feature makes it possible to render an image with different levels of graphics support in the operating system. However, only one or the other type of records is processed. All records are enumerated sequentially. For EMF playback, the metafile player only uses EMF records and ignores EMF+ records. For EMF+ playback, the metafile is played as if it is EMF+ Only.

Steps to Reproduce:
1. Open attached file
2.
3.

Actual Results:  
Not all elements are displayed. SOme of them are not visible at all

Expected Results:
All elements from EMF+ file in dual mode, are displayed correctly


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/65.0.3325.181 Chrome/65.0.3325.181 Safari/537.36
Comment 1 Bartosz 2018-04-14 23:48:44 UTC
Created attachment 141361 [details]
Sample EMF+ file with dual mode, where the issue occur
Comment 2 Bartosz 2018-04-14 23:52:42 UTC
Created attachment 141362 [details]
Sample EMF+ file with dual mode in XnView - all elements are displayed
Comment 3 Bartosz 2018-04-14 23:54:02 UTC
Created attachment 141363 [details]
Sample EMF+ file with dual mode in Libreoffice - some arrows and boxes are not displayed
Comment 4 Commit Notification 2018-04-17 21:40:50 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117015 EMF+ Fix for displaying EMF+ files where GetDC is used

It will be available in 6.1.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 5 Commit Notification 2018-04-19 11:22:40 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=674e8c5412e938191ad3e928e9a52b5420bec85c&h=libreoffice-6-0

tdf#53485 tdf#117015 EMF+ Fix for displaying EMF+ files where GetDC is used

It will be available in 6.0.5.

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.