Created attachment 172550 [details] Example file from Writer with the freeform line The attached example file contains a Writer freeform line shape that were found to be exported incorrectly to docx: the exported shape’s placement is different in .docx. Steps to reproduce: 1. Open attached example Writer file. 2. Save as .docx, reopen files Actual results: In docx, the shape’s vertical placement changed (downwards) and its horizontal placement also changed towards the left. Expected results: Docx shape should look like the original .odt shape. LibreOffice details: Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community Build ID: 91330c503b7eb91d777978018b66890af87cf8f5 CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: en-GB Calc: threaded
Created attachment 172551 [details] The original file saved by Writer to docx
Created attachment 172552 [details] Screenshot of the original and exported document side by side in Writer and Word
Please check the attachments. Either attachment 172551 [details] (one shape) is wrong or attachment 172552 [details] (two shapes). => NEEDINFO
The error is, that the position is rotated in lclMovePositionWithRotation() in sw/source/filter/ww8/docxsdrexport.cxx. Some objects report a rotation angle, but are not actually rotated, because rotation is incorporated in its members or points. They need to be excluded from position rotation. It would be fixed with https://gerrit.libreoffice.org/c/core/+/115668. I had already identified OBJ_GRUP and OBJ_LINE. I have now added OBJ_PATHLINE and OBJ_PATHFILL. I'm still waiting for review of that patch :(
I think, it is fixed now with commit 3262fc5ef3bde5b158909d11ccb008161ea95519. Please try with current master.
Created attachment 175067 [details] The example file in current Writer master Looks good after docx export in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 80a47aae1419842f4496f02028e2b49763aea25b CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win Locale: hu-HU (hu_HU); UI: en-US Calc: CL indeed after https://cgit.freedesktop.org/libreoffice/core/commit/?id=3262fc5ef3bde5b158909d11ccb008161ea95519 author Regina Henschel <rb.henschel@t-online.de> 2021-05-15 23:40:34 +0200 committer Miklos Vajna <vmiklos@collabora.com> 2021-06-28 09:49:00 +0200 commit 3262fc5ef3bde5b158909d11ccb008161ea95519 (patch) tdf#142304 a.o. Improve wrap margins in docx filters
Created attachment 175068 [details] Screenshot of the original and exported document side by side in Writer and Word For the record: Correct screenshot of the old bad state. See also bug 142605 and the attachments there; those also export correctly now.
All in all, thanks for fixing this Regina!
VERIFIED with Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 7cd5b35caa8d4fa9d0ba2b2c6ce4b88726ed2be6 CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (de_DE); UI: en-GB Calc: CL