Bug 56403 - RTL UI: with RTL locales presentations appear with text align to the right instead of to the left
Summary: RTL UI: with RTL locales presentations appear with text align to the right in...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
(earliest affected)
3.3.0 release
Hardware: Other All
: medium normal
Assignee: Khaled Hosny
Whiteboard: target:5.3.0
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
Reported: 2012-10-25 17:14 UTC by Lior Kaplan
Modified: 2016-08-30 17:25 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Libreoffice conference 2012 template (490.67 KB, application/vnd.oasis.opendocument.presentation)
2012-10-25 17:14 UTC, Lior Kaplan

Note You need to log in before you can comment on or make changes to this bug.
Description Lior Kaplan 2012-10-25 17:14:15 UTC
Created attachment 69081 [details]
Libreoffice conference 2012 template

Opening a presentation done in LTR interface in an RTL interface makes the text appear align to the right, although it used to show align to the left.

Saving the file, makes this change permanent, so even when opening again with LTR interface the text is align to the right. Compering both presentation in flat ODP format show the difference is the addition: fo:text-align="end" to style:paragraph-properties.

Way to reproduce:
1. Open the attached presentation with RTL UI (notice that just setting SAL_RTL_ENABLED isn't enough to trigger the bug).
2. Notice the text in the bullet lists is align to the right.
3. Save the file (preferably as a new file).
4. Open the new file with LTR UI and see that the text is still right aligned.
5. Compare with original presentation where the text is left aligned.
Comment 1 Lior Kaplan 2012-10-25 17:15:47 UTC
Reproduced during Libreoffice conference 2012, changing status to new.
Comment 2 Abdulaziz Ayed 2013-01-23 08:43:59 UTC
the problem still exist (Version .

**and this related to locale setting not about the UI.

to reproduce:

1.open the attached file with (RTL | LTR) interface.
2.go to Tools->options->languageSettings->languages->localeSettings.
3. choose any RTL language (Arabic).
4.save then close.
5.reopen the file.

@ I work under Ubuntu Release 12.10 (quantal) 64-bit GNOME 3.6.0
Comment 3 Lior Kaplan 2013-02-14 18:46:09 UTC
Setting LC_CTYPE=he_IL.UTF-8 is enough for me to reproduce the problem.
Comment 4 gokul 2013-03-31 09:37:34 UTC
This bug is also present in writer. I reproduced it in master.
Comment 5 Abdulaziz Ayed 2013-05-28 09:49:27 UTC
(In reply to comment #4)
> This bug is also present in writer. I reproduced it in master.

for me, I can reproduceed it in master just in impress and draw. nothing happened in writer .
Comment 6 QA Administrators 2015-04-01 14:40:57 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2015-04-22 14:37:22 UTC
With Hebrew UI, the text was left-aligned just as with Eng. UI. Closing as WFM.

Win 7 Pro 64-bit, Version:
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Comment 8 Lior Kaplan 2015-08-27 15:47:36 UTC
Still happens in 5.0.1 (LibO 5.0.1 packages for Debian GNU/Linux, 64bit)

Notice the test in step #4 is with left to right interface, where the original file is aligned to the left, while the saved file is aligned to the right.
Comment 9 Lior Kaplan 2015-08-27 15:47:50 UTC Comment hidden (obsolete)
Comment 10 Khaled Hosny 2016-08-26 13:17:58 UTC
I tracked down this issue (before seeing this bug report) and it seems Draw/Impress set text alignment to right if the current locale is RTL one, which makes no sense at all. This was introduced back in 2003 when a branch with obscure name with merged and no explanation is provided.

https://gerrit.libreoffice.org/gitweb?p=core.git;a=commitdiff;h=2c32696a04bc195c8ce61a0df6dcafb8c0c49fe0 (search for SetDefaultWritingMode).

Iā€™m tempted to consider this just wishful thinking from whoever wrote this and submit a patch that remove the corresponding lines.
Comment 11 Khaled Hosny 2016-08-26 13:28:14 UTC
Submitted a patch to gerrit https://gerrit.libreoffice.org/#/c/28411/
Comment 12 Commit Notification 2016-08-30 17:24:12 UTC
Khaled Hosny committed a patch related to this issue.
It has been pushed to "master":


tdf#56403: Text is right aligned in RTL locales

It will be available in 5.3.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:

Affected users are encouraged to test the fix and report feedback.