Bug 140233 - Image wrongly positioned after docx export (caused by image crop)
Summary: Image wrongly positioned after docx export (caused by image crop)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2021-02-07 10:37 UTC by Telesto
Modified: 2024-05-21 05:41 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (114.17 KB, application/vnd.oasis.opendocument.text)
2021-02-07 10:37 UTC, Telesto
Details
Screenshot of the original document and its docx version in Writer master (283.20 KB, image/png)
2021-02-08 09:03 UTC, NISZ LibreOffice Team
Details
The example file and its docx version in current master (240.68 KB, image/png)
2021-02-16 18:55 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-02-07 10:37:08 UTC
Description:
Image wrongly positioned after docx export

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

Actual Results:
Bottom image in the middle 

Expected Results:
should be aligned right


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ed9bba283a6a67864c0928186e277240be0d9ba
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
Comment 1 Telesto 2021-02-07 10:37:21 UTC
Created attachment 169549 [details]
Example file
Comment 2 Telesto 2021-02-07 10:48:01 UTC
Found in
4.4.7.2

and in
Versie: 4.2.0.4 
Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
Comment 3 Telesto 2021-02-07 10:49:31 UTC
The issue started after honoring the image crop. Text layout based on uncropped image?
Comment 4 NISZ LibreOffice Team 2021-02-08 09:03:05 UTC
Created attachment 169576 [details]
Screenshot of the original document and its docx version in Writer master

No repro with nightly:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 3ed9bba283a6a67864c0928186e277240be0d9ba
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-GB
Calc: CL

But still repro with a bit older bibisect-7.2 version:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 380ab85b6594a013f34f5e6ec69fb569336bbb48
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL
Comment 5 Gabor Kelemen (allotropia) 2021-02-16 18:55:19 UTC
Created attachment 169790 [details]
The example file and its docx version in current master

Interestingly it is consistently broken on Linux:

Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: cbcec4425e04e3614a2025b49fdc221216ac51d3
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded
Comment 6 NISZ LibreOffice Team 2021-08-11 10:44:14 UTC
(In reply to Telesto from comment #2)
> Found in
> 4.4.7.2
> 
> and in
> Versie: 4.2.0.4 
> Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71

And not yet in 
Verzió: 4.1.0.4
Build az.: 89ea49ddacd9aa532507cbf852f2bb22b1ace28
Comment 7 NISZ LibreOffice Team 2021-08-12 14:28:56 UTC
(In reply to NISZ LibreOffice Team from comment #6)
> (In reply to Telesto from comment #2)
> > Found in
> > 4.4.7.2
> > 
> > and in
> > Versie: 4.2.0.4 
> > Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71
> 
> And not yet in 
> Verzió: 4.1.0.4
> Build az.: 89ea49ddacd9aa532507cbf852f2bb22b1ace28

This change was bibisected with linux-42all to:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=9413f2124dff0c38fd52d318d5ac2f392a7d36e0

author	Luboš Luňák <l.lunak@suse.cz>	2013-05-23 16:32:44 +0200
committer	Luboš Luňák <l.lunak@suse.cz>	2013-05-23 16:36:46 +0200
commit 9413f2124dff0c38fd52d318d5ac2f392a7d36e0 (patch)

improve exporting of picture alignment to docx

But this actually improved things for the third image, so can't really be blamed: 
* it is anchored to the right to paragraph area, which was exported as a fixed 10.72 cm from left.
* it also has a 54% scaling on the height, which was exported as 50% and got fixed
* both lower images have a 0.7 cm top crop, which started to be exported (but was still not imported)

This is essentially a layout problem as Word is not affected. Pretty much we see the 
same problems as in bug 140231: there we start from the modified version of this same file with the lower image was changed to be horizontally positioned to a fixed 12.3 cm from left. Changing that to horizontal position to right of paragraph centers the image.

However even 3.5 opens incorrectly the docx versions of this file that were exported with 4.2+. 
Removing regression keyword.
Comment 8 Stéphane Guillou (stragu) 2022-11-25 08:23:54 UTC
Reproduced in master build from today:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 24d7431876e87eba700a9f141dc8e030143a92ad
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded