Bug 158178

Summary: FILESAVE ODP: Writes wrong start coordinates in svg:d attribute of a connector shape
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: stephane.guillou
Priority: medium Keywords: filter:odf
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 99649    
Attachments: Comparison of curved connector with Bézier curve

Description Regina Henschel 2023-11-11 18:26:44 UTC
Created attachment 190791 [details]
Comparison of curved connector with Bézier curve

The attached file has a connector between the two rectangles. This connector was copied and converted to a Bézier curve. Connector and Bézier curve should produce the same svg:viewBox and svg:d attributes in file markup (besides +- rounding differences). But you get for the connector:
    svg:d="M7000 7000c0-3001 8000-5501 8000 5000"
    svg:viewBox="0 0 8001 7609"
and for the Bézier curve:
    svg:viewBox="0 0 8000 7608"
    svg:d="M0 2608c0-3001 8000-5501 8000 5000"

The coordinates (0|2608] in the M command of the Bézier curve are correct, the coordinates (7000|7000) in the M command of the connector curve are wrong.

Currently it has no large consequences, because LibreOffice recreates the connector curve from the connection points ins svg:x1, svg:y1, svg:x2 and svg:y2. But it will become a problem, if we start to use the svg:d attribute to decide whether the curve form was created to be compatible with the OOXML definitions or follow the LO way.
Comment 1 Stéphane Guillou (stragu) 2023-11-28 08:21:31 UTC
Thanks Regina.
I can see the different svg:d values in the sample file for connector vs path.

In OOo 3.3, the coordinates would differ but the path would have a viewbox whereas the connector wouldn't:
Connector: svg:d="m8000 14000c0-2250 9500-750 9500-3000"
Path:      svg:d="m0     3000c0-2250 9500-750 9500-3000"
           svg:viewBox="0 0 9500 3000"