Bug 142004 - [EMF] SelectClipPath support
Summary: [EMF] SelectClipPath support
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Bartosz
URL:
Whiteboard: target:7.2.0 target:7.1.4
Keywords:
Depends on:
Blocks: EMF-WMF
  Show dependency treegraph
 
Reported: 2021-04-30 23:47 UTC by Valek Filippov
Modified: 2021-05-21 09:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
EMF sample with elliptical clip path and rectanlge (308 bytes, image/emf)
2021-04-30 23:47 UTC, Valek Filippov
Details
Screenshot for the attached sample opened in MSO (14.96 KB, image/png)
2021-04-30 23:48 UTC, Valek Filippov
Details
EMF sample with ellipse as part of the path w/o any Stroke or Fill (272 bytes, image/emf)
2021-05-01 00:02 UTC, Valek Filippov
Details
Ellipse in LO (6.96 KB, image/png)
2021-05-03 13:54 UTC, Roman Kuznetsov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Valek Filippov 2021-04-30 23:47:02 UTC
Description:
LO ignores SelectClipPath and draws the path instead.

Steps to Reproduce:
Open attached EMF sample.

Actual Results:
LO draws rectangle on top of the ellipse.

Expected Results:
To draw part of the rectangle that overlaps with the ellipse.


Reproducible: Always


User Profile Reset: No



Additional Info:
Other samples available on request.
Comment 1 Valek Filippov 2021-04-30 23:47:44 UTC
Created attachment 171544 [details]
EMF sample with elliptical clip path and rectanlge
Comment 2 Valek Filippov 2021-04-30 23:48:23 UTC
Created attachment 171545 [details]
Screenshot for the attached sample opened in MSO
Comment 3 Valek Filippov 2021-05-01 00:02:25 UTC
Created attachment 171546 [details]
EMF sample with ellipse as part of the path w/o any Stroke or Fill

The first sample probably contains at least two problems.
LO should not do any drawing with a path if there is no Stroke, Fill or StrokeAndFill command.

Simplified sample is just an ellipse inside the path brackets.
MSO shows it empty.
Comment 4 Julien Nabet 2021-05-01 09:57:52 UTC
Bartosz: I noticed you had contributed to EMF part, thought you might be interested in this one. Could you confirm? If yes, there are some others which may interest you.
Comment 5 Roman Kuznetsov 2021-05-03 13:54:24 UTC
Created attachment 171609 [details]
Ellipse in LO

I see an ellipse in LO (look at attach from me)
Comment 6 Roman Kuznetsov 2021-05-03 13:55:18 UTC
(In reply to Roman Kuznetsov from comment #5)
> Created attachment 171609 [details]
> Ellipse in LO
> 
> I see an ellipse in LO (look at attach from me)

Forgot:

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: a52590d76b89dc75be2aa87f4287624c89f1e82f
CPU threads: 4; OS: Mac OS X 11.3; UI render: default; VCL: osx
Locale: ru-RU (ru_RU.UTF-8); UI: en-US
Calc: threaded
Comment 7 Valek Filippov 2021-05-03 15:06:06 UTC
(In reply to Roman Kuznetsov from comment #5)
> I see an ellipse in LO (look at attach from me)

In this file ellipse is inside of BeginPath/EndPath brackets. there is no StrokePath, FillPath or StrokeAndFillPath EMR in the file --> ellipse should not be drawn.
There is a SelectClipPath EMR after the EndPath.
The result should look like a rectangle clipped by this elliptical area.
Comment 8 Bartosz 2021-05-04 07:14:58 UTC
Confirmed issue on master
Comment 9 Commit Notification 2021-05-06 10:13:23 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/761fdaf26dc9ed7cd0d25a7630576e7800813e2f

tdf#142004 tdf#141982 EMF Import: Add rotation and path support for EMR_ELLIPSE

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 10 Commit Notification 2021-05-06 16:04:39 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

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

tdf#142004 tdf#141982 EMF Import: Add rotation and path support for EMR_ELLIPSE

It will be available in 7.1.4.

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.