Bug 106234

Summary: EDITING: centered tabulator not effective in justified paragraph with line breaks
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: WriterAssignee: László Németh <nemeth>
Status: VERIFIED FIXED    
Severity: minor CC: ilmari.lauhakangas, libreoffice, xiscofauli
Priority: medium Keywords: bibisectNotNeeded, regression
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bz.apache.org/ooo/show_bug.cgi?id=45491
https://bz.apache.org/ooo/show_bug.cgi?id=13507
Whiteboard: target:7.1.0 target:7.0.0.1
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 107831    
Attachments: An example document
Screenshot of the problem in LO 5.2.3
Similar setup in MSO 2013

Description Gabor Kelemen (allotropia) 2017-02-28 13:56:56 UTC
Created attachment 131537 [details]
An example document

Attached document contains a paragraph with two centered tabs, line breaks and justified alignment.

In the lines with line breaks at the end, the second tab stop does not seem to work as expected: the text falling under it is justified, not centered.

In case of the first tab stop the text is centered. If I add one more tab stop, the text under the second gets centered correctly.

In the last line which ends with a paragraph break the text under the second tab stop is centered as well.

This happens with left and right aligned kinds of tab stops as well.

In Word 2013 this feature works like this: the text under both tab stops is centered, no matter the line break and the justified setting.
Comment 1 Gabor Kelemen (allotropia) 2017-02-28 13:58:33 UTC
Created attachment 131538 [details]
Screenshot of the problem in LO 5.2.3
Comment 2 Gabor Kelemen (allotropia) 2017-02-28 14:03:04 UTC
Created attachment 131539 [details]
Similar setup in MSO 2013
Comment 3 Buovjaga 2017-03-04 18:23:50 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: ed0e8f970ff552e75222dc92ed2879aa3b3e5851
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 4th 2016

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 4 QA Administrators 2018-03-05 03:38:33 UTC Comment hidden (obsolete)
Comment 5 Thomas Lendo 2018-03-05 21:54:03 UTC
Still repro.

Version: 6.1.0.0.alpha0+
Build ID: 77db2da61658906c354084b13a95f1102949fbd0
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); Calc: group
2018-03-05
Comment 6 QA Administrators 2019-03-06 03:42:38 UTC Comment hidden (obsolete)
Comment 7 NISZ LibreOffice Team 2019-03-11 12:57:52 UTC
Still reproducible with:
Version: 6.3.0.0.alpha0+
Build ID: 65438bcda46bab4f2fe6fb555f44aace45e11e5e
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: threaded
Comment 8 Gabor Kelemen (allotropia) 2019-07-23 09:37:20 UTC
So I just found that setting the Options - Writer - Compatibility - "Expand word space on lines with manual line breaks in justified paragraphs" option to false solves this issue.
I guess we can set this in our default config.
Comment 9 László Németh 2020-06-16 09:38:26 UTC
In fact, this is a regression since 2004, because the fix for i13507 was modeled after Word's justification, but not in the case of not left-aligned tabs unintentionally.

Proposed fix: https://gerrit.libreoffice.org/c/core/+/96438
Comment 10 Commit Notification 2020-06-16 16:33:26 UTC
László Németh committed a patch related to this issue.
It has been pushed to "master":

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

tdf#106234 sw: don't justify after centered tabs

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 Commit Notification 2020-06-17 03:26:00 UTC
László Németh committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/0d963060b612977139138d25b9e4649f84800a28

tdf#106234 sw: don't justify after centered tabs

It will be available in 7.0.0.1.

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 12 Xisco Faulí 2020-06-24 10:50:09 UTC
Verified in

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

@László Németh, thanks for fixing this issue!!
Comment 13 László Németh 2020-06-24 16:45:23 UTC
(In reply to Xisco Faulí from comment #12)

@Xisco: thanks for the verification!