Bug 157215

Summary: FILEOPEN PPTX: glue point escape directions are ignored for object specific glue points
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: ImpressAssignee: Tibor Nagy <tibor.nagy.extern>
Status: ASSIGNED ---    
Severity: enhancement CC: buzea.bogdan
Priority: medium    
Version: 24.2.0.0 alpha0+   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108742    
Attachments: gluepoints with escape directions

Description Regina Henschel 2023-09-12 20:38:15 UTC
Created attachment 189531 [details]
gluepoints with escape directions

The attached file contains the shape "flowChartConnector". It defines leaving directions for its glue points. I have used the custGeom from the preset definition to be sure, that the error is not in the import of preset shapes.

A glue point in OOXML is defined in a <cxn> element. It has an "ang" attribute for the leaving direction and a "pos" element for the location of the glue point. These are read in ConnectionSiteContext. But when the read values are transferred to properties only "pos" is evaluated and "ang" is ignored. That happens in CustomShapeProperties::pushToPropSet().

I see no reason to ignore the "ang" attribute. We have the property css.drawing.EscapeDirection. That cannot hold arbitrary angles, but the actual angles used in the OOXML preset shapes can be represented by LEFT, UP, RIGHT and DOWN. ODF has the attribute draw:glue-point-leaving-directions for this.

We have already glue point leaving directions for user-defined glue points. So implementing a correct rendering should not be too hard.

The result of ignoring the "ang" attribute is, that the drawings in PowerPoint and LibreOffice look different when connectors together with such shapes are used.

You can see the escape directions in PowerPoint when you use the "elbow" or "curved" connector there. In LibreOffice those are the "Standard" and "Curved" connectors.