Bug Hunting Session
Bug 112878 - RTL: Writer paragraph styles set to left alignment, which isnt usable for RTL languages
Summary: RTL: Writer paragraph styles set to left alignment, which isnt usable for RTL...
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTL-CTL Writer-Styles-Paragraph
  Show dependency treegraph
 
Reported: 2017-10-04 15:51 UTC by Yousuf Philips (jay) (retired)
Modified: 2019-01-26 13:55 UTC (History)
3 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-10-04 15:51:50 UTC
steps:
1. open writer
2. switch to RTL
3. type some text
4. set paragraph style to Heading 1
5. it has switched it back to LTR

The switching doesnt happen only if you set the user locale to a RTL language.

Version: 6.0.0.0.alpha0+
Build ID: 6e3e4cd38b56d432c48cd7217885974e3f0519fd
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Lior Kaplan 2017-10-04 21:21:03 UTC
Happens in 5.4.1 as well (and if I remember in any LibreOffice version).
Comment 2 Omer Zak 2017-11-14 12:45:12 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)


Tools > Options > Language Settings > Languages:
  User interface: default - English (USA)
  Locale setting: Default - English (USA)
  Complex text layout: Hebrew

The same problem appears also when I set Locale setting to: Hebrew.

When the User interface was set to Hebrew (with locale set to Hebrew as well), Heading 1 respected RTL directionality of the paragraph.
I tested also with default - English (USA) locale, Heading 1 respected RTL directionality as well. When I write a LTR paragraph in this Hebrew UI + English (default) locale, and set it to Heading 1, Heading 1 forces it to RTL directionality.
Comment 3 Eyal Rozenberg 2018-09-30 18:13:33 UTC
It is not clear to me that this is a bug.

Manually setting the direction of a paragraph to RTL does not mean changing the _document_ direction to RTL. And an LTR document's H1 paragraphs are in LTR direction. Changing the style removes previous direct formatting.

I realize it's annoying, but perhaps the real issue is that one cannot easily indicate "I want to write an RTL document", except by changing the default paragraph style to RTL?

Changing this back to UNCONFIRMED for now - but this is open for discussion of course.
Comment 4 Lior Kaplan 2018-09-30 18:45:28 UTC
(In reply to Eyal Rozenberg from comment #3)
> Changing this back to UNCONFIRMED for now - but this is open for discussion
> of course.

It's been confirmed by 3 people. Please don't change that status.
Comment 5 Eyal Rozenberg 2018-09-30 19:01:48 UTC
What's been confirmed is that the described behavior occurs. However, it's not been established - neither by the reporter nor by others - that this behavior is a bug. 

However, since Lior has indicated he believes this is buggy behavior, I'll not change the status to UNCOMFIRMED or INVALID, and instead we'll discuss this in the RTL-CTL telegram group.
Comment 6 Xisco Faulí 2018-10-17 15:37:42 UTC
(In reply to Lior Kaplan from comment #4)
> (In reply to Eyal Rozenberg from comment #3)
> > Changing this back to UNCONFIRMED for now - but this is open for discussion
> > of course.
> 
> It's been confirmed by 3 people. Please don't change that status.

Any chance you could try it in LibreOffice 3.3 ?
Comment 7 Justin L 2019-01-26 13:55:44 UTC
I fully agree with Eyal that this is not a bug. Pressing the RTL paragraph button does not "switch to RTL" for the document, but only for the paragraph.

There are several more appropriate ways to "switch to RTL"
1.) setting the locale to an RTL language is best for RTL writers/speakers since this will affect every new document automatically.
2.) setting the default paragraph style to RTL is probably best way to specify RTL for a specific document.
3.) setting each page style to RTL (although that has been buggy if exporting to MS formats).

Since option #2 is extremely easy to do (for those who normally want to create LTR documents and thus don't choose option #1), I don't see any reason for any "enhancement" requests.

> The switching doesnt happen only if you set the user locale to a RTL language.
This is not exactly true. Now the switching happens if you specify LTR for a paragraph - in which case the Heading 1 switches it back to RTL.

Since this is a Yousuf bug report, there is probably something that is missing in the conversation so far - because he always reports real bugs. Perhaps he is  requesting for the paragraph's RES_FRAMEDIR property not be cleared when a "inherit from environment" paragraph style is applied. If there is precedence for keeping "sticky" settings for other paragraph properties, then I could consider changing this to be a valid enhancement request. Something like this could be helpful for people who mix LTR and RTL content in the same document.