Bug 37281 - emf file display yellow square instead of yelow circle
Summary: emf file display yellow square instead of yelow circle
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Bartosz
URL:
Whiteboard: target:7.2.0 target:7.1.3
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2011-05-17 04:25 UTC by sasha.libreoffice
Modified: 2021-10-18 18:51 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
this picture contains yelow circle in middle, LO paints yelow square (133.95 KB, image/x-wmf)
2011-05-17 04:26 UTC, sasha.libreoffice
Details
Screenshots, see Comment 1 (326.97 KB, application/pdf)
2011-05-17 09:02 UTC, Rainer Bielefeld Retired
Details
Reduced version (5.64 KB, image/x-emf)
2012-04-15 07:20 UTC, Valek Filippov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2011-05-17 04:25:22 UTC
in attachment is wmf file, that I found in one of presentations. This picture contains yelow circle in middle. but libreOffice (and OpenOffice too) renders square instead of circle. to reproduce problem just drag-and-drop this file into LibreOffice.
produced on LibreOffice 3.4 beta 5 on Mandriva 64 bit and Windows 32 bit
Comment 1 sasha.libreoffice 2011-05-17 04:26:57 UTC
Created attachment 46800 [details]
this picture contains yelow circle in middle, LO paints yelow square
Comment 2 Rainer Bielefeld Retired 2011-05-17 09:02:33 UTC
Created attachment 46819 [details]
Screenshots, see Comment 1

[Reproducible] with "LibreOffice 3.4Beta5  – WIN7  Home Premium  (64bit) German UI [DEV300m103 (Build:5)]", also OOo 1.1.4, 3.1.1, 3.4-dev.
Comment 3 Björn Michaelsen 2011-12-23 12:05:59 UTC Comment hidden (obsolete)
Comment 4 sasha.libreoffice 2011-12-25 07:31:13 UTC
reproducible in LibO 3.5.0 beta 1
Comment 5 Valek Filippov 2012-04-15 07:20:50 UTC
Created attachment 60016 [details]
Reduced version

File extension "wmf" is misleading. Actually it's an EMF file.
I've attached reduced version.
Suspicious part is records 25 to 33 (BeginPath to SelectClipPath).
If I remove them "yellow rectangle" disappears.

Probably LO not only keep ClipPath as a clipping path but also adds stroke/fill it with next figure.
Comment 6 Julien Nabet 2014-09-02 20:23:00 UTC
Valek: trying reduced version on pc Debian x86-64 with master sources updated today, I got this on console:
warn:vcl.emf:17571:1:vcl/source/filter/wmf/enhwmf.cxx:1708: EMF		EMF Header object records number of bytes as 137168, however the file size is actually 5776 bytes. Possible file corruption?

(screen shows just the 4 yellow borders of a square which includes a violet circle)
Does it shed some lights?
Comment 7 QA Administrators 2015-09-04 02:49:19 UTC Comment hidden (obsolete)
Comment 8 Tobias Heilig 2015-09-15 07:47:47 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2016-09-20 10:32:32 UTC Comment hidden (obsolete)
Comment 10 Tobias Burnus 2016-09-20 13:28:05 UTC
Still occurs with LO 5.2.1.2 on Windows 7.
Comment 11 Telesto 2018-02-15 17:29:59 UTC Comment hidden (obsolete)
Comment 12 Telesto 2019-01-10 19:19:13 UTC
Repro
Version: 6.3.0.0.alpha0+
Build ID: 6e5c4001c7b5cab2b2cc6419072acbe5fa7cb04a
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL
Comment 13 Commit Notification 2021-04-03 13:31:48 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#37281 tdf#45820 tdf#48916 tdf#55058 EMF Implement complex clipping

It will be available in 7.2.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 14 Commit Notification 2021-04-06 12:05:28 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/8deb9b3d2f8781628db73d3b2a3c7939ea4fcc2d

tdf#37281 tdf#45820 tdf#48916 tdf#55058 EMF Implement complex clipping

It will be available in 7.1.3.

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 15 Timur 2021-04-07 10:29:06 UTC
Very nice.
Comment 16 Chris Sherlock 2021-10-18 18:51:26 UTC
I'm late to the party, but excellent work Bartosz!