Bug 142826 - FILESAVE DOCX: Image borderless padding / image size is minutely different after save as DOCX
Summary: FILESAVE DOCX: Image borderless padding / image size is minutely different af...
Status: RESOLVED DUPLICATE of bug 90070
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Images
  Show dependency treegraph
 
Reported: 2021-06-12 19:08 UTC by Telesto
Modified: 2021-10-14 09:29 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (137.41 KB, application/vnd.oasis.opendocument.text)
2021-06-12 19:09 UTC, Telesto
Details
Screencast (796.50 KB, video/mp4)
2021-06-12 19:10 UTC, Telesto
Details
Bibisect log (2.91 KB, text/plain)
2021-06-13 13:03 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-06-12 19:08:53 UTC
Description:
Image is larger on DOCX file open compared to ODT (on screen), whereas dialogs show the same measurement

Steps to Reproduce:
1. Open the attached file
2. Save to DOCX
3. File reload
4. Now open to ODT
5. And switch back and forward between both windows. Notice odd difference

Actual Results:
size difference

Expected Results:
This worked before 5.3


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 239b4bb27fd8db26e8416045b3015688a8b1b0ae
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

and in
5.3

not in
5.2
Comment 1 Telesto 2021-06-12 19:09:09 UTC
Created attachment 172843 [details]
Example file
Comment 2 Telesto 2021-06-12 19:10:15 UTC
Created attachment 172844 [details]
Screencast
Comment 3 Telesto 2021-06-13 13:03:48 UTC
Created attachment 172847 [details]
Bibisect log

Bisected to:
author	Justin Luth <justin_luth@sil.org>	2016-11-02 15:15:55 +0300
committer	Justin Luth <justin_luth@sil.org>	2016-11-03 19:02:41 +0000
commit 5d9d0f3c979732ade57b9c4c4960dd030ffdc9f9 (patch)
tree 5fec72a40be7dbf15f208498494213cd6f59c114
parent 2a818a0aafac218ca09bb079d7f2cf0879385e4a (diff)
there is a function for that: CalcLineSpace(xx, bEvenIfNoLine)

https://cgit.freedesktop.org/libreoffice/core/commit/?id=5d9d0f3c979732ade57b9c4c4960dd030ffdc9f9
Comment 4 Dieter 2021-06-30 08:07:59 UTC
I confirm it with

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 949658028e722e5d2657b503eb20e16e41dbd8cf
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Image is larger, because it is cropped -0,02cm on every side

Steps to Reproduce:
1. Open the attached file
2. Image Properties => Tab Crop => Crop 0,00cm on each side
2. Save to DOCX
3. File reload
4. Image Properties => Tab Crop => Crop -,02cm on each side => Image appears larger
Comment 5 Justin L 2021-07-28 11:23:16 UTC
You missed adding me as a CC. Just stumbled across it now.

Unfortunately, that commit just hides the real issue which was bug 41542. Prior to this time, the "border spacing" was ignored when there were no borders, but that violated ODF specs. So the .03 padding was missing.

Now the ODT has "shrunk" minimally to honour that setting.

IIRC, MS formats handle this padding differently, so it needs to be emulated. The difference here is so minor it seems irrelevant.
Comment 6 Justin L 2021-07-28 11:29:24 UTC
I should have made it more clear the both the bug and the identified commit are not the problem, but only exposed existing stuff.
Comment 7 Justin L 2021-10-14 09:29:29 UTC

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