Bug 68097 - FORMATTING: Justified alignment makes the text right aligned
Summary: FORMATTING: Justified alignment makes the text right aligned
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:4.2.0 target:4.1.4
Keywords: regression
: 68847 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-08-14 08:32 UTC by Ashok
Modified: 2013-11-20 15:52 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
test-case (6.74 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-08-14 15:09 UTC, Maxim Monastirsky
Details
screenshot (Fedora 19) (71.04 KB, image/png)
2013-08-14 15:12 UTC, Maxim Monastirsky
Details
Sample Calc file with formatting problem (9.42 KB, application/vnd.oasis.opendocument.spreadsheet)
2013-08-15 09:31 UTC, Ashok
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ashok 2013-08-14 08:32:24 UTC
Enter some text is a cell and select justified alignment (Ctrl+J).
If the width of the column is more than the length of the text entered then the text is pushed to the right (like right alignment) which should not occur.


              
Operating System: Windows 8
Version: 4.1.0.4 release
Comment 1 Jean-Baptiste Faure 2013-08-14 12:47:57 UTC
I do not reproduce under Linux (Ubuntu 12.04 x86-64). 

What kind of text did you use for your test? Right alignment is the default alignment for numbers while left alignment is the default alignment for text.

Could you attach a test document with which you have this problem ?

Best regards. JBF
Comment 2 Maxim Monastirsky 2013-08-14 13:12:00 UTC
Reproducible with LO 4.1.0.4 under Windows 7\Ubuntu 13.10\Fedora 19. The strange thing is that if Auto SpellCheck is on, and the cell contains a spelling error, it will align correctly. But as soon as Auto SpellCheck turned off, the wrong alignment shows again.
Comment 3 Jean-Baptiste Faure 2013-08-14 14:35:10 UTC
Not reproducible for me under Linux, even with auto-spellcheck turned off.
Comment 4 Maxim Monastirsky 2013-08-14 15:09:52 UTC
Created attachment 84055 [details]
test-case

@JBF: Please try with the attached spreadsheet.
Comment 5 Maxim Monastirsky 2013-08-14 15:12:55 UTC
Created attachment 84056 [details]
screenshot (Fedora 19)
Comment 6 Jean-Baptiste Faure 2013-08-14 15:51:38 UTC
Oups, sorry, I read "centered" (why? ;-) ) instead of "justified". That said what should mean justified for a single word in a cell as in your example? Please try with several words in order to have several lines in the same cell and compare left align, right align and justified.

Best regards. JBF
Comment 7 Maxim Monastirsky 2013-08-15 05:15:40 UTC
@JBF: I agree that justified alignment is useless for one-line text, but still it's a bug (although it might be a good reason to lower the priority). The text should align to left in that case. You can observe the correct alignment, if you open Writer, set the alignment to 'Justify' and type some text - the text will align to left. Same should happen in Calc. Anyway you should agree that turning Auto SpellCheck on and off, shouldn't have any effect on text alignment.
Comment 8 Ashok 2013-08-15 09:27:51 UTC
If the length of the text entered in a Full Justified cell is less than the column width then the text should be Left justified and not right justified.  This problem was not there in the previous release.
Comment 9 Ashok 2013-08-15 09:31:05 UTC
Created attachment 84092 [details]
Sample Calc file with formatting problem

The attachments shows cells with full justified showing text with different alignments.
Comment 10 Jean-Baptiste Faure 2013-08-15 10:38:47 UTC
Indeed, in LO 4.0.5.1, justified text shorter than the cell length is left aligned while it is right aligned in LO 4.1. 
In LO 4.0.5.1 auto spellcheck does not affect this behavior while it does in LO 4.1. So I added the keyword "regression".

Best regards. JBF
Comment 11 Maxim Monastirsky 2013-08-15 11:46:58 UTC
Here is a workaround:
Go to Tools->Options...->Language Settings->Languages and enable 'Show UI elements for Bi-Directional writing', then you'll have RTL\LTR switch buttons on the Formatting toolbar. Now select the affected cell, and click on the LTR button (even though it's already pushed, just click on it again).
Comment 12 Ashok 2013-08-15 13:20:48 UTC
Thanks for the workaround

Ashok
Comment 13 Maxim Monastirsky 2013-09-02 15:59:47 UTC
*** Bug 68847 has been marked as a duplicate of this bug. ***
Comment 14 Brian 2013-10-25 12:45:07 UTC
Confirming that this still exists in 4.1.3 on Linux.
Comment 15 Commit Notification 2013-11-02 18:45:43 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "master":

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

no default LTR mode does not mean RTL, fdo#68097



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 16 Commit Notification 2013-11-02 22:21:57 UTC
Markus Mohrhard committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=de67c6d6159c0801b0959d77c2c8a8b7fb148b03&h=libreoffice-4-1

no default LTR mode does not mean RTL, fdo#68097


It will be available in LibreOffice 4.1.4.

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.