Bug 138488 - FILEOPEN: DOCX - Incorrect position of cropped figure - should spill outside of page edge
Summary: FILEOPEN: DOCX - Incorrect position of cropped figure - should spill outside ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2020-11-25 13:18 UTC by Frederic Parrenin
Modified: 2024-05-21 05:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
.docx file to reproduce the problem (216.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2020-11-25 13:18 UTC, Frederic Parrenin
Details
Comparison MSO 2010 and LibreOffice 7.1 master (373.03 KB, image/png)
2020-11-25 14:11 UTC, Xisco Faulí
Details
Image positioning settings in Word 2013 and current master Writer (474.25 KB, image/png)
2020-11-25 16:14 UTC, NISZ LibreOffice Team
Details
Crop settings in Word and Writer (698.48 KB, image/png)
2021-08-11 13:16 UTC, NISZ LibreOffice Team
Details
Example file demonstrating the cropped image that goes outside of page area (218.19 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-08-12 15:04 UTC, NISZ LibreOffice Team
Details
The extended file in Word and Writer (913.40 KB, image/png)
2021-08-12 15:06 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Parrenin 2020-11-25 13:18:15 UTC
Created attachment 167563 [details]
.docx file to reproduce the problem

Steps to reproduce:
- open the attached .docx file in Writer
- open the same file in Word
- compare
=> the vertical position of the figure is wrong in Writer
Comment 1 Xisco Faulí 2020-11-25 14:11:53 UTC
Created attachment 167565 [details]
Comparison MSO 2010 and LibreOffice 7.1 master

Crop is not applied correctly
Comment 2 Xisco Faulí 2020-11-25 14:12:16 UTC
Reproduced in

Version: 7.1.0.0.beta1+
Build ID: e2cffcf55b04838abc7497f6c18518c7600b670b
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Xisco Faulí 2020-11-25 14:14:12 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 5.7; Render: default; 

Version: 4.3.0.0.alpha1+
Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 4 NISZ LibreOffice Team 2020-11-25 16:14:45 UTC
Created attachment 167571 [details]
Image positioning settings in Word 2013 and current master Writer

Looks like positioning settings are incorrect:
- Horizontal is -3.33 cm instead of -3.09 cm
- Vertical is -1 cm instead of -3.85 cm
Comment 5 Xisco Faulí 2020-11-25 16:16:27 UTC
oh, thanks for checking, I was wrong then
Comment 6 NISZ LibreOffice Team 2021-08-11 13:16:21 UTC
Created attachment 174210 [details]
Crop settings in Word and Writer

So, crop settings are looking fun too:
- Left is -1.59 cm in Word, becomes 0 in Writer
- Top is -2.86 cm in Word, becomes 0.93 cm top and 1.22 cm bottom.

Also the width is scaled to be larger than the page width (22,83 cm) is truncated to 21 cm.
Comment 7 NISZ LibreOffice Team 2021-08-12 15:04:31 UTC
Created attachment 174230 [details]
Example file demonstrating the cropped image that goes outside of page area

Looks like this boils down to an unusual behavior of Word: a normal uncropped image cannot be moved outside the vertical page borders or into the top and bottom margins area (at least in CompatibilityMode 15).

Cropped ones however can!

Writer does not allow that, and imports such images inside the visible page area.

Apart from that situation, normal crop values seem to be imported correctly, even considering the vast crop model differences.
Comment 8 NISZ LibreOffice Team 2021-08-12 15:06:46 UTC
Created attachment 174231 [details]
The extended file in Word and Writer

The top images crop rectangle is positioned above the visible page area, the middle ones is left of it, the bottom ones is positioned below the visible area.

Writer shows all of them inside the page area.
Comment 9 Justin L 2023-06-08 16:30:38 UTC
repro 7.6