Bug 139408 - FILEOPEN DOCX: Vertical position of image in footer changes
Summary: FILEOPEN DOCX: Vertical position of image in footer changes
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Images DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2021-01-04 16:11 UTC by Julien Adetele
Modified: 2023-08-06 23:48 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
A screenshot showing the bug (139.53 KB, image/png)
2021-01-04 16:11 UTC, Julien Adetele
Details
The offending .docx file (265.26 KB, application/wps-office.docx)
2021-01-04 16:12 UTC, Julien Adetele
Details
Minimized example file (27.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-05-20 11:01 UTC, NISZ LibreOffice Team
Details
The minimized example in Word and Writer side by side (135.68 KB, image/png)
2021-05-20 11:15 UTC, NISZ LibreOffice Team
Details
Manually fixed version to get the same look (139.01 KB, image/png)
2021-05-20 11:29 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien Adetele 2021-01-04 16:11:23 UTC
Description:
The text position of an imported .docx document do not correspond to the text position displayed by Microsoft Word.

The same is true for the image in the footer.

Steps to Reproduce:
1. Open the attached .docx file

Actual Results:
The text position of an imported .docx document do not correspond to the text position displayed by Microsoft Word.

Expected Results:
LibreOffice Writer should put imported text and images in the same position as Microsoft Word puts them


Reproducible: Always


User Profile Reset: No



Additional Info:
LIBREOFFICE VERSION
Version: 7.0.4.2
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: kf5
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL

MY SYSTEM
Operating System: Kubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Kernel Version: 5.8.0-33-generic
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 15,5 GiB of RAM
Graphics Processor: GeForce GTX 1060/PCIe/SSE2
Comment 1 Julien Adetele 2021-01-04 16:11:52 UTC
Created attachment 168677 [details]
A screenshot showing the bug
Comment 2 Julien Adetele 2021-01-04 16:12:19 UTC
Created attachment 168678 [details]
The offending .docx file
Comment 3 Julien Adetele 2021-01-05 11:54:03 UTC
COnfirmed in

Version: 7.2.0.0.alpha0+
Build ID: 9b02ff6a6a95b73c103f998716d1c9df61b41ff5
CPU threads: 12; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: CL
Comment 4 Dieter 2021-01-20 09:04:36 UTC
I confirm it with

Version: 7.0.4.2 (x64)
Build ID: dcf040e67528d9187c66b2379df5ea4407429775
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

in comparison with MS Word 2016.

Problem is, that vertical position of image in footer changes. If you bring it to the original position, text also looks O.K.
Comment 5 NISZ LibreOffice Team 2021-05-20 11:01:14 UTC
Created attachment 172195 [details]
Minimized example file

Copying the offending image from the footer to the body confirms that this problem is specific to the footer: does not happen in the document body.
Comment 6 NISZ LibreOffice Team 2021-05-20 11:15:54 UTC
Created attachment 172196 [details]
The minimized example in Word and Writer side by side
Comment 7 NISZ LibreOffice Team 2021-05-20 11:29:45 UTC
Created attachment 172197 [details]
Manually fixed version to get the same look

I found that the problem may be in the point to which the position is calculated.

In Word the image has a vertical position of -0.29 cm below paragraph.
This is imported as -0.29 cm "From top" to Margin, which is not the same but choosing another option such as Paragraph text area, Entire page or Page text area does not help.
What helps is subtracting the amount of bottom margin (1.25 cm in this case) from the -0.29 cm position to get -1.54 cm. 
That gives the ~same position as in Word, and this setting even survives saving by Writer to docx. Which looks the ~same even in Word.

This may not be the correct way to solve this problem, but a hint towards the direction.
Comment 8 Justin L 2023-06-08 16:00:31 UTC
repro 7.6
Comment 9 Aron Budea 2023-08-06 23:48:06 UTC
Adjusting oldest version, since it was never OK.