Created attachment 53690 [details] two Arabic words and two Engish words aligned differently Problem description: I created a small document with MS Office 2010 with words aligned to the right and others aligned to the left. When I opened that document with LibreOffice, all words are aligned to the right. Steps to reproduce: 1. Create a MS Office document with 2 Arabic word and two English words each in its own line 2. Align each language words in the two directions 3. Save and open in LibO Current behavior: All words aligned to the right. Expected behavior: Words aligned to the left in MS Office 2010 should appear as aligned to the left in LibO Platform (if different from the browser): Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.2 (KHTML, like Gecko) Ubuntu/11.10 Chromium/15.0.874.106 Chrome/15.0.874.106 Safari/535.2
Please add a screen shot of the document in Word. Also - did you define the document to be RTL or that is something LibO decided during import.
Created attachment 54851 [details] sample text in different alignment and directionality The bug is a generic bug and not specific to Arabic or RTL, so I made a new attachment to help clarify the problem
Created attachment 54853 [details] a print screen of how the document looks in MS Office
Created attachment 54855 [details] a print screen of how the document looks in libreoffice
@kaplan: Screen shots attached. Libo decided about the alignment and directionality and I didn't change any thing on it.
confirmed, when opened in 3.5.0beta2, the whole document is right-aligned.
The same issue occurs with embedded pictures: what should be aligned to the left is instead aligned to right. Would this be related, or a different bug?
Commit becb244b4974609b0570e8db27d74e7e1179181c seems to be related. With LTR locale it makes the first and last lines for the test doc to be aligned left (while the wanted result is second and last). With RTL locale there's not difference.
Faisal M. Al-Otaibi committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e9911f12d1e124d1910ac2310c224e66ab365ed4 docx: fdo#43093 fdo#44029 fix the alignment when the paragraph are RTL 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.
Created attachment 82765 [details] a print screen of how the document looks in libreoffice 4.1.0RC3 The testdoc looks different (not better) in 4.1.0rc3 and master. Commit e9911f12d1e124d1910ac2310c224e66ab365ed4 isn't part of 4.1.0, so I'm not sure what the effect of that commit when opening the testdoc.
Created attachment 82822 [details] MS test file with LTR locale the patch fix the bug in this file. hmm there a problem if the file created with RTL locale in MS. libreoffice can't know what is the default values.
Faisal M. Al-Otaibi committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=aa52753785154f0e95fed559f613f5eae9105dcf DOCX:fdo#43093 fix wrong direction and alignment for RTL 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.
Please test the latest patch heavily.. this will fix many of the RTL docx issues!
Created attachment 89156 [details] docx with LTR and left aligned (Created using Word 2010 SP2) I can confirm that attachment 82822 [details] (MS-test.docx) opens correctly. Tested with both RTL\LTR locales. Build ID: bd7a4db1dc4e4785956e81f0f997257063669709, Fedora 19 (64-bit). I can also confirm it with my own files, except one combination: LTR text with left alignment. It opens correctly with LTR locale, but with RTL locale it opens as LTR but *right* aligned. I'm attaching the affected file, which was created using Word 2010 SP2.
Faisal M. Al-Otaibi committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f9e7e72c53ecbe8ee1ab060f811cb41eadfc7e1 DOCX: fdo#43093 set alignment if not already set 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.
hi, @Maxim nice test i didn't notice it before. i think it is ok now.
Created attachment 89190 [details] LTR left aligned save bug (In reply to comment #16) > hi, @Maxim > nice test i didn't notice it before. > i think it is ok now. Indeed, it's OK with Build ID: f50699c816de8e4be3433c6387e37d92aedd41a0. Thanks. Also I've tested both opening and saving functionality with many docx files from different sources, and it looks very good so far. But I found one uncovered case: It's a file originally created using Word 2013, and contains LTR left aligned text. It opens fine using the above LO build, but if I save again and reopen, it turns into RTL left aligned. If then I open the file with Word 2010 SP2, it opens as RTL right aligned. It's a bug only with this file, I can't reproduce it with other files. (The attached file edited by me using Word 2010 SP2, but the same bug happens with the original file from Word 2013.)
Since this is a very old bug and many issues at hand have been discussed here should the patches be merged and new bugs filed for the remaining issues?
Setting to Assigned since Faisal is assigned in the top info and also working on this.
i opened another Bug 71646 for the saving problem; because this bug are about opening problem.
changed the status after fixing all the related issues.
Marking as verified (testing with 4.2.4 on Debian).