Bug 79602 - FORMATTING: proportional line spacing < 100% causes cropped letters in tables and when scrolling, even when there's enough space
Summary: FORMATTING: proportional line spacing < 100% causes cropped letters in tables...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: Other Linux (All)
: medium major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: BSA target:4.4.0 target:4.3.4
Keywords: regression
Depends on:
Blocks:
 
Reported: 2014-06-03 18:58 UTC by Máirín Duffy
Modified: 2015-03-13 22:07 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
I made a sample document to demonstrate the problem and am attaching it. It shows how text in a table with an 80% line height is cropped while text outside of a table set to a 60% line height is not cropped and is readable. (16.95 KB, application/vnd.oasis.opendocument.text)
2014-06-03 18:58 UTC, Máirín Duffy
Details
screenshot showing the issue (115.96 KB, image/png)
2014-06-03 19:01 UTC, Máirín Duffy
Details
cropping in both the table and body text (95.41 KB, image/jpeg)
2014-06-10 14:24 UTC, Yousuf Philips (jay) (retired)
Details
ODT document with proportional line spacing from OOo 3.4 beta (10.61 KB, application/vnd.oasis.opendocument.text)
2014-10-30 15:21 UTC, Michael Stahl (allotropia)
Details
ODT document with proportional line spacing from Word (5.27 KB, application/vnd.oasis.opendocument.text)
2014-10-30 15:22 UTC, Michael Stahl (allotropia)
Details
DOCX document with proportional line spacing from Word (13.85 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-10-30 15:22 UTC, Michael Stahl (allotropia)
Details
DOC/WW8 document with proportional line spacing from Word (31.50 KB, application/msword)
2014-10-30 15:23 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Máirín Duffy 2014-06-03 18:58:08 UTC
Created attachment 100367 [details]
I made a sample document to demonstrate the problem and am attaching it. It shows how text in a table with an 80% line height is cropped while text outside of a table set to a 60% line height is not cropped and is readable.

Problem description: 

If you have text in a table set to 85% proportional line height or smaller, the text gets cropped (the descenders of letters such as j, q, p, y, g basically get chopped off) and becomes difficult-to-read, even though there is plenty of whitespace for the text.

This problem does not affect text that isn't in a table. 

Steps to reproduce:
1. Create a table.
2. Type some text in a cell.
3. Set the 'Table Contents' style to have 80% proportional line height (Format > Styles and Formatting, right click Table Contents and select 'modify', set Proportional of 80% in Idents & Spacing tab.) 
4. Type a bunch of text that includes the lowercase letters g, j, p, q, y, etc.

Current behavior:

Letter descenders get cropped.

Expected behavior:

Letters overlap on top of one another. This is what happens if you make the line height very short on text that isn't in a table. This is better because it becomes more clear that the line-height needs to be adjusted. When the letters are cropped, it's not clear what the problem is.
Operating System: Fedora
Version: 4.2.3.3 release
Comment 1 Máirín Duffy 2014-06-03 19:01:26 UTC
Created attachment 100368 [details]
screenshot showing the issue
Comment 2 Yousuf Philips (jay) (retired) 2014-06-06 23:15:21 UTC
When testing this in Linux Mint in 3.3.0, 4.1.6, 4.2 and 4.3 beta the document will load correctly as shown in the previous attached screenshot. But scrolling up and down with the mouse wheel, page up & page down, or with the scrollbar quickly and you will notice that different parts of the text arent being redraw. An alt-tab twice will remedy this issue.
Comment 3 Jean-Baptiste Faure 2014-06-07 11:54:23 UTC
Set as enhancement because it probably works as designed.

Best regards. JBF
Comment 4 Máirín Duffy 2014-06-10 13:38:52 UTC
Hi Jean-Baptiste - can you explain with a bit more detail for me how this is an enhancement request? The different behavior between table and document body makes me think it's an outright bug...
Comment 5 Yousuf Philips (jay) (retired) 2014-06-10 14:24:14 UTC
Created attachment 100821 [details]
cropping in both the table and body text

I found the issue in both the table and document body.
Comment 6 Michael Stahl (allotropia) 2014-10-29 13:31:15 UTC
the cropped drawing with proportional line-spacing < 100%
is regression in LO 3.3.0 from this commit which is obviously incomplete:

commit 70597695b23b5c45dfc735a7afd175f034428195
Author:     Florian Reuter <freuter@novell.com>
AuthorDate: Tue Sep 14 14:32:01 2010 +0200
Commit:     Cédric Bosdonnat <cedricbosdo@openoffice.org>
CommitDate: Tue Sep 14 14:32:01 2010 +0200

    sw-allow-negative-spacing.diff: correctly display linespacing < 100%
    
    n#364534

what's even worse is that a multi-line paragraph's rendered
inter-line spacing is the square of the percentage.
Comment 7 Commit Notification 2014-10-30 15:03:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=4e223fab04279c3583689e69fa1342966e81de36

fdo#79602: sw: fix text formatting of proportional line space < 100%

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2014-10-30 15:03:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9605763e3dc8c85137787c77c31e8639553a35ed

fdo#79602: sw: add new compatibiltiy flag PropLineSpacingShrinksFirstLine

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Michael Stahl (allotropia) 2014-10-30 15:21:43 UTC
Created attachment 108696 [details]
ODT document with proportional line spacing from OOo 3.4 beta
Comment 10 Michael Stahl (allotropia) 2014-10-30 15:22:27 UTC
Created attachment 108697 [details]
ODT document with proportional line spacing from Word
Comment 11 Michael Stahl (allotropia) 2014-10-30 15:22:52 UTC
Created attachment 108698 [details]
DOCX document with proportional line spacing from Word
Comment 12 Michael Stahl (allotropia) 2014-10-30 15:23:15 UTC
Created attachment 108699 [details]
DOC/WW8 document with proportional line spacing from Word
Comment 13 Commit Notification 2014-10-30 16:33:10 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9605763e3dc8c85137787c77c31e8639553a35ed

fdo#79602: sw: add new compatibiltiy flag PropLineSpacingShrinksFirstLine

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2014-10-30 16:34:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9605763e3dc8c85137787c77c31e8639553a35ed

fdo#79602: sw: add new compatibiltiy flag PropLineSpacingShrinksFirstLine

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2014-10-30 16:38:23 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=9605763e3dc8c85137787c77c31e8639553a35ed

fdo#79602: sw: add new compatibiltiy flag PropLineSpacingShrinksFirstLine

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 16 Markus Mohrhard 2014-10-30 16:39:26 UTC
Sorry for the spamming but I had to fix a bug in the script that was visible with this bug report.
Comment 17 Michael Stahl (allotropia) 2014-11-03 17:21:20 UTC
fixed the painting so it actually looks like Word does it
(except that Word does clip the text if it gets too small but we don't)

also and added a compatibility flag so that old OOo documents
look the same as before.

commits on libreoffice-4-3 branch:
 7ca9c060155b79a037861a972843a70b8a518c4f cff2323e10161d3cbbdba088e8ec74aee3839c62