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.
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
Regression introduced by:
author Khaled Hosny <firstname.lastname@example.org> 2016-08-26 15:19:26 +0200
committer Khaled Hosny <email@example.com> 2016-08-30 17:22:41 +0000
commit cf425acfd4a5ff7c660523601964d45cbad74b53 (patch)
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
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).
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.
(In reply to Mark Hung from comment #3)
> 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.
Bug still manifests with:
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