Bug 114193 - Impress doesnt change behaviour when launched in RTL
Summary: Impress doesnt change behaviour when launched in RTL
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.3.7.1 rc
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
 
Reported: 2017-12-01 10:05 UTC by Yousuf Philips (jay) (retired)
Modified: 2018-09-17 20:28 UTC (History)
2 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-12-01 10:05:52 UTC
steps:
1. open impress with an RTL locale enabled
2. right click on the title slide placeholder textboxes and select paragraph
3. in alignment tab, notice that text direction is set to LTR rather than RTL
4. add a new slide and notice that the text direction of the content textbox is also LTR
5. switch to 'Titl, Content' layout
6. notice that bullet point is on the left side when it should be on the right

This is a regression as it worked fine in 5.2.7.

Version: 6.0.0.0.beta1
Build ID: 97471ab4eb4db4c487195658631696bb3238656c
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: ar-SA (en_US.UTF-8); Calc: group threaded
Comment 1 Xisco Faulí 2017-12-01 22:11:43 UTC
Regression introduced by:

author	Khaled Hosny <khaledhosny@eglug.org>	2016-08-26 15:19:26 +0200
committer	Khaled Hosny <khaledhosny@eglug.org>	2016-08-30 17:22:41 +0000
commit	cf425acfd4a5ff7c660523601964d45cbad74b53 (patch)
tree	80c4ff111dd350d0b5d2be9aa4eeb2b73c1f46ec
parent	3e289cf10b36f423ae6626296d739291850aa53b (diff)
tdf#56403: Text is right aligned in RTL locales
Draw/Impress is setting writing mode to RTL (which in turn sets text
alignment to right) if the current locale is RTL one. This does not make
sense at all since it means document prepared on a LTR locale and
contains LTR text will appear right aligned on RTL locales.

It would have slightly more sense if SetDefaultWritingMode() actually
just set a default (for e.g. new documents), but that is not the case
here as it affects all documents.

This was introduced in 2c32696a04bc195c8ce61a0df6dcafb8c0c49fe0 with a
branch merge and no further explanation.

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Khaled Hosny
Comment 2 Khaled Hosny (inactive) 2017-12-01 22:24:20 UTC
Well the old behavior was certainly buggy, what needs to be done now is this:

> It would have slightly more sense if SetDefaultWritingMode() actually
> just set a default (for e.g. new documents), but that is not the case
> here as it affects all documents.

No idea how to do that, though.

Personally I like how text direction works in Google Docs; if you start writing in Arabic then the paragraph direction and alignment are set to RTL and right, respectively, and vice versa. This makes it locale-independent and sensitive to the actual content being written (i.e. just because I use an Arabic locale does not mean every single document I wright is RTL, and the reverse is also true).
Comment 3 Mark Hung 2018-02-25 05:30:05 UTC
Hi,

Maybe code removed in 2c32696a04bc195c8ce61a0df6dcafb8c0c49fe0 
can be moved to  SdDrawDocument::NewOrLoadCompleted in drawdoc.cxx, so that only new document is affected. It might be an easyhack.
Comment 4 Mark Hung 2018-02-25 06:54:01 UTC
(In reply to Mark Hung from comment #3)
> Hi,
> 
> Maybe code removed in 2c32696a04bc195c8ce61a0df6dcafb8c0c49fe0 
> can be moved to  SdDrawDocument::NewOrLoadCompleted in drawdoc.cxx, so that
> only new document is affected. It might be an easyhack.

Ignore me in comment #3 - it can't differ load from new despite its name.
Comment 5 Eyal Rozenberg 2018-09-17 20:28:16 UTC
Bug still manifests with:

Version: 6.1.1.2
Build ID: 5d19a1bfa650b796764388cd8b33a5af1f5baa1b
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group threaded