[upstream] Wrong alignment while typing RTL text in Calc cell

Bug #1793130 reported by Miikka-Markus Alhonen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LibreOffice
Confirmed
High
libreoffice (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Calc normally aligns text cells to the right or to the left based on the directionality of the first character of the cell (left-alignment with English and right-alignment with Arabic). Unfortunately, this assignment happens only when the user has finished typing and pressed Enter. While typing, all text cells are aligned to the left, while for example numbers are automatically aligned to the right even in the typing phase. The same thing happens even when I’m modifying a text cell which was already automatically aligned to the right: as soon as I double-click on the cell, the text jumps to the left edge of the cell, and then I need to visually relocate the exact place I wanted to modify.

As a user, I would expect cells with an RTL character in the beginning to get aligned to the right already while the user is typing. This is what happens with many other programs, too, such as Firefox when filling out an HTML form. See the attached screenshot from Calc for an example.

Description: Ubuntu 18.04.1 LTS
Release: 18.04

  Installed: 1:6.0.3-0ubuntu1
  Candidate: 1:6.0.3-0ubuntu1
  Version table:
 *** 1:6.0.3-0ubuntu1 500
        500 http://mr.archive.ubuntu.com/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: libreoffice-calc 1:6.0.3-0ubuntu1
ProcVersionSignature: Ubuntu 4.15.0-33.36-generic 4.15.18
Uname: Linux 4.15.0-33-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.3
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Tue Sep 18 11:44:23 2018
InstallationDate: Installed on 2017-02-13 (582 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C
 SHELL=/bin/bash
SourcePackage: libreoffice
UpgradeStatus: Upgraded to bionic on 2018-05-31 (109 days ago)

Revision history for this message
In , Muhammad Bashir Al-Noimi (mbnoimi) wrote :

All the Arabic text with Right To Left layout appears in Left To Right layout during input process then back to the right layout after finishing editing process.

PS
I'm not sure if bug appears on Windows machines

Revision history for this message
In , Muhammad Bashir Al-Noimi (mbnoimi) wrote :

Created attachment 80554
Wrong layout during editing the cell

Revision history for this message
In , Muhammad Bashir Al-Noimi (mbnoimi) wrote :

Created attachment 80555
Wrong layout during editing the cell

Revision history for this message
In , Muhammad Bashir Al-Noimi (mbnoimi) wrote :

Created attachment 80556
After finish editing the cell

Revision history for this message
In , Fahad (fahad-alsaidi) wrote :

confirm in 4.1 beta 1

Revision history for this message
In , Ahmad H. Al Harthi (a-alharthi) wrote :

Fixed in LO4.1 Beta
http://www.libreoffice.org/download/pre-releases/

*** This bug has been marked as a duplicate of bug 64085 ***

Revision history for this message
In , Ahmad H. Al Harthi (a-alharthi) wrote :

Sorry, duplicate of 63546

*** This bug has been marked as a duplicate of bug 63546 ***

Revision history for this message
In , Fahad (fahad-alsaidi) wrote :

(In reply to comment #6)
> Sorry, duplicate of 63546
>
> *** This bug has been marked as a duplicate of bug 63546 ***

Ahmed¸ This is different. This bug is while typing not after hit enter key.

Revision history for this message
In , Lior Kaplan (kaplan) wrote :

Not a duplicate, verified on master (where the other bugs were closed).

Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

    Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later)
    https://www.libreoffice.org/download/

    If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior

  If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

    Update the version field
    Reply via email (please reply directly on the bug tracker)
    Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-03-16

Revision history for this message
In , Lior Kaplan (kaplan) wrote :

Still happens in 4.3.3 when layout isn't explicitly set, but hinted by direction (LTR,RTL). This happens regardless of sheet direction.

Revision history for this message
In , Barta-c (barta-c) wrote :

** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.5 or 5.1.2 https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

- Update the version field
- Reply via email (please reply directly on the bug tracker)
- Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:

1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug

3. Leave a comment with your results.

4a. If the bug was present with 3.3 - set version to "inherited from OOo";
4b. If the bug was not present in 3.3 - add "regression" to keyword

Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2016-04-16

Revision history for this message
In , Lior Kaplan (kaplan) wrote :

Still happens in LibreOffice 5.4.1.

Revision history for this message
In , Yousuf 'Jay' Philips (philipz85) wrote :

So the problem is that though RTL is enabled on a cell, the 'Default' value set to horizontal text alignment is always putting it as left aligned rather than right aligned.

Simple work around: set the cell's alignment to right.

Eike, Bubli: Would this be an easy fix?

Revision history for this message
In , Eike Rathke (erack) wrote :

That analysis is not quite correct. The default cell alignment is *non-aligned*, how content is displayed horizontally aligned depends on the actual content. When editing cell content the EditEngine is used that seems to default to left-aligned (didn't check). Setting a hard alignment attribute at the cell is not correct and will break other things. Instead, the algorithm that decides how to align for display must also be used to set the default alignment for the EditEngine when in edit mode.

Revision history for this message
In , Omer Zak (w1-0) wrote :

Still happens in:

Version: 5.4.2.2.0+
Build ID: 1:5.4.2-3~bpo9+1
CPU threads: 8; OS: Linux 4.9; UI render: default; VCL: gtk2;
Locale: en-US (en_US.utf8); Calc: group

OS: Debian 64bit Stretch (Debian 9.2, with some backported packages)

I tested with Hebrew text, while the spreadsheet is set to default (LTR) direction (Sheet > Right-To-Left is unchecked).

Revision history for this message
In , Eyalroz (eyalroz) wrote :

(In reply to Eike Rathke from comment #14)
That change seems like an easy fix for a developer who knows her/his way around the "EditEngine" - or am I wrong?

Anyway, the bug still manifests with versionn 6.1.1.2 .

Revision history for this message
Miikka-Markus Alhonen (malhonen) wrote :
Revision history for this message
Olivier Tilloy (osomon) wrote :

I can reliably reproduce the issue with libreoffice 6.0.3.2 on bionic, and with the 6.1.1.2 snap on cosmic.

This appears to be already reported upstream as https://bugs.documentfoundation.org/show_bug.cgi?id=65563.

Changed in libreoffice (Ubuntu):
status: New → Confirmed
Changed in df-libreoffice:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
In , Qa-admin-q (qa-admin-q) wrote :

Dear Muhammad Bashir Al-Noimi,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3
. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

summary: - Wrong alignment while typing RTL text in Calc cell
+ [upstream] Wrong alignment while typing RTL text in Calc cell
Revision history for this message
In , Eyalroz1 (eyalroz1) wrote :

This bug still manifests with:

Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_IL); UI: en-US
Calc: threaded

and it's not just Arabic of course.

I'm about to file a generalization of it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.