Bug 137825 - Images from docx are moved and jumbled when opened with LibreOffice
Summary: Images from docx are moved and jumbled when opened with LibreOffice
Status: RESOLVED DUPLICATE of bug 95623
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-10-28 14:59 UTC by jake.weilhammer
Modified: 2023-06-02 16:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Original docx file with the images (117.34 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-10-28 14:59 UTC, jake.weilhammer
Details
Expected Results on Word (38.82 KB, image/png)
2020-10-28 15:00 UTC, jake.weilhammer
Details
Actual Results on LibreOffice (79.20 KB, image/png)
2020-10-28 15:00 UTC, jake.weilhammer
Details
Minimized example file (56.88 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-12-08 15:01 UTC, NISZ LibreOffice Team
Details
The minimized example file in Word and Writer 7.2master (110.89 KB, image/png)
2020-12-08 15:04 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jake.weilhammer 2020-10-28 14:59:21 UTC
Description:
Have many small images on a docx file.  The background images have wrapping style "Square" and the foreground images over them have wrapping style "In Front of Text" on Microsoft Word.

When opening this file with LibreOffice, the images are in a completely different order and have been moved around.  In this particular case, the document does not make sense with the new layout.

Steps to Reproduce:
Haven't been able to reproduce this except for on the original file. Made a new file with images in the background and foreground with same wrapping style but it did not cause the same bug in Libre. Maybe there is a less obvious layout setting on the images that I do not know about.

Actual Results:
Images are jumbled and the foreground images are no longer in front of the background images.

Expected Results:
Image layout does not change and the foreground images are correctly positioned in front of the background images


Reproducible: Always


User Profile Reset: No



Additional Info:
This file is kind of a mess, but the layout of the images should not have changed.
Comment 1 jake.weilhammer 2020-10-28 14:59:57 UTC
Created attachment 166808 [details]
Original docx file with the images
Comment 2 jake.weilhammer 2020-10-28 15:00:33 UTC
Created attachment 166809 [details]
Expected Results on Word
Comment 3 jake.weilhammer 2020-10-28 15:00:52 UTC
Created attachment 166810 [details]
Actual Results on LibreOffice
Comment 4 Telesto 2020-10-28 15:43:52 UTC
Repro with
Version: 7.1.0.0.alpha0+ (x64)
Build ID: 94e6e140491de31c0788c91af855a75a3bb12709
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

Version: 5.4.0.0.alpha1+
Build ID: 9feb7f7039a3b59974cbf266922177e961a52dd1
CPU threads: 4; OS: Windows 6.29; UI render: GL; 
Locale: nl-NL (nl_NL); Calc: CL

Versie: 4.4.7.2 
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: nl_NL

Versie 4.0.0.3 (Bouw-id: 7545bee9c2a0782548772a21bc84a9dcc583b89)
Comment 5 Telesto 2020-10-28 15:54:52 UTC
@Jake Weilhammer
Which version of Word did you use.. Document is a mess in many cases (Microsoft Word Online doesn't render it properly. Used a DOCX to PDF render (also wrong). DOCX conversion pack made a mess too.

So there must be something with the file in question
Comment 6 jake.weilhammer 2020-10-30 13:33:55 UTC
(In reply to Telesto from comment #5)
> @Jake Weilhammer
> Which version of Word did you use.. Document is a mess in many cases
> (Microsoft Word Online doesn't render it properly. Used a DOCX to PDF render
> (also wrong). DOCX conversion pack made a mess too.
> 
> So there must be something with the file in question

I'm not sure which version this file was originally made on, but I am using Microsoft Word 16.33 (Mac) and it seems to be rendering and exporting to PDF just fine. 

Seems it may be a compatibility issue between different versions of Word as well if it's not rendering on Microsoft Word Online, but I'm not well versed on the different versions/offerings of Word.
Comment 7 NISZ LibreOffice Team 2020-12-08 15:01:45 UTC
Created attachment 167977 [details]
Minimized example file

This file with only 3 images shows what's going on here:

- In Word the wrapping of paragraphs considers multiple images next to each other.
In Writer the first image is considered only, so that the empty paragraphs are behind the second image on the right.
Since in the original document there were five images spanning the whole width of the paper, this caused the ones after the second paragraph to wrap below this line of images.
The second line of images is anchored to these paragraphs so their vertical position is messed up in Writer, since now the paragraphs are a bit closer to the top of the page.

- Another problem is the horizontal positioning of the images that are given as "to column" in Word and imported incorrectly as to "Paragraph area". This is likely wrong, see my comment here:
https://bugs.documentfoundation.org/show_bug.cgi?id=137850#c12
Comment 8 NISZ LibreOffice Team 2020-12-08 15:04:21 UTC
Created attachment 167978 [details]
The minimized example file in Word and Writer 7.2master

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
Comment 9 Gabor Kelemen (allotropia) 2022-05-23 17:15:09 UTC
*** Bug 145474 has been marked as a duplicate of this bug. ***
Comment 10 Justin L 2023-03-15 15:02:04 UTC
MS Word 2010 with original_file.docx looks pretty much identical to comment 3.
Comment 11 Justin L 2023-06-02 16:30:58 UTC

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