https://bugs.documentfoundation.org/show_bug.cgi?id=172113
Bug ID: 172113
Summary: Line spacing calculated differently (or buggy) in LO
compared to Microsoft Office
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Blocks: 109235
Created attachment 207092
--> https://bugs.documentfoundation.org/attachment.cgi?id=207092&action=edit
137335_linespacing.odt: various line spacing issues illustrated
Line spacing is an interesting beast.
The first problem is how to even define what ought to happen. Think about it. A
paragraph can span multiple lines, and each line can contain several
differently sized characters. So how do you define the size of the requested
gap?
The answer is NOT simply based on the paragraph's default font/size. Both LO
and MS Word calculate the maximum height of each line individually and thus
determine a unique line spacing height for each line. So far so good.
So where do you put that line spacing gap? LO seems to put it above the line,
while MS Word apparently puts it below the line. [Oh well - sigh]
So what elements determine the height of the line spacing? LO says pretty much
everything (except for images and tabstops) does. MSO also excludes the size of
spaces and tabstops (unless those are the only things on a non-last line) as
well as excluding bullets/numbering. [Since 25.2 we handle DOCX spaces and
tabstops OK, but we don't ignore numbering.]
And then there is the question of how to handle the spacing in between two
paragraphs? I think the answer is easy for MS Word, since it puts the spacing
below the line already. So of course it is just based on the line spacing of
the last line of the first paragraph - the second paragraph is not involved at
all.
For LO the answer is similar - in order to be somewhat interoperable with MSO.
This works because LO does NOT normally apply a paragraph's defined line
spacing above the first row, so when it follows another paragraph, it can
simply again add the previous paragraph's final line spacing above the first
row.
[Currently that is a bit buggy because LO does a simplistic re-calculation for
mnHeightOfLastLine instead of re-using the value it already
calculated/applied.]
Please note that this explanation was just based on what I see happening as I
use LibreOffice. It was not confirmed that this is how it actually happens at
the code level.
Steps to reproduce:
-open 137335_linespacing.odt and save as DOCX
-compare how LO and MSO handle the different situations
Referenced Bugs:
https://bugs.documentfoundation.org/show_bug.cgi?id=109235
[Bug 109235] [META] Paragraph line spacing bugs and enhancements
--
You are receiving this mail because:
You are the assignee for the bug.