Bug 58122 - FILESAVE: XLSX - Cell RTL direction state not saved
Summary: FILESAVE: XLSX - Cell RTL direction state not saved
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:5.2.0
Keywords: filter:xlsx, possibleRegression
: 58181 (view as bug list)
Depends on:
Blocks: XLSX RTL
  Show dependency treegraph
 
Reported: 2012-12-11 09:14 UTC by Ibrahim Hammad
Modified: 2024-08-03 09:15 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
A Calc sheet to explain the case (137.23 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-12-22 08:44 UTC, Ibrahim Hammad
Details
sample xlsx file with all 3 states created in excel 2010 (8.81 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2015-04-24 19:58 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ibrahim Hammad 2012-12-11 09:14:50 UTC
Problem description: 

When a new sheet is open, by default the page direction will be from left to right. However, if you chose to change it from the buttons appearing at the top of the sheet, to become from right to Left instead, then save and close the document, and when the same document is opened again the direction shall be reverted to default from left to right.

Steps to reproduce:
1. change the direction from left to right to become from right to left
2. save and close the document
3. open the saved document again

Current behavior:

The direction of the sheet is set to default from left to right

Expected behavior:

The action of changing the direction from left to right to become from right to left should be saved and launched whenever the document is opened again.

              
Operating System: Ubuntu
Last worked in: 3.5.4 release
Comment 1 LeMoyne Castle 2012-12-21 23:29:20 UTC
Not a BASIC bug, changed title and component.

Could not figure out how to change LTR -> RTL without changing language and can't be sure whether this is Writer or Calc and also unsure whether this is text direction or text alignment.  Either way it is not a bug in BASIC language system.
Comment 2 Ibrahim Hammad 2012-12-22 08:44:29 UTC
Created attachment 71963 [details]
A Calc sheet to explain the case

Attached file will answer all questions raised on this bug.
Comment 3 Ibrahim Hammad 2012-12-22 08:49:20 UTC
I'm attaching a Libreoffice Calc sheet to explain the bug and answer the question raised. The Calc sheet once been entered by the Arabic language and the direction (as shown by the attached sheet) is changed to right to left instead of the default left to right then after saving the document and closing it, once opened again it will open by default direction from left to right making a change in the text entered and without saving the changes made before closing. The Calc file is saved as XLSX on windows partition.
Comment 4 Robinson Tryon (qubit) 2013-10-16 03:04:13 UTC
Testing on Ubuntu 12.04.3 + LO 4.1.2.3 and LO 3.5.7.2

Following OP's steps to reproduce:

(NOTE: I don't have the icons indicated in the screenshot (see xlsx file), so I had to set that up:
a) Go to Tools -> Options -> Languages -> Language Settings
b) In the 'Enhanced Language Support' section, check the box for 'Show UI Elements for Bi-Directional writing'
c) I had to hide/show the Formatting toolbar (View -> Toolbars -> Formatting) to get the new icons to appear
)

The particular icons you see may have a very different appearance to what's pictured in the sample document. The icons I see look like a fountain pen with a light green nib with left or right white arrows behind.

Here's another set of icons (see the R-T-L/L-T-R buttons mentioned at the bottom of the page):
https://help.libreoffice.org/Writer/Formatting_Bar

1. change the direction from left to right to become from right to left

I changed several rows from LTR to RTL. Note that the content in all of the cells appears to be aligning to the right of the cell (even though the formatting toolbar indicates no alignment set), but when the cell is changed to RTL, the text itself does flip in direction.

2. save and close the document

I got a warning about saving in Word format (some formatting may be lost..)

3. open the saved document again

All of the cells I had set to RTL are now set back to LTR.

----

RESULTS:

I see the same behavior in LO 4.1.2.3 and LO 3.5.7.2

I'm able to confirm the bug, but unable to confirm this is a regression.
Changing 'regression' -> 'PossibleRegression' and marking as NEW.
Comment 5 QA Administrators 2015-04-01 14:42:52 UTC Comment hidden (obsolete)
Comment 6 Yousuf Philips (jay) (retired) 2015-04-24 19:57:44 UTC
So the issue persists and its an xlsx only export problem (doesnt happen with xls or ods) as the RTL state of a cell isnt saved. XLSX has 3 states for cell text direction : Context, LTR and RTL. When LO exports to XLSX it doesnt save the LTR or RTL states.

Version: 5.0.0.0.alpha1+
Build ID: badec7478035008f514e0976a94438fe2e32dc40
TinderBox: Linux-rpm_deb-x86@45-TDF, Branch:master, Time: 2015-04-22_00:50:58
Comment 7 Yousuf Philips (jay) (retired) 2015-04-24 19:58:38 UTC
Created attachment 115079 [details]
sample xlsx file with all 3 states created in excel 2010
Comment 8 Priyanka Gaikwad 2015-05-25 13:11:47 UTC
I can reproduce this issue with
Version: 5.1.0.0.alpha1+

<alignment readingOrder="2"> was not exported
Comment 9 Priyanka Gaikwad 2015-05-26 08:41:16 UTC
*** Bug 58181 has been marked as a duplicate of this bug. ***
Comment 10 Robinson Tryon (qubit) 2015-12-09 16:46:21 UTC Comment hidden (obsolete)
Comment 11 Commit Notification 2016-01-08 17:46:51 UTC
PriyankaGaikwad committed a patch related to this issue.
It has been pushed to "master":

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

tdf#58122 FILESAVE: XLSX - Cell RTL direction state not saved

It will be available in 5.2.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:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Yousuf Philips (jay) (retired) 2016-01-19 13:11:54 UTC
Hi Priyanka,

I tested attachment 115079 [details] on master and the english cells (B3:B5) preserved the direction attributes, but the arabic cells (B6:B8) didnt.

Version: 5.2.0.0.alpha0+
Build ID: d95d9d7f908419f397941ef60ac6ced3261c9b87
CPU Threads: 2; OS Version: Linux 4.2; UI Render: default; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2016-01-19_00:40:21
Locale: en-US (en_US.UTF-8)
Comment 13 Xisco Faulí 2016-09-14 22:37:49 UTC
Hi Priyanka,
I'm setting this ticket back to NEW as it has been inactive for more than 3
months.
Feel free to assign it back to you if you're still working on this.
Regards
Comment 14 Yousuf Philips (jay) (retired) 2017-07-02 19:53:03 UTC
Seems fixed now.

Version: 6.0.0.0.alpha0+
Build ID: 34c77d4bf3d2924c4ad26728d4c491b393fa0fc8
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); Calc: group