Problems with unittest testEffectExtentInline
Regina Henschel
rb.henschel at t-online.de
Wed Jun 9 13:33:59 UTC 2021
Hi Miklos, hi all,
I'm currently working on https://gerrit.libreoffice.org/c/core/+/115668
WIP improve wrap margins in docx filters
My current state is, that distances needed for shadow and glow, for
rotation and for fat stroke/border are read from docx, and they are
written to docx from docx and from odt. That works for "normal" cases
besides +-1Twip rounding errors somewhere and border thickness for
frames, which is not yet implemented.
But I have trouble with unittest testEffectExtentInline [1]. The
document in testEffectExtentInline would need a negative bottom margin
(UI wrap distance from text). But that is not possible in LO, bug
tdf#141880. The test does not fail in current LO, because it does not
determine the actual values of the image, but simple writes out the
values from InteropGrabBag. If the user changes the rotate angle to
90deg (and put it back to vertical 'top to base line') or sets the
bottom margin to 1cm for example, the exported docx file has unsuitable
effectExtent. That results currently in a wrong line height in Word.
I have tried this: Open the test document in Word and change the rotate
angle to 330° to force Word to recalculate the effectExtent values. Save
it and reopen it in Word, change back to rotate angle 320° and save that
again. Then the document has different effectExtent values than the
original test document. With these values the problem does not exist.
So what to do?
[1]
https://opengrok.libreoffice.org/xref/core/sw/qa/extras/ooxmlexport/ooxmlexport.cxx?r=1b82b81c&mo=29450&fi=582#591
Kind regards
Regina
More information about the LibreOffice
mailing list