Border padding of 0,10 cm becomes 0,07 on doc/x export
Steps to Reproduce:
1. open the attached file
2. Save as DOCX
3. File reload
4. Format -> Page Styles -> Border
Padding changes from 0,10cm to 0,07cm
0,10? or something in that area?
User Profile Reset: No
Version: 184.108.40.206.alpha0+ (x64)
Build ID: abcc4eb907661e07ad850ccce7eb06f129da4286
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Created attachment 165571 [details]
Me asking questions ;-). Please notify me if you get bored of annoyed by it.
The border padding is always 'off'. Does MSO calculate it differently; so compatibility? Or is this some rounding difference between pt and cm?
Version: 220.127.116.11 (x64)
Build ID: 7cbcfc562f6eb6708b5ff7d7397325de9e764452
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: ro-RO (ro_RO); UI: en-US
Spacing 0.07 cm
Generally speaking, this should be NAB and dupe of tdf#126567. In OOXML, the padding (as in LO; it's called "spacing" in OOXML) is measured in whole pt - i.e., it may only be 1, 2, 3, ... pt. So there's no flexibility that ODF provides for this attribute there.
However, in this specific case, the stored value of 2 pt (=0.7056mm) is not a good value; it should had been 3 pt (=1.0583mm), which is much closer to the original value. Looks like the value is created by truncation, not by rounding. (There might be good reasons to do that, but that needs investigation.)
See https://git.libreoffice.org/core/+/fb959e581c900b392efd0bb329b7cf30c8ed56a5 and https://git.libreoffice.org/core/+/8805e10f5887df66edfd0a2fa4b70e87f0c74700.
Code pointer: impl_borderLine in sw/source/filter/ww8/docxattributeoutput.cxx
And ww8 counderpart: WW8Export::TranslateBorderLine in sw/source/filter/ww8/ww8atr.cxx
Would you like to give it a try to this issue and fix it ?
is someone actively working on this bug? :) Because I might have a solution.
(In reply to Sven Lüppken from comment #9)
> Hi all,
> is someone actively working on this bug? :) Because I might have a solution.
They bug isn't assigned. And not seen a commit in gerrit point to this bug.. so you're free to go..
I pushed a change to Gerrit (here: https://gerrit.libreoffice.org/c/core/+/105128) which includes a unittest for the docx export, but I need a pointer how to create an appropriate unittest for the doc export, as I'm not familiar with the Word binary format. Can you help me? :)
(In reply to Sven Lüppken from comment #11)
It's nice to see your patch! Very good; I only have formatting nitpicks there - please see my comments on Gerrit.
Also please make sure you send your license statement - see https://wiki.documentfoundation.org/Development/Developers. Thank you! Great to have you here with us! :-)
Thank you! :)
I just pushed a second version of the patch to Gerrit. Thanks to your hints and the excellent README and xray-tool I also wrote a test for the binary export filter now.
I already sent the license statement on Friday when I submitted a patch for a different bug. :)
Sven Lüppken committed a patch related to this issue.
It has been pushed to "master":
tdf#136814 Fix border padding in Word export
It will be available in 7.1.0.
The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
Affected users are encouraged to test the fix and report feedback.
Thank you Mike for your patience and your help! Looking forward to the next bug. :)
(In reply to Commit Notification from comment #14)
> Sven Lüppken committed a patch related to this issue.
> It has been pushed to "master":
> tdf#136814 Fix border padding in Word export
> It will be available in 7.1.0.
> The patch should be included in the daily builds available at
> https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
> information about daily builds can be found at:
> Affected users are encouraged to test the fix and report feedback.
Sven, if your patch fixes the bug then please close it as RESOLVED FIXED. Thanks for your work.