Bug 138862 - Calc sheet cells keep direction despite sheet direction switch
Summary: Calc sheet cells keep direction despite sheet direction switch
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.0.3.1 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsDevAdvice
Depends on:
Blocks: RTL-CTL
  Show dependency treegraph
 
Reported: 2020-12-12 17:06 UTC by Eyal Rozenberg
Modified: 2023-12-10 06:14 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2020-12-12 17:06:51 UTC
Description:
The default cell style has the cell direction follow the superordinate object's direction. This is fine and good. However, when one switches a sheet's direction using the menus (toggling Sheet | Right-To-Left) - the cells keep the same direction as before. 

This is a bug in the sense that the user rightly expects the superordinate object of cells to be the sheet, which has just been switched. And, in fact, a switching of the sheet direction is all that should be needed for cells' direction to become appropriate for the new sheet direction (rather than requiring any further action).

What seems to be happening that cells' superordinate object is a _page_. I intend to open a separate bug about this fact, but: Either this needs to change, or the page style must change for the current sheet when one toggles "Sheet Left to Right", so that the cells switch direction as well.




Steps to Reproduce:
1. Create new workbook
2. Highlight an arbitrary cell and check its direction
3. On the menus, toggle Sheet | Left-to-Right
4. Highlight another cell, then come back to the cell you highlighted in (2.)
5. Check the highlighted cell's direction

Actual Results:
The direction remains the same between 2 and 5.

Expected Results:
The direction switches between 2 and 5.


Reproducible: Always


User Profile Reset: No



Additional Info:
I'm pretty sure this bug goes way back.
Comment 1 Eleonora Govallo 2021-07-21 22:07:49 UTC
Hello!
Please add your hardware, because bug doesn't repro in my.
Comment 2 Eyal Rozenberg 2021-07-22 22:07:29 UTC
(In reply to Eleonora Govallo from comment #1)

Intel Core i5-7600K.

Still seeing this 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

OS is Devuan GNU/Linux Chimaera.
Comment 3 QA Administrators 2021-07-23 03:38:03 UTC Comment hidden (obsolete)
Comment 4 Roman Kuznetsov 2021-07-23 12:59:01 UTC
Eyal, do you think cell style and visual sheet attributes are linked? I don't think so.

Your report is more enhancement than really bug. And I'm not sure it can be implemented.

Let's ask design team also
Comment 5 Eyal Rozenberg 2021-07-23 16:31:08 UTC
(In reply to Roman Kuznetsov from comment #4)
> Eyal, do you think cell style and visual sheet attributes are linked? I
> don't think so.

Direction is not just a visual attribute, it's a semantic one. Also, regardless - cell style and sheet style are linked. Once styles support any "inherit" capabilities, then the style of an object is linked to that of its superordinate object. The superordinate object of a cell is the sheet. So, it must inherit the sheet direction.


> Your report is more enhancement than really bug.

It's a bug, because the cell style literally says it's inheriting the superordinate object direction. 

Also, users expect these directions to change when they change a sheet to be RTL. They do not expect to need to also manually change the cell directions.
Comment 6 Heiko Tietze 2021-08-12 07:54:36 UTC
Sheet > LTR (only enabled if tools > options > language: CTL is checked) switches the sheet direction so column A starts at right.
Cells take a default style with the language defined in tools > options > language > default language for documents. If you set this to Hebrew you cell content in RTL.

Don't see what we can improve here.
Comment 7 Eyal Rozenberg 2021-08-13 14:47:00 UTC
> Sheet > LTR (only enabled if tools > options > language: CTL is checked) switches the sheet direction so column A starts at right.

That's true and appropriate.

> Cells take a default style with the language defined in tools > options > language > default language for documents. 

A style is not a language. The cell's Text Direction direction is not a cell's language. A cell's direction is independent of the default language - it is "Use superordinate object settings".

> If you set this to Hebrew you cell content in RTL.

You can't set a cell's text direction to "Hebrew". 

Also, a user should not have to set the default language for documents to Hebrew, for the Text Direction to match the sheet direction by default.

> Don't see what we can improve here.

I hope this comment clarifies it.
Comment 8 QA Administrators 2021-08-14 04:05:45 UTC Comment hidden (obsolete)
Comment 9 Heiko Tietze 2021-08-16 09:02:28 UTC
(In reply to Eyal Rozenberg from comment #7)
> I hope this comment clarifies it.

Not really. The text direction follows the superordinate object, which is defined via tools > options > language > locale. Asking to bind the text direction to the sheet direction makes not much sense to me. My take => WF.
Comment 10 Eyal Rozenberg 2021-08-16 12:21:32 UTC
(In reply to Heiko Tietze from comment #9)
> (In reply to Eyal Rozenberg from comment #7)
> > I hope this comment clarifies it.
> 
> Not really. The text direction follows the superordinate object, which is
> defined via tools > options > language > locale.

No, it isn't... the superordinate object of a cell is the page, or the sheet if you will. Sheet/Page direction is effected (or perhaps I should say should be effected by:

1. Toggling Sheet > Right-to-Left on the menu
2. Setting the Page text direction in the Page Style.

This is just like in Writer, if your paragraph uses superordinate object direction, you can make it switch direction via Format | Page Style or by setting the text direction in the page style in effect.

> Asking to bind the text direction to the sheet direction makes not much sense to me.

It is actually already bound to sheet/page direction: If I edit the page style and change the direction, the cell direction changes. It just doesn't work when I do it via toggling Sheet > Right-to-Left.
Comment 11 Stéphane Guillou (stragu) 2023-12-10 06:14:01 UTC
Eyal, how do you envisage this to be implemented (with what we currently have, if we ignore bug 138863)?
Would it be that an extra page style is available in LO, called something like "Default (LTR)", which has the LTR text direction and is applied automatically to the sheet when the UI is LTR or when a sheet is switched to LTR?