Created attachment 168009 [details] Example file from Word Attached file contains some loremipsum text and shapes that have empty paragraphs wrapping around them. Their horizontal positioning is the default that Word 13 gives them: to column. Another shape next to them is anchored to such wrapping empty paragraphs, while a third one is anchored to the same paragraph as the first shape. This is repeated in one column setting and both column of a two column section. When opened in Writer the shape anchored to a wrapping paragraph is incorrectly positioned: horizontally it is shifted by the width of the first shape that is wrapped by its anchoring paragraph. The first shape and the shape anchored to the same paragraph as the first one is correctly positioned horizontally. Writer shows the horizontal positioning of all these shapes as to “Paragraph area” but to have the same layout as Word has, the horizontal positioning should be to “Left paragraph border”. (Which may be to “Right paragraph border” in case of RTL documents...) Of course thought must be given to DOCX save interoperability: manually changing the horizontal alignment creates the desired layout, but there is no similar option in DOCX, so the changed layout does not survive saving. Maybe just the layout should be a bit more clever. Steps to reproduce: 1. Open attached document 2. Observe the position of the shapes Actual results: The orange and green shapes are more to the right below the purple ones. Expected results: Layout as in Word. LibreOffice details: Version: 7.2.0.0.alpha0+ (x64) Build ID: 796c7f612603490dda9277ced0f6ab3cce3bc116 CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win Locale: en-US (hu_HU); UI: en-US Calc: CL Also in: Version: 6.0.0.3 Build ID: 64a0f66915f38c6217de274f0aa8e15618924765 CPU threads: 4; OS: Windows 6.3; UI render: default; Locale: en-US (hu_HU); Calc: CL Version: 5.0.0.5 Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b Locale: hu-HU (hu_HU) Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 Not yet in: Verzió: 4.1.0.4 Build az.: 89ea49ddacd9aa532507cbf852f2bb22b1ace28 But the empty paragraphs don’t wrap around the first shapes either.
Created attachment 168010 [details] Screenshot of the original documents first page side by side in Word and Writer
Created attachment 168011 [details] Screenshot of the original documents second page side by side in Word and Writer
Reproduced in Version: 7.2.0.0.alpha0+ Build ID: 84af20ef3ea72190784e9e7be820684c2558ba8c CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
The 2016-saved version of bug #37315 example also suffers from this (among a lot of other problems...): https://bugs.documentfoundation.org/show_bug.cgi?id=37315#c29
Attila Bakos (NISZ) committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5812fb81013cc124a9b6a0b9912a34cc715fc495 tdf#138782 DOCX import: fix frame positions of old docs It will be available in 7.2.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.
*** Bug 106339 has been marked as a duplicate of this bug. ***
*** Bug 137850 has been marked as a duplicate of this bug. ***
*** Bug 130427 has been marked as a duplicate of this bug. ***
*** Bug 137270 has been marked as a duplicate of this bug. ***
*** Bug 109218 has been marked as a duplicate of this bug. ***
*** Bug 139105 has been marked as a duplicate of this bug. ***
*** Bug 140823 has been marked as a duplicate of this bug. ***
Created attachment 171639 [details] How it looks in 7.2 master after fix
Congrats to all of you on so many bugs found and resolved. Please clarify: bug is fileopen but some duplicates are filesave? Note for QA: now all those should be tested for MSO DOC variant (and perhaps new bug opened). Bibisect repo is frequently updated, but fixes are at even higher pace :)
Verified in Version: 7.2.0.0.alpha0+ / LibreOffice Community Build ID: 1a99b4e44190e182d56a04678850d62635d74c65 CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: x11 Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded @Attila Bakos, thanks for fixing this issue!!
Attila Bakos (NISZ) committed a patch related to this issue. It has been pushed to "libreoffice-7-1": https://git.libreoffice.org/core/commit/4e7ef3f7421febc08e621bf9ca276cec7b032808 tdf#138782 DOCX import: fix frame positions of old docs It will be available in 7.1.4. 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.
(In reply to Timur from comment #14) > Congrats to all of you on so many bugs found and resolved. > Please clarify: bug is fileopen but some duplicates are filesave? > > Note for QA: now all those should be tested for MSO DOC variant (and perhaps > new bug opened). > Bibisect repo is frequently updated, but fixes are at even higher pace :) Hello Timur, Yes, there are import and export issues, but this problem was an importing problem in the Writerfilter DomainMapper, what I fixed. All of the export situations what have been fixed mentioned that: export to docx and reopen, so the reopen part is the interesting. On the other hand in Word all of the exported docx files rendered correctly so there was no export problem. Please note, i only fixed docx. The doc variants were not tested. I hope this enough for clarifying. Have a nice day! :)
Just to add that DOC is OK in general (MSO DOC is different than DOCX). I opened a new one for bug 137270.
*** Bug 142185 has been marked as a duplicate of this bug. ***
*** Bug 139650 has been marked as a duplicate of this bug. ***