Created attachment 157322 [details] Example file from Word Attached simple docx document contains a table and a shape in the bottom right anchored in the table. On saving the file and opening it in Word the shape moves to a centered position, horizontally at about the right side of the table. Writer reopens this file incorrectly too, with the shape positioned almost at the right paper side. Steps to reproduce: 1. Open attached document in Writer and save it as docx Actual results: The shape appears horizontally centered. The Layout dialog in Word indicates that that “Layout in table cell” checkbox is now checked, while in the original file it wasn’t. Unchecking it fixes the visual position in Word. Expected results: The shape should retain its position. LibreOffice details: Version: 6.5.0.0.alpha0+ (x64) Build ID: c7f3ac890526306804ec2bdf1256ba15a4247f13 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; Locale: en-US (hu_HU); UI-Language: en-US Calc: CL Export of the shape started to work in 4.2, and it is positioned the same in Word ever since.
Created attachment 157323 [details] The original file saved by Writer
Created attachment 157324 [details] Screenshot of the original and exported document side by side in Word
(In reply to NISZ LibreOffice Team from comment #0) > The shape appears horizontally centered. I can't see that in your attachments (or I don't understand it)
(In reply to Dieter Praas from comment #3) > (In reply to NISZ LibreOffice Team from comment #0) > > The shape appears horizontally centered. > > I can't see that in your attachments (or I don't understand it) It's the page numbering (or similar) "7" at the bottom of the page, highlighted with yellow on the screenshot.
I confirm it with Version: 6.5.0.0.alpha0+ (x64) Build ID: 350d25da375f221edfa37309324ce3c68cf297ef CPU threads: 4; OS: Windows 10.0 Build 18362; UI render: default; VCL: win; Locale: de-DE (de_DE); UI-Language: en-GB Calc: threaded
If I uncheck in Word the LayoutInCell option at the position anchor settings, the shape moves back to its original right place. So on export this option had to be handled. In Writer on import, the position of the shape is calculated from left instead of right what set in Word, and the calculation of this does not respect the layout in cell option, this might cause this difference (because this option only checks from left calculating instead of both.)
Bakos Attila committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/ad8857dab30e099a0cf6ec18d184a6c836b33317 tdf#130120 DOCX: export o:allowincell It will be available in 7.0.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.
Created attachment 158131 [details] ExportedFileFromWriter7AfterFix The attached file exported from the master with the patch, and seems correctly. Resolved fixed.
(In reply to NISZ LibreOffice Team from comment #0) > Writer reopens this file incorrectly too, with the shape positioned almost > at the right paper side. As far as I can see, this is still the case in Version: 7.0.0.0.alpha0+ (x64) Build ID: c63148ba139bd6b9ae7a0f9e24e51f29e5370963 CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; Locale: de-DE (de_DE); UI-Language: en-GB Calc: threaded
Created attachment 158666 [details] Result in LO 7.0.0.0.alpha0+ Is this the correct result?
Created attachment 158668 [details] TheSampleFileExportedWithWriter7 Hi, It work for me on: Version: 7.0.0.0.alpha0+ (x64) Build ID: 0d81a613ef5af22253e51d9917c5d5c94d764456 CPU threads: 8; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win; Locale: hu-HU (hu_HU); UI-Language: en-GB Calc: CL see this attachment. I will take a look later.
Perhaps I haven't used the correct document. It works with your documents from comment 8 and comment 11. Sorry for confusion. => VERIFIED FIXED