Bug 161160 - Indent increase multiple cells not formatting correctly when Aligned right in box
Summary: Indent increase multiple cells not formatting correctly when Aligned right in...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.3.2 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2024-05-18 11:33 UTC by Frazain
Modified: 2024-05-21 09:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast (109.50 KB, image/gif)
2024-05-21 06:37 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frazain 2024-05-18 11:33:07 UTC
Description:
FORMATTING - Issue with indent feature when there is a border and cells are right justified.  

Steps to Reproduce:
1.Fill cells say A1:A5 with text
2.Create outside border A1:A5
3.Right justify cells A1:A5
4.Increase Indent A1:A5

Actual Results:
Only cell A1 indents but none below, if you then select certain other cells some increase but adjusts other ones

Expected Results:
All Cells A1:A5 should have border and right justified and indented 


Reproducible: Always


User Profile Reset: Yes

Additional Info:
1.If you take above steps without border it works fine;
2.If you indent then create border it reproduces above problem;
3.If you manually do each cell in above condition certain cells moves but only one;
4.If you remove border the problem remains on cells;
5.To reset you have to select unaffected cell say C1 and match properties over A1:A5.
Comment 1 ady 2024-05-18 15:41:16 UTC
The real problem starts with selecting an alignment that is different than "left" (for LTR languages), and only then trying to set the indentation value.

In order to set an indent value, Calc (incorrectly) "requires" to first set the alignment to left, then the indent value, and then modify the alignment to something else (other than "left").

If you attempt to set the indent value while the alignment is not "left" (for LTR languages), the indent field is grayed out.

STR:
1. New Calc.
2. [CTRL]+[1]
3. Alignment
4. The indent field is grayed out, unless the horizontal alignment field is set to "left" (for LTR languages).

If you want an indentation value for a right-aligned cell (for LTR languages):
1. First change the alignment to "left".
2. Set the indent value.
3. Change the alignment (back) to right.

I am not saying this is correct. I am just saying that this is the workaround that is working.


So, the fact that the procedure described on comment 0 fails (i.e. to apply the indentation to the whole range at once, as expected) is only an extension of the problem I just described.

In the same way, the workaround for this case is:
1. Set alignment to "left" (for LTR languages).
2. Increase indent.
3. Set alignment to "right".

This is a long-standing bug, so there is probably already some report about it somewhere.
Comment 2 ady 2024-05-18 15:51:25 UTC
(In reply to ady from comment #1)

> In the same way, the workaround for this case is:
> 1. Set alignment to "left" (for LTR languages).
> 2. Increase indent.
> 3. Set alignment to "right".

Hmm, no. Even when following the original workaround, the indent is applied only to the first cell of the range; the rest is not taking the indent value.

> 
> This is a long-standing bug, so there is probably already some report about
> it somewhere.
Comment 3 m_a_riosv 2024-05-18 21:53:44 UTC
Maybe in relation with tdf#107213 and tdf#126829
Comment 4 Heiko Tietze 2024-05-21 06:37:22 UTC
Created attachment 194237 [details]
Screencast

Confirming the issue with Fresh 24.2.3 and Master 24.8. 

I suggest to handle the UI issue(s) separately.
Comment 5 ady 2024-05-21 08:41:49 UTC
(In reply to Heiko Tietze from comment #4)

> I suggest to handle the UI issue(s) separately.

Users need to be able to set the indent value without having to modify the alignment first (and then again back).

The indentation result should still be affected by the selected alignment (so the value is not just "left-indent").

I am not sure which of the reports should be assigned to the backing code itself (or however it is named) and which one to the UI parts (cell format dialog + toolbar icons).

ATM we have at least bugs 107213, 126829, 161160, all related to each other. IMHO, the users are reporting this problem by describing the behavior they see. Which precise report should be about whatever happens behind and which report is/are about UI should be defined by relevant developers (and solve them accordingly). Otherwise, we will keep piling basically the same issue (from users' POV).
Comment 6 Heiko Tietze 2024-05-21 09:54:22 UTC
This issue is special as the multi-selection behaves differently depending on the border settings.