Bug 103474 - FORMATTING: bracket shape not shown correctly
Summary: FORMATTING: bracket shape not shown correctly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: All All
: medium normal
Assignee: Regina Henschel
URL:
Whiteboard: interoperability target:7.1.0 target:...
Keywords: bibisected, filter:pptx, regression
: 133475 (view as bug list)
Depends on:
Blocks: OOXML-Shapes PPTX
  Show dependency treegraph
 
Reported: 2016-10-24 17:56 UTC by internationils
Modified: 2020-07-06 13:16 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
PPTX2010 file (62.80 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-10-24 17:56 UTC, internationils
Details
PPTX2010 correct element (18.54 KB, image/png)
2016-10-24 17:56 UTC, internationils
Details
LO5 bad element rendering (10.04 KB, image/png)
2016-10-24 17:57 UTC, internationils
Details
Another sample (29.04 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2017-08-24 00:13 UTC, Aron Budea
Details
Bracket build with command T (12.53 KB, application/vnd.oasis.opendocument.presentation)
2020-06-07 19:32 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description internationils 2016-10-24 17:56:31 UTC
Created attachment 128214 [details]
PPTX2010 file

A bracket is not correct. It seems to be transformed into a line from the top-left corner to the bottom-right corner.
Comment 1 internationils 2016-10-24 17:56:54 UTC
Created attachment 128215 [details]
PPTX2010 correct element
Comment 2 internationils 2016-10-24 17:57:19 UTC
Created attachment 128216 [details]
LO5 bad element rendering
Comment 3 Yousuf Philips (jay) (retired) 2016-10-24 18:23:51 UTC
Confirmed.

Regression as it works correctly in 3.4.6.

Version: 5.3.0.0.alpha1+
Build ID: 928776b734c6aa188151bbce048d5bef4486dce7
CPU Threads: 2; OS Version: Linux 3.19; UI Render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-10-23_00:39:08
Locale: en-US (en_US.UTF-8); Calc: group
Comment 4 internationils 2016-11-29 16:24:37 UTC
Added a block on Impress-Images ... feel free to remove (or assign to other meta bugs) if brackets are not considered images.
Comment 5 Yousuf Philips (jay) (retired) 2017-05-02 23:44:24 UTC
(In reply to internationils from comment #4)
> Added a block on Impress-Images ... feel free to remove (or assign to other
> meta bugs) if brackets are not considered images.

Yes not images.

@Xisco, @Aron: Got time for a bibisect?
Comment 7 Aron Budea 2017-08-24 00:13:56 UTC
Created attachment 135756 [details]
Another sample

It seems the extreme curve setting is what isn't handled correctly. See attached sample with two brackets and nothing else, the rounded bracket displays fine, while the rectangular bracket doesn't.

Looks like the regession is from one of the commits by Radek Doulik in the bibisected range.
The relevant code is probably here (leftBracker / rightBracket):
https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/customshapes/presetShapeDefinitions.xml
Comment 8 QA Administrators 2018-10-22 02:48:42 UTC Comment hidden (obsolete)
Comment 9 internationils 2018-10-22 06:23:16 UTC
Hello, nothings changed, still present.

Version: 6.0.6.2
Build ID: 1:6.0.6-0ubuntu0.18.04.1
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 10 internationils 2018-10-22 06:25:40 UTC
Since this is a regression (see the analysis from Aron above) and the relevant code has been identified, can someone please look at this?
Issues like this are preventing LO from being used as a drop-in presentation tool for PPT files, and this is not helping adoption / migration from the MS Suite...
Comment 11 Regina Henschel 2020-06-05 22:50:16 UTC
The error is in case ARCANGLETO in EnhancedCustomShape2d::CreateSubPath in svx\source\customshapes\EnhancedCustomShape2d.cxx

The bracket consists of a quarter ellipse, a straight line and another quarter ellipse. In case the handle is dragged to its top most position, the ellipse has a height of zero. In this case a straight line should be used for the degenerated quarter ellipse. But the current implementation generates no point at all, so that only the middle segment is drawn.

I have not yet investigate, whether it is better to add a special case handling here and still use the methods from /tools/, or change it completely to use basegfx methods similar to ANGLEELLIPSE.
Comment 12 Regina Henschel 2020-06-07 19:32:19 UTC
Created attachment 161744 [details]
Bracket build with command T

Using command T instead of command G has a similar error.
When the circle angle is calculated from the ellipse angle, the angle is wrong in case of height=0 and angle=180°, if using atan2. This corner case has to be caught beforehand.
Comment 13 Commit Notification 2020-06-08 11:37:33 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/91f06123298bb8870cd6fa4e19d3aea9909f8e5b

tdf#103474 handle quarter angles before using atan2

It will be available in 7.1.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 Regina Henschel 2020-06-08 11:41:34 UTC
The commit solves the problem for the command T. It does not solve the problem for command G, but it is a needed step.
Comment 15 Commit Notification 2020-06-10 19:53:38 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

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

tdf#103474 handle quarter angles before using atan2

It will be available in 7.0.0.1.

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 16 Commit Notification 2020-06-14 14:08:21 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6de8d3109dffa7d4d0cc06f319cca70134f0a8f3

tdf#103474 handle edge cases in ARCANGLETO

It will be available in 7.1.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 17 Regina Henschel 2020-06-14 15:01:18 UTC
Should be OK with this fix now.
Comment 18 Xisco Faulí 2020-06-16 11:03:14 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: 11d21b3c1f7754b5d13ae9ea88da562ec74366ff
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Regina, thanks for fixing this issue!!
Comment 19 Commit Notification 2020-06-16 11:16:10 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/6eaa80f5c40619d8d27c1e5dc180bd2289bd3559

tdf#103474 handle edge cases in ARCANGLETO

It will be available in 7.0.0.1.

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 20 NISZ LibreOffice Team 2020-07-06 13:16:45 UTC
*** Bug 133475 has been marked as a duplicate of this bug. ***