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: 2025-11-30 01:30 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"
Comment 2 QA Administrators 2025-11-28 03:40:59 UTC Comment hidden (obsolete)
Comment 3 Regina Henschel 2025-11-28 13:49:53 UTC
The error still exists in Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
Comment 4 Volodymyr 2025-11-29 23:04:53 UTC
I checked the issue on Windows 11 Pro using LibreOffice  Version 26.2.0.0.alpha1+ beta (X86_64)

Connector (ConnectorShape) starts at M 8000,7125.

After converting to a curve (OpenBezierShape), start point is M 8000,5250.

These coordinates make sense: the connector connects shapes, the curve is a converted copy, so their start points differ.

Extra points appearing after conversion are normal Bézier handles—expected behavior, not a bug.

viewBox dimensions match, any tiny differences are just rounding.

Bottom line: The bug is not reproduced. Conversion to curve works as intended.
Comment 5 Regina Henschel 2025-11-30 01:30:47 UTC
(In reply to Volodymyr from comment #4)
> I checked the issue on Windows 11 Pro using LibreOffice  Version
> 26.2.0.0.alpha1+ beta (X86_64)
> 
> Connector (ConnectorShape) starts at M 8000,7125.
> 
> After converting to a curve (OpenBezierShape), start point is M 8000,5250.
> 
> These coordinates make sense: the connector connects shapes, the curve is a
> converted copy, so their start points differ.

I disagree. The svg:d path in the connector is provided for those consumers, that are not capable of computing a connector path. Thus this attribute needs to describe the path so as if it is a Bezier curve.