Bug Hunting Session
Bug 46186 - RTL: RTL table reverses its direction on LTR page
Summary: RTL: RTL table reverses its direction on LTR page
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
3.5.4 release
Hardware: All All
: high normal
Assignee: Karthikeyan Krishnamurthi
URL:
Whiteboard: BSA target:4.1.0 target:4.2.0
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-16 10:14 UTC by Ran Rutenberg
Modified: 2013-12-15 22:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Presentation with LTR page setting and a RTL table (opens incorrectly as a LTR table) (13.99 KB, application/vnd.oasis.opendocument.presentation)
2012-02-16 10:14 UTC, Ran Rutenberg
Details
Screenshot of libreoffice window before closing it & reopening again. (370.52 KB, application/zip)
2012-12-16 07:02 UTC, Karthikeyan Krishnamurthi
Details
Workaround example of this bug (12.75 KB, application/vnd.oasis.opendocument.presentation)
2012-12-17 05:22 UTC, sasha.libreoffice
Details
Bug reproduced (43.72 KB, image/png)
2013-02-12 05:50 UTC, gokul
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ran Rutenberg 2012-02-16 10:14:32 UTC
Created attachment 57171 [details]
Presentation with LTR page setting and a RTL table (opens incorrectly as a LTR table)

Problem description: When saving a presentation with a table which direction is opposite to the page direction (eg. RTL table in a LTR page or vice versa), the table direction is not saved. When you open the document again, the table switches back to the page's direction (eg. from RTL to LTR)

Steps to reproduce:
1. Create an empty presentation. The default page direction is LTR.
2. Create a table and switch its direction to RTL and write some data in it.
3. Save and exit.
4. Open the file.
5. The table switched its direction back to LTR

Current behavior:
Table swithes back to the page's direction.

Expected behavior:
The table should stay with the defined table direction.

Platform (if different from the browser): 
              
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:10.0.1) Gecko/20100101 Firefox/10.0.1
Comment 1 sasha.libreoffice 2012-04-03 06:27:38 UTC
Thanks for bugreport
Sorry, I can not reproduce this bug in 3.3.4 and 3.5.1 on Fedora 64 bit
May be fixed in 3.5.1 or I do something wrong (used Right-to-left icon on "Text formatting" toolbar)
Comment 2 Ahmad Harthi 2012-06-26 00:26:31 UTC
I confirm this using LibreOffice 3.5.4 on Windows 7 Basic.
Comment 3 Karthikeyan Krishnamurthi 2012-12-16 07:02:00 UTC
Created attachment 71575 [details]
Screenshot of libreoffice window before closing it & reopening again.

This zip file contains two screenshots that explains the bug.
Comment 4 sasha.libreoffice 2012-12-17 05:20:55 UTC
Thanks for additional testing.
Reproduced in 3.6.4 on RFR 17 64 bit
For reproducing this bug we should select frame around of table, not content of table.
It is a bug. Because if application allows changing settings of something, it should save this setting correctly.

Workaround: use style for assign RTL direction for frame around table (tab "Alignment")
Comment 5 sasha.libreoffice 2012-12-17 05:22:14 UTC
Created attachment 71626 [details]
Workaround example of this bug
Comment 6 Karthikeyan Krishnamurthi 2013-01-20 05:10:29 UTC
I am working on this bug.
Comment 7 Karthikeyan Krishnamurthi 2013-01-22 21:36:02 UTC
  In Writer when we follow the same procedure as told by Ran Rutenberg in this thread's first comment,  The table not changes its layout, but the cursor, text & the individual cells do.  I think this is the proper behaviour or a RTL table in LTR document & vice versa.  

  And i think it is obvious that changing the text directon of a paragraph(LTR, RTL tool bar icons) should not change the table's layout.
Comment 8 Not Assigned 2013-02-09 11:29:54 UTC
Gokul committed a patch related to this issue.
It has been pushed to "master":

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

Fixes fdo#46186, The Table Remains in the defined writing mode.



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 9 Lior Kaplan 2013-02-09 17:32:25 UTC
I couldn't reproduce this bug with 3.6.5 or 4.0.0 according to Ran's instructions. Regarding comment 4, I don't see any way to switch the tables directionality other than changing its style. So I'm not sure why do you consider this a workaround. If there's another way I've missed, let me know.
Comment 10 gokul 2013-02-12 05:50:56 UTC
Created attachment 74666 [details]
Bug reproduced

I am able to reproduce it in 3.6.5 as well as in 4.0. 

Steps To Reproduce:
1. Create an Empty Slide in impress, Create an LTR table of desired rows and column.
2. Add some entries in the table cells.
3. Select the table by dragging the area around the table to select.
4. Then Change it to RTL.

You will find the table to be mirrored, But, RTL table has to just change the styles in the cells inside table i.e) the cells has to be in RTL, it should not mirror the table. also when you save this document and reopen it You will find the table back to LTR.

Check the Attached Screenshot.
Comment 11 Lior Kaplan 2013-02-12 13:54:25 UTC
I think the term "rtl table" is ambiguous and the current behaviour is misleading.

Behaviours:
1. Changing the table to be RTL, means changing the column order, so the first is now the right most instead of the left most.
2. Changing the cells (one or more) to RTL affects only on that specific cell.

Our problem is what to do when selecting all the cells in the table - do we want behaviour #1 or #2? On top of that #1 loses it's column order change upon save and reopen (although the cell are still RTL on reopen). This bug in #1 still occurs on master, hence I'm reopening this issue.

On a personal note, I fail to see how the patch changes the described problem. But that's might be me and not the patch, maybe another opinion is needed.
Comment 12 abdulmajeed 2013-06-25 20:30:24 UTC
I think this not correct behavior it should do nothing.
also i think it's better to follow writer 
for example this is what impress do for changing  to RTL

LTR
1 2 3
4 5 6

RTL
3 2 1
6 5 4
so this is not correct, bad idea to mirror the table

what i think we should change is 
1- prevent impress form mirroring the table
2- for this bug the correct behavior is do nothing (same as writer)

so the user will be able to change the text direction inside the cell ONLY

so please i need an other opinion so we can decide
Comment 13 abdulmajeed 2013-06-25 20:34:39 UTC
also 
i'm not sure if @Gokul patch do something so if someone knows plz tell me :)
Comment 14 abdulmajeed 2013-06-26 08:36:23 UTC
i have changed my opinion :) now what i think it should do is 

1-for this bug the correct action should be changing the text direction inside the cells ONLY
2- you can mirror the table through alignment tab page only (same as writer)
Comment 15 Commit Notification 2013-06-27 11:43:39 UTC
Jan Holesovsky committed a patch related to this issue.
It has been pushed to "master":

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

fdo#46186: Sync the internal representation of the table with its appearance.



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.