Bug 153953 - Switching direction of a list paragraph changes numbering alignment of other paragraphs
Summary: Switching direction of a list paragraph changes numbering alignment of other ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Bullet-Number-Outline-Lists RTL
  Show dependency treegraph
 
Reported: 2023-03-03 22:46 UTC by Eyal Rozenberg
Modified: 2024-08-03 09:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Visible effect of the single-paragraph direction switch on all list paragraphs (213.28 KB, video/x-matroska)
2023-03-03 22:50 UTC, Eyal Rozenberg
Details
Screenshot of difference in Numbering alignment values (44.79 KB, image/png)
2023-10-28 13:45 UTC, judd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2023-03-03 22:46:30 UTC
Reproduction instructions:

1. Start a new document
2. Click "Toggle Unordered List" on the toolbar
3. Ensure the "numbering alignment" of the unordered list isn't Centered, but rather Right or Left
4. Type in "Foo" and press Enter
5. Type in "Bar"
6. Switch the direction of the current (second) paragraph

Expected result:

After step 6, the list numbering alignment of the first paragraph ("Foo") is the same as in step 3.

No change to the first paragraph

Actual result:

After step 6, the list numbering alignment of the first paragraph ("Foo") is the opposite as in step 3 - having "switched" like the one of the "Bar" paragraph.
Comment 1 Eyal Rozenberg 2023-03-03 22:50:38 UTC
Created attachment 185739 [details]
Visible effect of the single-paragraph direction switch on all list paragraphs

Video provided by the original reporter on the LO Arabic/Farsi group.
Comment 2 Waleed Mortaja 2023-03-05 18:39:14 UTC
Small note: the bug affects both ordered and unordered lists.
Comment 3 Buovjaga 2023-03-29 12:57:24 UTC
As numbering alignment is a property of the list, isn't this the expected behaviour?
Comment 4 Waleed Mortaja 2023-03-29 14:16:16 UTC
(In reply to Buovjaga from comment #3)
> As numbering alignment is a property of the list, isn't this the expected
> behaviour?
From a user's point of view, changing the direction of a single list-paragraph should not affect the alignment for the other list-paragraphs in the list. As the direction for the other list-paragraphs was preserved, the corresponding alignment should have also been preserved.

If alignment is a property of the whole list, then we should:
1) Have different alignments defined for each direction in the same list
2) Or Unify the default alignments for both directions in the same list
3) Or have alignments defined per list-paragraphs instead of the whole list

You can also note in the already-attached video that there were two separated lists. However changing the direction in one list changed the alignment for both lists.

So, I do not think this is the expected behaviour.
Comment 5 Eyal Rozenberg 2023-03-29 17:55:29 UTC
(In reply to Buovjaga from comment #3)
> As numbering alignment is a property of the list, isn't this the expected
> behaviour?

No, because changing the direction of a paragraph is not supposed to affect the list DF.

Perhaps the developer' thinking was to treat Right or Left as though they were Start and End respectively, and thus when you switch paragraph direction, it's as though you also want to switch the list item number's alignment to maintain it's being at the Start or the End, thus creating undue linkage between list DF and paragraph DF.

If we had proper Start and End support, such "temptation" would not be a problem.
Comment 6 judd 2023-10-28 13:45:31 UTC
Created attachment 190466 [details]
Screenshot of difference in Numbering alignment values

A short description of the bug is that the Numbering Alignment value switches unintentionally from Left/Right to the other value when you change the Text Direction of a Paragraph from an Unordered List. I was able to replicate this bug using the configuration information below.

Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-PH (en_PH); UI: en-US
Calc: CL threaded

Before I was able to replicate the behavior, a prerequisite was to enable "Complex Text Layout" so that I was capable of changing my Text Direction. I will include its replication steps below together with how I was able to encounter the bug.

Prerequisite steps to enable "Complex Text Layout":
1. Open LibreOffice Writer
2. In the Menu Bar at the top, select "Tools" -> then "Options" 
3. In the selection list at the left, select "Language Settings" ->  then "Languages"
4. Make sure "Complex text layout" checkbox is enabled
5. Click "OK" button

Replication steps:
1. Open LibreOffice Writer
2. In the Formatting toolbar above, click on "Toggle Unordered List"
3. In the "Bullets and Numbering" toolbar at the bottom of the document, click on the right most icon titled "Bullets and Numbering"
4. Go to the "Position" tab
5. In the "Numbering alignment" option, select either "Left" or "Right" value
6. Click on "OK" button
7. In the Unordered List, Type in "Hello"
8. Press Enter
9. Type in "World"
10. Change the Text Direction of the 2nd Paragraph containing "World" by pressing (Ctrl + Shift + D) for Right-To-Left, or (Ctrl + Shift + A) for Left-To-Right

The failure is not immediately obvious but the Numbering alignment has changed from the selected Left/Right value to the other value after the change in Text Direction. This can be made more obvious to the eye by quickly switching back and forth the text direction of the 2nd Paragraph, notice the change in position of the bullet of the list. I am attaching an image as well that compares the 2 positions side-by-side that makes it easier to recognize the bug.

I did some follow-up tests that are related to the bug and providing my findings below:

1. As mentioned in an earlier comment, I am also confirming that this behavior is happening with Ordered Lists.

2. Changing the Text Direction through the shortcut (Ctrl + Shift + D / A) or through the buttons in the Formatting Toolbar result in the same behavior.

3. The change in "Numbering alignment" value affects the entire list. This is more obvious with a longer list with more paragraphs (more than 2).

4. We know that when changing the Text Direction of one paragraph, this changes the "Numbering alignment" from Left/Right to the other. When we then change the Text Direction of a second paragraph, the "Numbering alignment" changes back again to its original value. So the numbering alignment value alternates back and forth depending on if the number of paragraphs that changed Text Direction is odd or even.

5. When changing the Text Direction of a paragraph and you check the value of the Numbering alignment inside the "Bullets and Numbering" dialog box, it actually changes from Left/Right every time.

6. I was not able to find any information on this using the Writer Guide 7.6. I searched for information on Numbering alignment, Text Direction, Ordered and Unordered lists, and I did not encounter anything related to this behavior. This does not rule out the possibility that I may have missed some information contained in the document. The document can be found in this link: https://documentation.libreoffice.org/en/english-documentation/
Comment 7 Eyal Rozenberg 2023-10-28 16:07:21 UTC
(In reply to judd from comment #6)

First, I must commend the thoroughness... but do remember that one can perhaps be a little too thorough, with very long comments making it easier to miss important observations.

Anyway, regarding your point (6.): Of course you couldn't find mention of this in the Write Guide, since this is not intended behavior, it's just a bug :-P