Bug 80794 - FORMATTING: Right Align with indentation
Summary: FORMATTING: Right Align with indentation
Status: RESOLVED DUPLICATE of bug 76371
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.1 rc
Hardware: Other Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-02 09:15 UTC by reportingbugs100
Modified: 2015-01-30 05:27 UTC (History)
2 users (show)

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


Attachments
image showing various formats (60.74 KB, image/png)
2014-07-02 09:15 UTC, reportingbugs100
Details
example spreadsheet (33.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-07-02 09:18 UTC, reportingbugs100
Details
Screenshot taken under LOv4302 (5.53 KB, image/png)
2014-07-19 11:14 UTC, Owen Genat (retired)
Details
ODS showing right-aligned values with varying amounts of indent LOv4302. (15.34 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-07-20 01:21 UTC, Owen Genat (retired)
Details
ODS showing right-aligned values with varying amounts of indent LOv4303. (15.50 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-07-20 10:18 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description reportingbugs100 2014-07-02 09:15:00 UTC
Created attachment 102119 [details]
image showing various formats

Aligning numbers and text to the right of cells then indenting them using increase indent button works inconsistently 

Steps to reproduce:
In cell A1 enter 1, click align right, click increase indent
This works as expected

In cells A1 to A4 enter numbers 1 to 4
Select the cells, click align right click increase indent
Cells A1 and A2 show the indent A3 and A4 do not.

enter numbers as before but for cells A1 to B4 (2x4 grid), A1 and B1 show indents but others do not. (Example 1 in attached picture) after saving the document B1 didn’t show the indentation but A4 did

now for the strange part which might lead the root of the problem, on the 2x4 grid of numbers select column A or just the cells with numbers, set the alignment to anything other than align right, so set as align left, centre or justified. now the numbers in column B will show the correct indentation with the alignment. (Example 2 in attached picture)

This can be expanded by filling A1 to E4 with single numbers and applying align right and increase indent to all cells, now only cell A1 and B1 show the indent. If you change any of the columns to a different alignment the following column will show the correct formatting then the one after that will revert back to the incorrect formatting. (Example 3). if the final column is set to any alignment then back to default, the first column will show the correct indentation.

Its is also not possible to set an indent when right align is set from right click> format cells > Alignment, it will show the indentation but it is greyed out.

I know that a workaround is to set the cell borders to different values to simulate an indentation on the required cells with the required alignment, Changing the cells to RTL a previously mentioned fix in this case hasn’t helped either, although having to go though tools > options >language settings >languages >CTL just to enable some formatting seams a stretch too far

Setting the right align with indent from cell styles is only possible by first selecting the correctly formatted cells then new style from selection, due to the indentation been greyed out, but is still shows the  problems as above

Now im hesitant to say but Microsoft office supports aligning right with an indentation, its was from importing an xlsx file that one of my users first found this problem

File created with 4.3.0.1 on windows 7
4.0.6.2 on linux shows not indentation at all with the example file
4.2.5.2 on linux initial showed perfect formatting for example 1 after opening the file but after minimised and maximised example 1 reverted to as seen in the picture
              
Operating System: Windows 7
Version: 4.3.0.1 rc
Comment 1 reportingbugs100 2014-07-02 09:18:56 UTC
Created attachment 102120 [details]
example spreadsheet
Comment 2 Ady 2014-07-02 14:10:37 UTC
I think this is not a problem of indentation or alignment, but of how (and 
when) the resulting cells are shown with the updated alignment/indentation.

For example:
1_ In cells A1 to A4 enter numbers 1 to 4;
2_ Select the cells;
3_ Click align right;
4_ Click increase indent.

Initially, cells A1 and A2 show the indent whereas A3 and A4 do not.

But using the vertical scroll bar down, in such a way that the 4 cells 
disappear from the screen, and then move it back up, so the 4 cells would be 
seen again, the correct indentation is seen.

My point is that the problem doesn't seem to be the alignment or the 
indentation, but the "refresh" of the result.
Comment 3 reportingbugs100 2014-07-03 09:05:50 UTC
(In reply to comment #2)
> I think this is not a problem of indentation or alignment, but of how (and 
> when) the resulting cells are shown with the updated alignment/indentation.
> 
> For example:
> 1_ In cells A1 to A4 enter numbers 1 to 4;
> 2_ Select the cells;
> 3_ Click align right;
> 4_ Click increase indent.
> 
> Initially, cells A1 and A2 show the indent whereas A3 and A4 do not.
> 
> But using the vertical scroll bar down, in such a way that the 4 cells 
> disappear from the screen, and then move it back up, so the 4 cells would be 
> seen again, the correct indentation is seen.
> 
> My point is that the problem doesn't seem to be the alignment or the 
> indentation, but the "refresh" of the result.

In version 4.3.0.1 you can actually see the numbers jump to the left as you scroll, but if you export as a pdf, with the cells visable or not visable on the screen, the output pdf doesnt show the indentation for A3 and A4.

So it seems that in the example given its a mixture of the screen not refreshing properly and some other underlying issue with exporting to pdf
Comment 4 sophie 2014-07-15 13:24:54 UTC
Hi, I was not able to reproduce with 4.3.0.2 and Ubuntu 14.04, all the numbers are correctly indented even when selecting a range. Sophie
Comment 5 reportingbugs100 2014-07-17 15:17:28 UTC
(In reply to comment #4)
> Hi, I was not able to reproduce with 4.3.0.2 and Ubuntu 14.04, all the
> numbers are correctly indented even when selecting a range. Sophie

i have just tried 4.3.0.2 in both windows 7 and linux (xbuntu 12.04) and they still have the problem

did you try and view the sample document attached?
Comment 6 Owen Genat (retired) 2014-07-19 11:14:17 UTC
Created attachment 103099 [details]
Screenshot taken under LOv4302

Unable to reproduce. Indentation appears to work as expected for right-aligned cell content. Tested under Debian 7 x86_64 using v4.3.0.2 Build ID: 14ed55896fdfcb93ff437b85c4f3e1923d2b1409. Refer attached.
Comment 7 Ady 2014-07-19 18:02:58 UTC
(In reply to comment #6)
> Created attachment 103099 [details]
> Screenshot taken under LOv4302
> 
> Unable to reproduce. Indentation appears to work as expected for
> right-aligned cell content. Tested under Debian 7 x86_64 using v4.3.0.2
> Build ID: 14ed55896fdfcb93ff437b85c4f3e1923d2b1409. Refer attached.

Unfortunately a static screen-shot doesn't demonstrate that the problem cannot be reproduced.

As described before, some kind of "refresh" is also involved in the issue. A spreadsheet can first be seen correctly, and after moving the scroll-bars up/down and right/left, the alignment+indentation is not seen as expected (at least in some cells).

It can also happens the other way; first it can be seen incorrectly and after moving the sheet it seems to correct the way the cells are displayed.

In other words, it is not just the way the cell's formatting is saved, but how it is shown.

Having to move the sheet so to display the result as expected is at least an inconsistency in Calc's behavior. Moreover, the result varies depending on the content of the sheet, or how the scroll-bars are moved, or which cells are selected, or...

Additionally, please note that this bug is being reported under Windows, so perhaps your test under Debian might not be so relevant. If indeed it can be reproduced only under Windows and not under Linux, this is a relevant detail so to look for a solution.

Regards,
Ady.
Comment 8 Owen Genat (retired) 2014-07-20 01:21:21 UTC
Created attachment 103128 [details]
ODS showing right-aligned values with varying amounts of indent LOv4302.

(In reply to comment #7)
> Unfortunately a static screen-shot doesn't demonstrate that the problem
> cannot be reproduced.

Yes. My comment was merely to indicate that it works as expected AFAICT under my setup. I have attached an ODS for others to test.

> As described before, some kind of "refresh" is also involved in the issue. A
> spreadsheet can first be seen correctly, and after moving the scroll-bars
> up/down and right/left, the alignment+indentation is not seen as expected
> (at least in some cells).

I don't get that here, but I understand what you are saying and have seen this in other contexts.
Comment 9 Ady 2014-07-20 07:14:49 UTC
(In reply to comment #8)
> Created attachment 103128 [details]
> ODS showing right-aligned values with varying amounts of indent LOv4302.
> 
 
I do not see those cells as *right* aligned. Here is how I see it (but at this moment I am opening it with a slightly-older version of LO).

The first row is all English text, so it is shown as if it were aligned to the left.

The following paragraphs describe rows 2 to 5.

The first column has no alignment specified. Since the content are numbers, they are shown as if they were aligned to the right.

The next columns are set to left-aligned + indentation.

Since we are talking about right-alignment + indentation, this ODS doesn't seem to represent a valid test case (in my current environment).

The alignment to the right should be set first, and then the indentation.

Can others replicate what I am describing here under different environments (OS, LO version...)?
Comment 10 ign_christian 2014-07-20 08:03:39 UTC
Honestly it's hard to understand this bug report. So I just test this:

(In reply to comment #2)
> For example:
> 1_ In cells A1 to A4 enter numbers 1 to 4;
> 2_ Select the cells;
> 3_ Click align right;
> 4_ Click increase indent.
> 
> Initially, cells A1 and A2 show the indent whereas A3 and A4 do not.

Confirmed that behavior under LO 4.2.5.2 - Ubuntu 12.04 x86.
Doing with another range of cells (eg. B1:B4) generates different result.
Comment 11 ign_christian 2014-07-20 08:26:17 UTC
(In reply to comment #10)
Also reproduced with: LO 4.3.0.3, 4.1.6.2, 4.2.0.0.beta1
Not reproduced with: LO 4.0.6.2, AOO 4.1.0

But I don't know whether it's a regression since Kingsoft 2013 generates different behavior while increasing indent with right aligned cells: cell contents move to left (and I think that is the expected result).
LO 4.0.6.2 and AOO 4.1.0 do the opposite: cell contents move to right.
Comment 12 Ady 2014-07-20 10:09:55 UTC
(In reply to comment #11)
> (In reply to comment #10)
> Also reproduced with: LO 4.3.0.3, 4.1.6.2, 4.2.0.0.beta1
> Not reproduced with: LO 4.0.6.2, AOO 4.1.0
 ...
> behavior while increasing indent with right aligned cells: cell
> contents move to left (and I think that is the expected result).
> LO 4.0.6.2 and AOO 4.1.0 do the opposite: cell contents move to right.

The "adequate" behavior depends on what it should be expected, or, in other words, how LO defines "increase" indent.

In LTR text direction, with Left-aligned text, "increase" indent should "move" the text slightly to the right. This is clear.

But then we have RTL text direction, and also different types of alignments (right, left,...).

Whichever the adequate definition of "increase" indent under each combination of settings (language, text direction, alignment, indentation), the result is being displayed inconsistently, depending on whether the user just opened the file, or moves a scroll-bar, or...

BTW, I am not questioning here how the "increase" (nor decrease) indentation should work.

I don't know whether there is a problem regarding how the cell formatting is being saved (under the different combinations of settings). I do know that the result is being displayed inconsistently.

Since more than one user has replicated the problem (and under several active versions too), I am changing the 'status' to NEW.
Comment 13 Owen Genat (retired) 2014-07-20 10:18:17 UTC
Created attachment 103132 [details]
ODS showing right-aligned values with varying amounts of indent LOv4303.

(In reply to comment #9)
> I do not see those cells as *right* aligned. 
> ...
> Since we are talking about right-alignment + indentation, this ODS doesn't
> seem to represent a valid test case (in my current environment).

Apologies. I seem to have gotten my test case files mixed up. You are quite correct. This post will delete both my original attachments and replace them with a new one (which merely illustrates that under v4.3.0.3 indenting has no effect with right-aligned content). Please disregard comment 6 and comment 8 by me. Sorry for the confusion. I am seeing largely the same behaviour as reported in comment 10 under GNU/Linux using these versions:

- v4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
- v4.2.5.2 Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5
- v4.3.0.3 Build ID: 08ebe52789a201dd7d38ef653ef7a48925e7f9f7
- v4.4.0.0.alpha0+ Build ID: 4aa9b041de3129f19b48e66d349f48657b73f33e (2014-07-19)

There are however differences in handling across these versions. On opening attachment 102120 [details] the above versions display this for cells A1:A4 and B1:B4:

v4162 right-aligned, all indented from right.
v4252 as v4162.
v4303 right-aligned, only A1, A4 and B4 indented from right.
v4400 as v4303.

Upon selecting A1:A4 and clicking increase indent the same versions display these changes for cells A1:A4 and B1:B4:

v4162 A1 and A4 further indented, A2:A3 and B1:B3 outdented (still right-aligned), B4 unchanged.
v4252 as v4162.
v4303 A1 and A4 further indented.
v4400 as v4303.

Upon saving after the above change, exiting the file and reopening it these further changes (presumably rendering) are observed:

v4162 B4 outdented (still right-aligned).
v4252 B1 indented (from right), B4 outdented (still right-aligned).
v4303 as v4252.
v4400 as v4252.

The results are somewhat unpredictable and mixed across versions, although there does seem to be a notable change between v4.2 and v4.3.

By way of contrast, under v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b A1:A4 and B1:B4 are displayed as right-aligned (no indent) and any subsequent use of increase indent, automatically changes the alignment to left aligned (with indent). This also applies for new sheets also. This would seem to be the same behaviour as that reported in comment 11 for Kingsoft 2013 and may simply indicate that these versions / products do not support indentation with right-alignment.

Once again, apologies.
Comment 14 Ady 2014-07-20 13:41:05 UTC
@Owen,

In your last set of tests, have you tried also moving the scroll-bars up/down and right/left? (Note: perhaps you already did it, and I might be missing it from your report.)

In case I am not being clear, what I am asking is something similar to what I already posted in comment #2:

"But using the vertical scroll bar down, in such a way that the 4 cells 
disappear from the screen, and then move it back up, so the 4 cells would be 
seen again, the correct indentation is seen."

So, again, my point is that:
_ one thing is how (or whether) the formatting is correctly saved;
_ another thing is how the "increase/decrease indent" behaves when combined with different settings (cell content direction, cell content alignment, cell content language,...) in each LO version/OS;
_ and finally another thing is how it is displayed (rendered, refreshed) to the user _on time_ and consistently.

IMHO, all three points should be considered.
Comment 15 Owen Genat (retired) 2014-07-21 00:30:28 UTC
(In reply to comment #14)
> In your last set of tests, have you tried also moving the scroll-bars
> up/down and right/left? (Note: perhaps you already did it, and I might be
> missing it from your report.)

I see what you mean. I did not test this previously. Here are the changes in rendering I see for the same cells from scrolling after open the document:

v4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
- up/down:    A1,A4,B4 become indented from right
- left/right: A1,A4,B1,B4 become indented from right

v4.2.5.2 Build ID: 61cb170a04bb1f12e77c884eab9192be736ec5f5
- up/down:    A1,A4,B4 become indented from right
- left/right: A1,A4,B4 become indented from right

v4.3.0.3 Build ID: 08ebe52789a201dd7d38ef653ef7a48925e7f9f7
- up/down:    no change
- left/right: no change

v4.4.0.0.alpha0+ Build ID: 4aa9b041de3129f19b48e66d349f48657b73f33e (2014-07-19)
- up/down:    no change
- left/right: B1 becomes indented from right, B4 becomes outdented (right-aligned)
Comment 16 Matthew Francis 2015-01-30 05:27:38 UTC

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