Bug 141700 - ODT->DOC/X format Border padding is not saved for image
Summary: ODT->DOC/X format Border padding is not saved for image
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-Limitations
  Show dependency treegraph
 
Reported: 2021-04-15 04:57 UTC by Bill Wiseman
Modified: 2023-06-02 11:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file created by instructions (27.94 KB, application/vnd.oasis.opendocument.text)
2021-04-15 06:22 UTC, NISZ LibreOffice Team
Details
The example file saved as docx (16.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2021-04-15 06:23 UTC, NISZ LibreOffice Team
Details
The example file and its docx version side by side in Writer (119.05 KB, image/png)
2021-04-15 06:24 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bill Wiseman 2021-04-15 04:57:06 UTC
Description:
In DOCX format Border padding is not saved for image when in a table. I.E. if you put a value in for padding this is not saved.

Steps to Reproduce:
1. Create a table
2. Place an image in a cell (png)
3. Change the borders padding to 0.10 
4. Save as ODT works
5. Save as 365 docx format 
6. Reopen borders padding is 0

Actual Results:
Border padding is saved

Expected Results:
Border padding is reset to 0


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Saving as ODT format keep the values. 

I am looking into this now but this is my first foray into LibreOffice so waiting for it to build. Would handy to speak with someone on next steps. Happy to help
Comment 1 Bill Wiseman 2021-04-15 06:19:32 UTC
Built this source  

git log --pretty=format:'%h' -n 1
209d07ff2de2

And this is still present.
Comment 2 NISZ LibreOffice Team 2021-04-15 06:22:27 UTC
Created attachment 171210 [details]
Example file created by instructions
Comment 3 NISZ LibreOffice Team 2021-04-15 06:23:02 UTC
Created attachment 171212 [details]
The example file saved as docx

With yesterdays nightly:

Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 77419c6f3aba1fd5b1660795923c22a39bdb1bad
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL
Comment 4 NISZ LibreOffice Team 2021-04-15 06:24:00 UTC
Created attachment 171214 [details]
The example file and its docx version side by side in Writer

The images padding is lost regardless of it being inside a table or not.
Comment 5 NISZ LibreOffice Team 2021-04-15 06:33:55 UTC
On the other hand: I'm unable to find an equivalent setting on Words UI. 
There is only "Distance from text" which is equivalent to Properties - Wrap - Spacing in Writer; the distance between the border line and the surrounding text. 
But I see no option to set the padding between the image and the border line.
Comment 6 Bill Wiseman 2021-04-15 06:50:35 UTC
So being my trek to track this down padding is stored in the content.xml. Will now look at where this is in the DOCX version. All a bit new so maybe a bit slow.
Comment 7 QA Administrators 2023-04-16 03:24:48 UTC Comment hidden (obsolete, spam)
Comment 8 Justin L 2023-06-02 11:44:12 UTC
This is a format limitation of DOCX and DOC apparently. I know that for paragraphs, the border distance is limited to 31pt, so our export code tries to compensate by adding it to the margins. In this case, it would have to take the value and move it to the wrap margins.

However, that is a lot of computer guesswork and emulation, so probably better to leave it for the human to work out.

Long story short - LO can do things that MSO can't.