Bug 157460 - FILEOPEN PPTX: Elbow connector adjustment value has wrong value
Summary: FILEOPEN PPTX: Elbow connector adjustment value has wrong value
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, implementationError
Depends on:
Blocks: PPTX-line-connector-import
  Show dependency treegraph
 
Reported: 2023-09-26 17:38 UTC by Regina Henschel
Modified: 2024-02-28 01:02 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Elbow connectors plus screenshot (25.97 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2023-09-26 17:38 UTC, Regina Henschel
Details
bentConnector3 (14.48 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2023-10-10 00:33 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-09-26 17:38:23 UTC
Created attachment 189833 [details]
Elbow connectors plus screenshot

The attached file has some elbow connectors between the circle and the triangle. Behind the drawing is a screenshot with black lines that show the routing in PowerPoint.

The green and blue connectors are OK. But the red connector is different than in PowerPoint.
Comment 1 m_a_riosv 2023-09-26 18:20:35 UTC
Reproducible
Version: 7.6.1.2 (X86_64) / LibreOffice Community
Build ID: f5defcebd022c5bc36bbb79be232cb6926d8f674
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 19e9fe7c8c89399753ac1730e1c76378b18418bc
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo

Modifying the line with LibreOffice and saving doesn't solve the issue. It reappears again.
Comment 2 Gabor Kelemen (allotropia) 2023-09-29 16:09:21 UTC
This was good in 7.3, seems to have started in 7.4 with:

https://git.libreoffice.org/core/+/cbf66ec3e60d07efb7c3cceed9b4f0fb4f0510c8

author	Tibor Nagy <nagy.tibor2@nisz.hu>	Thu Mar 10 08:42:12 2022 +0100
committer	László Németh <nemeth@numbertext.org>	Tue Mar 29 16:12:45 2022 +0200

tdf#89449 PPTX import: fix line connectors

Adding CC to: Tibor Nagy
Comment 3 Regina Henschel 2023-10-10 00:33:29 UTC
Created attachment 190100 [details]
bentConnector3

Open attached document and compare rendering with rendering in PowerPoint. The connector is a bentConnector3, which means that it has three straight line segments and one handle on the middle segment. The handle is set in PowerPoint so, that the vertical line segment is near to the right vertex of the triangle.

An analysis gives this reason:
The angle calculated in lcl_GetAngle(xStartSp, aStartPt) in slidepersist.cxx is 270, but should be 0 according definition in the preset shape. A calculation with the correct angle 0 would give the correct position of the handle.

Problematic are those cases where the glue point is not on the edge of the snap-rectangle of the shape, like here for the gluepoint on the hypotenuse. Then the angle even depends on whether the shape is stretched to portrait or landscape.

@Tibor: It would be possible to generate a fix map of preset name to connection angles for those cases where the preset has fixed angles like "cd4". But I have no idea, how to handle cases, where the angle is calculated. Do you have an idea how to get the leaving directions?