Bug 142139

Summary: [EMF] Pen width is ignored for RoundRect
Product: LibreOffice Reporter: Valek Filippov <frob>
Component: graphics stackAssignee: Bartosz <gang65>
Status: VERIFIED FIXED    
Severity: normal CC: gang65, xiscofauli
Priority: medium    
Version: 4.1 all versions   
Hardware: All   
OS: All   
Whiteboard: target:7.2.0 target:7.1.4
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103859    
Attachments: EMF sample with rect and roundrect drawn with the same 'pen'
Screenshot of the sample EMF file opened in MS Paint
WMF sample of rect and roundrect
Screenshot of the sample WMF file opened in MS Paint
How it looks in LibreOffice 7.2 master
EMF sample with enlarged rect/roundrect
Comparison LibreOffice 7.1 (KO), LibreOffice 7.2 master (OK) and MSO 2010

Description Valek Filippov 2021-05-07 03:16:10 UTC
Description:
LO ignores width of the CreatePen MR when it renders roundrect.

Steps to Reproduce:
Open attached EMF sample.

Actual Results:
Rectangle is rendered with "thick" stroke and RoundRect is rendered with thin stroke.

Expected Results:
Both shapes should use the same stroke style.


Reproducible: Always


User Profile Reset: No



Additional Info:
This also happens in WMF.
Comment 1 Valek Filippov 2021-05-07 03:17:01 UTC
Created attachment 171724 [details]
EMF sample with rect and roundrect drawn with the same 'pen'
Comment 2 Valek Filippov 2021-05-07 03:18:37 UTC
Created attachment 171725 [details]
Screenshot of the sample EMF file opened in MS Paint
Comment 3 Valek Filippov 2021-05-07 03:19:15 UTC
Created attachment 171726 [details]
WMF sample of rect and roundrect
Comment 4 Valek Filippov 2021-05-07 03:20:35 UTC
Created attachment 171727 [details]
Screenshot of the sample WMF file opened in MS Paint
Comment 5 Xisco Faulí 2021-05-11 08:01:15 UTC
Created attachment 171865 [details]
How it looks in LibreOffice 7.2 master
Comment 6 Xisco Faulí 2021-05-11 08:02:17 UTC
Reproduced in

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: d4f116d9576453f5974eb63db37a33c59ac53bc9
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

Version: 5.2.0.0.alpha1+
Build ID: 5b168b3fa568e48e795234dc5fa454bf24c9805e
CPU Threads: 4; OS Version: Linux 4.8; UI Render: default; 
Locale: ca-ES (ca_ES.UTF-8)

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 7 Valek Filippov 2021-05-11 15:13:03 UTC
Created attachment 171882 [details]
EMF sample with enlarged rect/roundrect

As per Bartosz reqest
Comment 8 Commit Notification 2021-05-11 16:38:41 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#141982 tdf#142139 Add rotation and line width support to ROUNDRECT

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 9 Commit Notification 2021-05-11 20:36:02 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/2a416c0c4a1635af8be5b1167fd1f06bdc4a2466

tdf#141982 tdf#142139 Add rotation and line width support to ROUNDRECT

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.
Comment 10 Commit Notification 2021-05-12 18:33:13 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "master":

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

tdf#112603 tdf#142014 tdf#142139 WMF/EMF Fix line width

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 11 Commit Notification 2021-05-12 20:25:27 UTC
Bartosz Kosiorek committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/3ffc0afce0f26900a4e1d9feed2c21108e1ed41b

tdf#112603 tdf#142014 tdf#142139 WMF/EMF Fix line width

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.
Comment 12 Xisco Faulí 2021-05-17 15:24:25 UTC
Created attachment 172094 [details]
Comparison LibreOffice 7.1 (KO), LibreOffice 7.2 master (OK) and  MSO 2010
Comment 13 Xisco Faulí 2021-05-17 15:24:40 UTC
Verified in

Version: 7.2.0.0.alpha1+ / LibreOffice Community
Build ID: c781776f3c79bbe3175b1452d26c79ebb931a500
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Bartosz, thanks for fixing this issue. Should it be closed as RESOLVED FIXED ?