Bug 139105 - One image out of line after DOCX/DOC export
Summary: One image out of line after DOCX/DOC export
Status: RESOLVED DUPLICATE of bug 138782
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium normal
Assignee: Attila Bakos (NISZ)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-12-20 20:18 UTC by Telesto
Modified: 2021-05-05 07:43 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file (3.02 MB, application/vnd.oasis.opendocument.text)
2020-12-20 20:19 UTC, Telesto
Details
The example file and its docx version in current master (271.78 KB, image/png)
2020-12-22 19:28 UTC, Gabor Kelemen (allotropia)
Details
Modified example file before and after docx save (222.47 KB, image/png)
2020-12-22 19:44 UTC, Gabor Kelemen (allotropia)
Details
Modified example file before and its modified docx version (357.58 KB, image/png)
2020-12-22 20:17 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-12-20 20:18:49 UTC
Description:
One image out of line after DOCX export

Steps to Reproduce:
1. Open the attached file
2. Save as DOCX
3. File reload

Actual Results:
One image jumps out of alignment

Expected Results:
Same as ODT


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in 
7.2

and in
4.4.7.2

and in
4.2

additional wrong positioned image with
4.1

alignment off with
4.0
Comment 1 Telesto 2020-12-20 20:19:13 UTC
Created attachment 168360 [details]
Example file
Comment 2 Telesto 2020-12-20 20:24:42 UTC
Also in
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d53735
Comment 3 Gabor Kelemen (allotropia) 2020-12-22 19:28:58 UTC
Created attachment 168429 [details]
The example file and its docx version in current master

Something is off after docx export in:

Version: 7.2.0.0.alpha0+
Build ID: e57665ea6f812aff9fc87073ce947f40a8b26e9d
CPU threads: 8; OS: Linux 5.0; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded
Comment 4 Gabor Kelemen (allotropia) 2020-12-22 19:44:04 UTC
Created attachment 168430 [details]
Modified example file before and after docx save

Adding some colorful borders to the bottom row shows that all of them are moved a bit to the right.
Comment 5 Gabor Kelemen (allotropia) 2020-12-22 20:17:51 UTC
Created attachment 168431 [details]
Modified example file before and its modified docx version

Looks like the problem stems from the anchoring position of the bottom row:
the first three images are anchored to the third 24 pt paragraph while the other five are anchored to the second 24 pt paragraph.

Writer seems to consider the second paragraph (but not the third - strange) wrapped around the other images, and adds the wrapped images width to the horizontal position of the five images in case of docx.

Manually changing their horizontal position from "Paragraph area" to "Left paragraph border" fixes the right shift and restores the original layout.

See bug #138782 about this.
Comment 6 Attila Bakos (NISZ) 2021-05-05 06:30:37 UTC

*** This bug has been marked as a duplicate of bug 138782 ***