Bug 107567 - Text previews in Paragraph dialog not showing correctly for RTL
Summary: Text previews in Paragraph dialog not showing correctly for RTL
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:6.1.0
Keywords:
Depends on:
Blocks: RTL-CTL Paragraph-Dialog
  Show dependency treegraph
 
Reported: 2017-05-02 16:26 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-01-26 12:38 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2017-05-02 16:26:06 UTC
Steps:
1) Open Writer with CTL enabled in the options dialog
2) Click the 'Right-to-Left' button in the toolbar
3) Open Paragraph dialog and switch to Indents & Spacing tab and notice the preview is incorrect

Version: 5.4.0.0.alpha0+
Build ID: f0340e3dca1091accdb71e0c566b96cdf9e0f791
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-21_13:34:48
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 V Stuart Foote 2017-05-02 17:07:27 UTC
@Jay, any better if you use a build of master with Khaled's http://cgit.freedesktop.org/libreoffice/core/commit/?id=e3b7ef45d4364fda15691b5748a9a88bc908afc6 done for bug 107204 that posted 2017-04-27?
Comment 2 Yousuf Philips (jay) (retired) 2017-05-02 19:30:05 UTC
@Stuart: Tested the latest available daily build and no difference.
@Khaled: Is your patch intended to fix this issue?

Version: 5.4.0.0.alpha0+
Build ID: 74ccd02eda2d6325a27266fd935aba29b3d75020
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-27_23:51:14
Locale: en-US (en_US.UTF-8); Calc: group
Comment 3 V Stuart Foote 2017-05-02 19:48:26 UTC
Sorry, I don't think Khaled's work would have impacted this. Typically, I misread the issue.

Beleive it is just the *preview* for the Paragraph dialog that is incorrectly formatted.

The representation of the "Indents & Spacing" does not respond to the font direction assigned to the paragraph.  While the "Alignment" tab does respond to the LTR/RTL setting of the paragraph.

Are the actual indentations: "Before text", "After text" and "First line" correct for the given script?

If they're correct it is just cosmetic to the GUI rather than functional.
Comment 4 Yousuf Philips (jay) (retired) 2017-05-02 21:21:32 UTC
(In reply to V Stuart Foote from comment #3)
> Beleive it is just the *preview* for the Paragraph dialog that is
> incorrectly formatted.

Yes just the preview.

> The representation of the "Indents & Spacing" does not respond to the font
> direction assigned to the paragraph.  While the "Alignment" tab does respond
> to the LTR/RTL setting of the paragraph.

Well actually the Alignment tab is also likely not responding to the LTR/RTL setting you just cant see it as it is affected by the alignment option, which in RTL is set to right.

> Are the actual indentations: "Before text", "After text" and "First line"
> correct for the given script?

Yep those seem fine either way as they are direction neutral.

> If they're correct it is just cosmetic to the GUI rather than functional.

Yes its just cosmetic to the rendering of the preview.
Comment 5 Buovjaga 2017-05-07 13:48:08 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha1+
Build ID: 6e4cba99bb35e6697b94309eedd1a08ebea2dc68
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on May 5th 2016

Arch Linux 64-bit
LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 6 Jim Raykowski 2017-10-21 00:15:59 UTC
Is it OK if I take this one?
Comment 7 Jim Raykowski 2017-10-21 21:06:27 UTC
I couldn't resist :-)

link to patch is here
https://gerrit.libreoffice.org/#/c/43678/
Comment 8 Yousuf Philips (jay) (retired) 2017-10-21 21:10:38 UTC
(In reply to Jim Raykowski from comment #7)
> I couldn't resist :-)

Glad that you didnt resist. :D
Comment 9 Omer Zak 2017-11-14 12:10:33 UTC
Still happens in:

Version: 6.0.0.0.alpha1+
Build ID: 9050854c35c389466923f0224a36572d36cd471a
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.utf8); Calc: group

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)


A similar bug appears also in Justification tab of the same dialog (see: https://bugs.documentfoundation.org/show_bug.cgi?id=113823).
Comment 10 Jim Raykowski 2017-11-15 00:35:47 UTC
(In reply to Omer Zak from comment #9)
> Still happens in:
> 
> Version: 6.0.0.0.alpha1+
> Build ID: 9050854c35c389466923f0224a36572d36cd471a
> CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk3; 
> Locale: en-US (en_US.utf8); Calc: group
> 
> OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)
> 
> 
> A similar bug appears also in Justification tab of the same dialog (see:
> https://bugs.documentfoundation.org/show_bug.cgi?id=113823).

Hi Omer,

This patch hasn't been merged yet. It includes fixes for this bug report and tdf#98211, tdf#98212, tdf#113275. To test it you will need to pull it from the following link and then build. 

https://gerrit.libreoffice.org/#/c/43678/
Comment 11 Buovjaga 2017-11-15 08:30:21 UTC
(In reply to Jim Raykowski from comment #10)
> This patch hasn't been merged yet. It includes fixes for this bug report and
> tdf#98211, tdf#98212, tdf#113275. To test it you will need to pull it from
> the following link and then build. 
> 
> https://gerrit.libreoffice.org/#/c/43678/

Looks like there is a merge conflict with the patch.
Comment 12 Jim Raykowski 2017-11-25 18:52:29 UTC
Hi All,

Here is a reworked patch for this bug. No merge conflict.

https://gerrit.libreoffice.org/#/c/45273/
Comment 13 Buovjaga 2017-12-18 10:05:40 UTC
(In reply to Jim Raykowski from comment #12)
> Hi All,
> 
> Here is a reworked patch for this bug. No merge conflict.
> 
> https://gerrit.libreoffice.org/#/c/45273/

I cherry picked it and confirm the fix works.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: b2d87e00ed93db79ba64a9bef83e20d44c69dd7c
CPU threads: 8; OS: Linux 4.14; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on December 18th 2017
Comment 14 Commit Notification 2018-01-26 07:11:47 UTC
Jim Raykowski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=122da2eea23faf6916c3f3b9e1895f5c404b26c7

tdf#107567 et al. Paragraph dialog preview windows fixes

It will be available in 6.1.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 Samuel Mehrbrodt (allotropia) 2018-01-26 07:22:50 UTC
Can someone please verify the fix? Then we can backport this to 6.0 too.
Comment 16 Buovjaga 2018-01-26 12:38:23 UTC
(In reply to Samuel Mehrbrodt (CIB) from comment #15)
> Can someone please verify the fix? Then we can backport this to 6.0 too.

I verified it in December, see comment 13