Created attachment 174692 [details] Example file from Calc for further modification This is a followup to bug 142914 When line objects are created and set to a rotation value between 225 degrees and 315 and saved to XLSX they are incorrectly mirrored. If the same line objects are saved to ODS, reloaded and then saved as XLSX then the rotation is fine. Steps to reproduce: 1. Open the attached file, it contains some line objects 2. Make copies of the objects and set a rotation value for them between 225 degrees and 315 degrees. On the screenshot I set 224, 225, 226 for blue lines, 269, 270, 271 for green lines and 314, 315, 316 for orange lines. 3. Save as ODS, then XLSX, reload to see the problem 4. Open the ODS version, save as XLSX, to see it work correctly. Actual results: 224 and 225 degrees becomes 224 and 225 (good) 226 degrees becomes 224 269 degrees becomes 181 270 degrees becomes 0 271 degrees becomes 359 314 degrees becomes 316 315 and 316 degrees becomes 315 and 316 (good) Expected results: Rotation values retained unchanged. LibreOffice details: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: d5ade739771ddf06cc7ee6d4af15672bfcf09ed6 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 Also in Version: 7.1.0.3 (x64) / LibreOffice Community Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: threaded Not yet in Version: 7.0.0.3 (x64) Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e CPU szálak: 4; OS: Windows 10.0 Build 18363; Felületmegjelenítés: alapértelmezett; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded Additional Information: Bibisected using bibisect-win64-7.1 to: URL:https://cgit.freedesktop.org/libreoffice/core/commit/?id=5e8875780d665b7ae0fee1a053b5ce78ec513f69 author: Szabolcs Toth szabolcs450@gmail.com committer: László Németh <nemeth@numbertext.org> tdf#135828 XLSX shape export: fix distortion of rotated shapes
Created attachment 174693 [details] The modified example file for reference Recreate the rotations in this one from the previous one to see the problem after XLSX save-reload.
Created attachment 174694 [details] The original example file after modification saved as XLSX
Created attachment 174695 [details] Screenshot of the modified document in Calc before saving
Created attachment 174696 [details] Screenshot of the modified document in Calc after saving as XLSX and reloading
A newly inserted line has a positive rotate angle, e.g. 30000. The same line after save and reload has a negative rotate angle, e.g. -6000.
Proposed patch is in https://gerrit.libreoffice.org/c/core/+/121661 The problem exists not only with lines but with all open path objects. A Bezier curve is wrong not only by immediately export after inserting, but also when exporting from the reopened document, for example. The patch contains a unit test with SID_DRAW_LINE. I would need the identical test for SID_DRAW_BEZIER_NOFILL. Do you have an idea how I could write that more clever than making a copy?
Regina Henschel committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/84d6d704682a4d0e037a28895356b073e4f992a5 tdf#144242 no width-height swap for line and pathline It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Regina Henschel committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/7ed532a2cbce52cd20b0801116d35ce713365f76 tdf#144242 no width-height swap for line and pathline It will be available in 7.2.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
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