Created attachment 171673 [details] Document with horizontal and vertical line If a line is horizontal or vertical in pptx, they are not horizontal or vertical after opening the file in Impress. The angles are slightly off. You get 359.99deg for a horizontal line and 270.01deg for a vertical line for example. Besides looking at the rotation angle in the Position&Size dialog, you will notice the error in the status bar, if the line is selected. The shown text should include "horizontal" or "vertical", but it doesn't. This slight deviation cancels out the horizontal/vertical detection, which is used in several places in the code. The error is likely in the part https://opengrok.libreoffice.org/xref/core/oox/source/drawingml/shape.cxx?r=2a70cfb0#844 The handling of lines there is questionable: * A line has exactly two points and one polygon. No need for a loop. * The 'Guard against zero width or height' is wrong. A vertical line has zero width and a horizontal line has zero height. The current solution prevents vertical and horizontal lines. Even height and width zero at the time is possible. Such zero length lines are visible, if line caps are set. * What is the purpose of 'xModelInfo' there? But I have not tested yet, whether a fix there would solve the problem.
The current code is a workaround, see bug 122717. It cannot be simple removed. Prior the underlying problem in Writer has to be fixed. Any try needs to consider the sample files from bug 127364, bug 141120 and bug 141239.
Created attachment 171947 [details] The example file in PP and current nightly Confirming with Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community Build ID: dbd4110cc36011042c98549d997daa79e8065aba CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL
Created attachment 180316 [details] The example file in recent 7.4 master This seems to have changed in: 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 Now both lines appear in the Position&Size dialog/sidebar as having exactly 0 degrees rotation. This matches what my PP 2016 shows.
Thanks Tibor for fixing this as well!
Verified in: Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community Build ID: e4066a41406b1ddd454901b4fa718cf9be2746c4 CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL