Bug 157956 - Modernize the "Flowchart Alternate Process" shape to use circular corner rounding in all sizes
Summary: Modernize the "Flowchart Alternate Process" shape to use circular corner roun...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Khushi Gautam
URL:
Whiteboard: target:24.2.0
Keywords: easyHack
Depends on:
Blocks: Shapes-Custom
  Show dependency treegraph
 
Reported: 2023-10-27 20:52 UTC by Regina Henschel
Modified: 2023-11-14 21:51 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Flowchart Alternate Process as shape form LO compared to OOXML (14.34 KB, application/vnd.oasis.opendocument.presentation)
2023-10-27 20:52 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2023-10-27 20:52:43 UTC
Created attachment 190461 [details]
Flowchart Alternate Process as shape form LO compared to OOXML

This is a spin off to bug #77125. The "Flowchart Alternate Process" shape has the same problem with its corner rounding as the "Rounded Rectangular Callout" shape, but it is much easier to fix.

Insert a "Flowchart Alternate Process" shape. Drag it wider, so that it is not square. Notice, that the corner quarter circles are no longer circles but become ellipses.

This was the behavior in ancient MS Office 97. But already in the description of the binary format 2007, the shape is described with "limo-stretch", which means, that the quarter circles remain circles when the shape is not square. [1] Appendix A, page 102

The similar shape in OOXML also keeps the corner circles as circles.

In addition, the radius of the corner rounding is too small compared with MS Office. LibreOffice uses 2540/21600 of width or height. But MS Office specifies for its binary format 2700/21600 and the corresponding shape defined in OOXML presetShapeDefinitions.xml [2] has 1/6 = 3600/21600.

The attached file has a comparison of the shape in LibreOffice (red) with the OOXML shape from MS Office (green). On the third slide, I have converted the shapes to polygons, so that you can see the last point of the curve in Edit Point mode.

The values to be changed are in msoFlowChartAlternateProcess in [3].

[1]
https://download.microsoft.com/download/0/b/e/0be8bdd7-e5e8-422a-abfd-4342ed7ad886/officedrawing97-2007binaryformatspecification.pdf
[2]
https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/customshapes/presetShapeDefinitions.xml
[3]
https://opengrok.libreoffice.org/xref/core/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx
Comment 1 Commit Notification 2023-11-02 06:54:50 UTC
khushishikhu committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/48dffbd86ea2893c589e816bce2e974edb2cf344

tdf#157956 convert ellipses to quarter rounded circle

It will be available in 24.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 2 Stéphane Guillou (stragu) 2023-11-11 06:57:07 UTC
Kushi, I've assigned this bug report to you.
Do you have more to submit on it? If not, you can mark it as "fixed".

I tested the example ODP in a recent trunk build and it matchs much better, although you can still see a slight difference in overlap.
Maybe Regina can comment, but from what I see on gerrit, she is happy with the result.

Thank you both!
Comment 3 Khushi Gautam 2023-11-11 18:05:59 UTC
No Stephane, For this part "Flowchart Alternate Process" that was it from my side. I will mark it as "Fixed".

However, I am still working on it's upper version, the issue which persists the same problem of corner rounding with the shape "Rounded Rectangular Callout", might open a Patch soon.

Thanks!!
Comment 4 Stéphane Guillou (stragu) 2023-11-14 21:51:55 UTC
Verified in:

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 79f92d09ec52f0777fc03ff1d057a11b45e73f6d
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you!