Description: If you save the shape line created from bottom to top in xlsx format, the shape line will change horizontally. This phenomenon occurs when the angle of the original line is 90 degrees. Steps to Reproduce: 1.Hold down the shift key and create a line from bottom to top with the shape line. 2.Save to xlsx. 3.Close the xlsx file. 4.Open the xlsx file. Actual Results: The vertical line has changed to a horizontal line. Expected Results: The shape line is displayed as a vertical line. Reproducible: Always User Profile Reset: No Additional Info: Version: 7.3.0.0.alpha0+ (x86) / LibreOffice Community Build ID: b89ebf135818ccaa45bbfb164099a6e199bd7d11 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win Locale: ja-JP (ja_JP); UI: en-US Calc: threaded
Created attachment 172981 [details] Original file (ods) Save this ods file as xlsx. You can check the phenomenon.
Created attachment 172985 [details] After I saved the original ods file in xlsx format.
I can reproduce the problem. The error is in XclObjAny::WriteFromTo() The left, green line has a rotation angle of -9000 and therefore skips the part "swap(width,height)". The right, red line has a rotation angle of 9000 and therefore performs the swap. The error is not only with exactly horizontal or vertical lines. It is necessary to check whether lines must generally be excluded from the "swap" part. This should be fixed together with bug 142881, because the same code part is affected.
Created attachment 174670 [details] Example file with line shapes rotated
Created attachment 174671 [details] The example file saved as xlsx The 45 degrees - 135 degrees range looks to be handled quite badly in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: d350a1364a1c34b96d00f2f716c44882b7b57fe9 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 Others only have some minor (but with each subsequent save aggregating!) change in the rotation value of about +0.05 degrees / save - but this is a separate issue.
Created attachment 174672 [details] The extended example on ODS and XLSX format in Calc In ascending order the problematic value range (rounded to whole numbers): 45 degrees becomes 45 46 degrees becomes 44 50 degrees becomes 40 60 degrees becomes 30 70 degrees becomes 20 80 degrees becomes 10 89 degrees becomes 1 90 degrees becomes 0 91 degrees becomes 179 100 degrees becomes 170 110 degrees becomes 160 120 degrees becomes 150 134 degrees becomes 136 135 degrees becomes 135
This started in 7.1 with: https://cgit.freedesktop.org/libreoffice/core/commit/?id=5e8875780d665b7ae0fee1a053b5ce78ec513f69 author Szabolcs Toth <szabolcs450@gmail.com> 2020-08-17 10:55:43 +0200 committer László Németh <nemeth@numbertext.org> 2020-08-24 18:28:51 +0200 tdf#135828 XLSX shape export: fix distortion of rotated shapes
This is fixed with https://git.libreoffice.org/core/commit/84d6d704682a4d0e037a28895356b073e4f992a5 from bug 144242.
Verified in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: c2de581d1943df2d84f2b71817b6a8bee41f0217 CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded