Bug 134782 - layout change with paragraph line spacing in table cells caused by fix for bug 125300
Summary: layout change with paragraph line spacing in table cells caused by fix for bu...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.3 release
Hardware: All All
: medium major
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.1.0 target:7.0.2 target:6.4.7
Keywords: bibisected, bisected, regression
: 134956 135071 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-07-13 12:24 UTC by Michael Stahl (allotropia)
Modified: 2020-09-30 14:36 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
reproducer (8.28 KB, application/vnd.oasis.opendocument.text)
2020-07-13 12:33 UTC, Michael Stahl (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Stahl (allotropia) 2020-07-13 12:24:28 UTC
this commit changed the layout of ODT documents containing tables:

commit 3cccdabf19a99fd3f657985c1822436d7679df2b
Author: László Németh <nemeth@numbertext.org>
Date: Tue Nov 19 21:12:28 2019 +0100tdf#125300 extend AddParaSpacingToTableCells with line spacing

... the AddParaSpacingToTableCells was set for newly created documents since 2004, commit 45de8eb0c980f308b668aba9bcdb8f839eaafc38 (which changed the default of AddTableSpacing from false to true).

this needs to be 2 different flags, so we get 3 different modes: the pre-2004 sw mode, the pre-3cccdabf19a99fd3f657985c1822436d7679df2b sw mode, and the MSO mode.

since this was backported to 6.4, i think this should be fixed before 6.4 branch goes EOL.

i wonder why QA layout regression tests didn't find this?
Comment 1 Michael Stahl (allotropia) 2020-07-13 12:33:39 UTC
Created attachment 162968 [details]
reproducer

table with paragraphs with 2x line spacing
Comment 2 Xisco Faulí 2020-07-13 13:20:58 UTC
Reproduced in

Version: 7.1.0.0.alpha0+
Build ID: 00be56d9db396d284f66ab723d6fbb898b888dfb
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

the office-interoperability-tool exports the documents to ODT as well, so if this issue is affecting many documents, is should have been caught by the tool.
Does it affect any document with a table ?
Comment 3 Michael Stahl (allotropia) 2020-07-13 13:32:26 UTC
(In reply to Xisco Faulí from comment #2)
> the office-interoperability-tool exports the documents to ODT as well, so if
> this issue is affecting many documents, is should have been caught by the
> tool.

good to hear.

> Does it affect any document with a table ?

ah i was wrong in assuming it's the bottom spacing, it's actually line spacing that makes the difference here, so you need line spacing != 1x on a paragraph that is the last one in a table cell to see it.
Comment 4 László Németh 2020-07-13 15:34:08 UTC
My commit achieved the original intention of AddParaSpacingToTableCells mode, i.e. interoperability, see https://bugs.documentfoundation.org//show_bug.cgi?id=125300#c7, but you are right, there are potential regressions, if the table paragraphs contained (mostly unintended?) line spacing.

Tables looked worse before with big line spacing and multi-line paragraphs, because paragraph lines before the rows always lose their line spacing, resulting worse typography.

Now it's possible to set row distance easily using paragraph line spacing, like in MSO, when the cells contains only single lines. So I hope, more DOCX (DOC) created in Word use this comfortable trick, than ODTs created in Writer (where modifying line spacing was useless before). But it's no excuse, this is a new method to create documents in Writer without back compatibility (but now with interoperability). I believe, this is a gray area, i.e. OpenDocument doesn't cover this behavior precisely, but maybe I am wrong.
Comment 5 Telesto 2020-07-23 18:17:55 UTC
*** Bug 134956 has been marked as a duplicate of this bug. ***
Comment 6 Telesto 2020-07-23 18:18:52 UTC
*** Bug 135071 has been marked as a duplicate of this bug. ***
Comment 7 Georgy Litvinov 2020-07-31 21:47:37 UTC
I think it is better to use new option name for new behaviour instead of using old option name which enabled in a lot of documents. In that case it is imposing new behaviour to old documents. That is the problem.
In case of my institution a lot of archived documents (academic books and journals) will display differently because of that and for all this documents users should rememeber how to manually disable AddParaSpacingToTableCells. 
Most of users I know actually decided by themselves that this behaviour is a sign that nobody care about backward compatibility and file opened in new version won't have the same layout. Luckily it could be turned off by disabling AddParaSpacingToTableCells in every document, but I really doubt that most users would have competence and time to investigate this issue and fix their documents settings.
Comment 8 Georgy Litvinov 2020-09-08 17:23:16 UTC
To revert to the previous behavior (before LO 6.4), I made a workaround (extension) that disables AddParaSpacingToTableCells in all open documents. For those whose documents look damaged in newer LO versions, this might be the solution.
https://dev.litvinovg.pro/litvinovg/docsettings/uploads/7160fe945b4bd3d86e2ab8243540b172/docSettings.oxt
Comment 9 Commit Notification 2020-09-24 18:57:09 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/38aa699f265c17548769aaa4f20e1ae35d18f202

tdf#134782 sw: split AddParaSpacingToTableCells flag in 2

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2020-09-24 18:59:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/68aec8fd57eda8c05926b7f361dc102772f2c501

tdf#134782 sw,unotools,officecfg: adapt configuration and UI

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Michael Stahl (allotropia) 2020-09-24 18:59:46 UTC
fixed on master
Comment 12 Commit Notification 2020-09-24 23:20:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/dc1ce5130a8df5017662c83be26bdada6098ee37

tdf#134782 sw: split AddParaSpacingToTableCells flag in 2

It will be available in 7.0.3.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2020-09-24 23:21:52 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/b8cbc02fbd4d8662de75d5a7a3bab6525caf766d

tdf#134782 sw,unotools,officecfg: adapt configuration and UI

It will be available in 7.0.3.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2020-09-25 01:38:56 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/d731b65d3c6b58ed98ee60488d07e5cba653ede0

tdf#134782 sw: split AddParaSpacingToTableCells flag in 2

It will be available in 6.4.8.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2020-09-25 01:39:07 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/70b2ee8ce4aa081a608bbde4f3125300675934c5

tdf#134782 sw,unotools,officecfg: adapt configuration and UI

It will be available in 6.4.8.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 László Németh 2020-09-25 07:47:26 UTC
@Michael: many thanks for fixing this!
Comment 17 Commit Notification 2020-09-28 00:17:33 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4-7":

https://git.libreoffice.org/core/commit/be467854cd4d83ae36976db9096c77640475df81

tdf#134782 sw: split AddParaSpacingToTableCells flag in 2

It will be available in 6.4.7.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 18 Commit Notification 2020-09-28 00:20:46 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-6-4-7":

https://git.libreoffice.org/core/commit/d263af834a7d6b506ac72d009f7a96cebe9e4140

tdf#134782 sw,unotools,officecfg: adapt configuration and UI

It will be available in 6.4.7.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Xisco Faulí 2020-09-28 14:46:22 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: 050e95e50d44a5cbb74bb5de481cb30551f83136
CPU threads: 4; OS: Linux 5.7; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Michael Stahl, thanks for fixing this issue!!
Comment 20 Commit Notification 2020-09-29 13:34:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0-2":

https://git.libreoffice.org/core/commit/d92c5b8c153a83997fc109b5ea7347d91bdcfd41

tdf#134782 sw: split AddParaSpacingToTableCells flag in 2

It will be available in 7.0.2.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2020-09-30 14:35:51 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-0-2":

https://git.libreoffice.org/core/commit/eed059fe08db355faead6262e597c4290cca763e

tdf#134782 sw,unotools,officecfg: adapt configuration and UI

It will be available in 7.0.2.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.