Bug 166672 - FILEOPEN: Incorrect connection lines
Summary: FILEOPEN: Incorrect connection lines
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: OOXML-Shapes PPTX-line-connector-import
  Show dependency treegraph
 
Reported: 2025-05-21 10:21 UTC by Xisco Faulí
Modified: 2025-05-21 21:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Comparison LibreOffice 25.8 vs MSO 2016 (59.04 KB, image/png)
2025-05-21 10:21 UTC, Xisco Faulí
Details
Document with draw:glue-point-leaving-directions (28.71 KB, application/vnd.oasis.opendocument.presentation)
2025-05-21 21:57 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2025-05-21 10:21:10 UTC
Created attachment 200895 [details]
Comparison LibreOffice 25.8 vs MSO 2016

Steps to reproduce:
1. Open attachment 198434 [details] from bug 164623

-> Connection lines are displayed incorrectly. See comparison

Reproduced in

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 5c74b979eac620dc1a435fcdf9e88488fd4217d9
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2025-05-21 10:22:12 UTC
Regression introduced by:

commit 74b312d6f255e3bb056dbb7fdf9158fb7b2aecad	[log]
author	Tibor Nagy <tibor.nagy.extern@allotropia.de>	Fri Jul 05 07:19:15 2024 +0200
committer	Nagy Tibor <tibor.nagy.extern@allotropia.de>	Fri Jul 05 11:34:30 2024 +0200
tree 68ec520cc352d2f6e56aec0efedc17d4640b215d
parent a14531e4135a82df53615254cac5e9ea0c357ef4 [diff]

Add escape direction support for glue points in the preset shapes

Bisected with: bibisect-linux64-25.2
Comment 2 Xisco Faulí 2025-05-21 15:12:01 UTC
Hi Tibor, Regina,
Could you please explain what the GluePointLeavingDirections are ? if I revert 74b312d6f255e3bb056dbb7fdf9158fb7b2aecad, I don't see any difference in the unittest's sample file: sd/qa/unit/data/pptx/glue_point_leaving_directions.pptx
Comment 3 Regina Henschel 2025-05-21 21:43:18 UTC
Problems are reported in bug 149440 and bug 149441.

The ODF attribute draw:glue-point-leaving-directions (19.173 ODF 1.3) corresponds to the 'ang' attribute of the <cxn> (Shape Connection Site) element in OOXMl (20.1.9.9 ISO/IEC 29500-1:2016). However, the ODF attribute is under specified. The specification misses which direction is used for 0°, whether positive angles go clockwise or counter-clockwise, and what units are allowed.

In MS Office binary formats it is 'pConnectionSitesDir'. Or look for 'Connector Angles' in 'Microsoft Office Drawing 97-2007 Binary Format Specification'. That document has a detailed description of the shapes. Our corresponding struct mso_CustomShapes misses a member for it.

The attribute draw:glue-point-leaving-directions is interpreted by MS Office and it writes it out, when it converts pptx to odp. But it seams it uses the angle different from what is specified as 'Connector Angle' in binary format.

The attribute draw:glue-point-leaving-directions allows an author (not the user!) of a custom shape to specify, that the connector has to connect to the gluepoint using the specified direction. It is similar to the attribute draw:escape-direction (19.147 ODF 1.3), that the user can set for user defined glue points. Only that draw:escape-direction does not allow arbitrary angles but only the keywords auto, down, horizontal, left, right, up, vertical.

The attribute is available in the API as GluePointLeavingDirections in service EnhancedCustomShapePath.
Comment 4 Regina Henschel 2025-05-21 21:57:13 UTC
Created attachment 200904 [details]
Document with draw:glue-point-leaving-directions

The document contains an example with user defined gluepoints and its exit direction and an example of custom shapes with draw:glue-point-leaving-directions.

You can play around with the values by directly editing the file format. Because of bug 149441 do not save the document by LibreOffice.

You can use the document to examine what PowerPoint renders. However, PowerPoint cannot use user defined gluepoints, but only gluepoints defined on custom shapes.