[Libreoffice-bugs] [Bug 69647] FILEOPEN: wrong spacing/disctance of text and picture (shape?) in docx (wrap involved?)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Jul 24 15:16:36 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=69647

Regina Henschel <rb.henschel at t-online.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rb.henschel at t-online.de

--- Comment #14 from Regina Henschel <rb.henschel at t-online.de> ---
LibreOffice does a wrong calculation of the height of the "line box". The value
"Line Spacing" in the UI belongs to the attribute fo:line-height
(http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#property-fo_line-height).
That refers to section ยง7.15.4 in XSL 2001.
(https://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#line-height) And that
refers to https://www.w3.org/TR/CSS2/visudet.html#propdef-line-height

There it is defined, that the percent value refers to the font size of the
element. In the attached document the line-height value is 115% and the
font-size is 12pt. So that gives a computed height of 13.8pt. That is obviously
not tall enough for the image. Therefore the height is extended, so that the
image fits into it.
(Some rules are in
https://www.w3.org/TR/2011/REC-CSS2-20110607/visuren.html#inline-formatting)

As  Mike Kaganski already mentioned, LibreOffice seems to calculate it
different: It does not base the line-height on the font size, but uses the
vertical extend of the text including the image and then it multiplies it with
the percent value. So for the height above the baseline the resulting value is
11.2cm (= 9.74cm from the image multiplied with 1.15). That results in ca
1.46cm (=11.2cm-9.74cm) additional space above the image.

The error becomes more obvious, if you set "Line spacing" to "double" or to
e.g. 250%.

I do not have a version, that makes it correct. I see the error already in
OOo2.4, so it is inherited from OpenOffice.

The error is not a problem of the import filter for docx, but it can be seen in
own ODF files as well.

I see this error still in Version: 6.1.0.2 (x64)
Build ID: b3972dcf1284967612d5ee04fea9d15bcf0cc106
CPU threads: 8; OS: Windows 10.0; UI render: default; 
Locale: de-DE (en_US); Calc: CL

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180724/58a8ef9d/attachment.html>


More information about the Libreoffice-bugs mailing list