Bug 158178 - FILESAVE ODP: Writes wrong start coordinates in svg:d attribute of a connector shape
Summary: FILESAVE ODP: Writes wrong start coordinates in svg:d attribute of a connecto...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:odf
Depends on:
Blocks: Connectors
  Show dependency treegraph
 
Reported: 2023-11-11 18:26 UTC by Regina Henschel
Modified: 2023-11-28 08:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Comparison of curved connector with Bézier curve (13.83 KB, application/vnd.oasis.opendocument.presentation)
2023-11-11 18:26 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-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"