Description: When opening the file in Libre Office it only displays a singular page instead of multiple pages like the word docx does. Steps to Reproduce: 1. Open the attached file in word, note the number of pages. 2. Open the attached file in latest LO, note that there is only one page. Actual Results: LO displays a singular page instead of multiple. Expected Results: LO should display multiple pages. Reproducible: Always User Profile Reset: No Additional Info: N/A
Created attachment 166094 [details] Test file, displaying a singular page
Repro with Version: 7.1.0.0.alpha0+ (x64) Build ID: 7f16cabf00daa30e9284d2fb2494bd341352c25e CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win Locale: nl-NL (nl_NL); UI: en-US Calc: CL and with 6.2 and with Version: 6.0.6.0.0+ Build ID: c30963b8b4bbbe42a24b97aafa161eff9d7ccdd4 CPU threads: 4; OS: Windows 6.3; UI render: default; Locale: nl-NL (nl_NL); Calc: CL fine with 4.4.7.2
Also found in Version: 5.2.8.0.0+ Build ID: e5ebc3d73156f217161e6b857026eae49fa91ea9 CPU Threads: 2; OS Version: Linux 5.3; UI Render: default; VCL: x11; Locale: en-US (en_US.UTF-8); Calc: group but not in oldest of 5.2 bibisect
Created attachment 166126 [details] Bibisect log Bisected to author Tamás Zolnai <tamas.zolnai@collabora.com> 2016-12-21 01:23:11 +0000 committer Miklos Vajna <vmiklos@collabora.co.uk> 2017-01-05 09:11:58 +0000 commit a5f5312de639048dac65da292f2b2dcc330cee15 (patch) tree 3cc57b07c1f08bb6eefe224d917570e39a963dd2 parent f84516a348ea8e05bbf89816505a6041e711ebfd (diff) tdf#96218: MSO DOCX image incorrectly placed when using Alignment Position layoutInCell attribute should be ignored when we are not in a table. Reviewed-on: https://gerrit.libreoffice.org/32253 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 36750bc977b3210b23b7822abd395b30a78af6f5) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx https://cgit.freedesktop.org/libreoffice/core/commit/?id=a5f5312de639048dac65da292f2b2dcc330cee15
Adding CC to: Tamás Zolnai
I checked this issue. My change was correct, since layoutInCell attribute should be applied only when the image is inside a table. In the test doucment, there is no tables, so it's correct that layoutInCell attribute is ignored. This change just uncovered an other issue. The issue is that not only the layoutInCell attributes makes the image follow the text flow. In MSO there is another option that has similar behavior. This is called "Move object with text" on the UI. That setting should be applied on this document by LO. However as I see this option is not explicitly exported to DOCX file format, but it depends on the relative vertical position setting. I added a patch that fix that on import side: https://gerrit.libreoffice.org/c/core/+/104127. However I abandoned it because it needs more work to avoid other issues. It would work with MSO produced DOCX files, but it don't work with LO exported DOCX files. So I leave this issue to those who can invest a bigger amount of time into this issue.
Created attachment 166527 [details] Test file saved in MSO as DOC Also with DOC. Let's keep it here so far.
Created attachment 168033 [details] Screenshot of the original document side by side in Word and Writer after changing horizontal position These images are horizontally positioned "to column" which is imported as "to paragraph area". Manually changing this setting to "Left paragraph border" in Writer restores the original layout of the file. See bug #138782 about this.
*** This bug has been marked as a duplicate of bug 138782 ***
DOCX is fixed, I'll open a new bug for DOC.