Bug 144392

Summary: Current point after "close path" command Z is the initial point of the closed path
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: DrawAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, xiscofauli
Priority: medium    
Version: 7.3.0.0 alpha0+   
Hardware: x86-64 (AMD64)   
OS: Windows (All)   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 123648    
Attachments: Command sequences Z L L and Z M L

Description Regina Henschel 2021-09-08 23:42:43 UTC
Created attachment 174910 [details]
Command sequences Z L L and Z M L

Open attached document. It has two custom shapes. The used enhanced-path is cited on the right side.

The "close path" command Z makes the "current point" not invalid, but sets it to the initial point of the closed path. And following commands uses this as "current point" as long as they do not set themselves a "current point".

In the examples the closed path is the triangle. Its initial point has the coordinates (0|0). Therefore in shape A there should be a line from point (0|0) to point (80|60) which is the parameter of the first L (lineto) command.
Shape B does not have such line, because the command M (moveto) sets a "current point".

I think, there should be no concerns to fix it. This bug-report is not about the path object and its svg:d attribute, where users have a UI to manipulate points. But it is about the enhanced-path attribute of custom-shapes. The reported situation does not exists in import or export with predefined shapes. It happens only, if someone creates own custom-shapes by editing the markup in file or using macros.

Current ODF 1.3 is not explicit about current point after Z. But SVG, from which the path commands were inspired, has this rule and ODF 1.4 will have it explicitly too.
Comment 1 Xisco FaulĂ­ 2021-09-29 15:43:09 UTC
Moving to NEW