Bug 148306 - ToC column layout doesn't respect the page style's direction in a document imported from MS Word
Summary: ToC column layout doesn't respect the page style's direction in a document im...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: DOCX-RTL
  Show dependency treegraph
 
Reported: 2022-04-01 12:32 UTC by Eyal Rozenberg
Modified: 2024-08-17 10:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A document exhibiting the bug (47.09 KB, application/vnd.oasis.opendocument.text)
2022-04-01 12:37 UTC, Eyal Rozenberg
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eyal Rozenberg 2022-04-01 12:32:19 UTC
Consider a multi-column ToC. Do its columns go from left to right or from right to left? Writer does not have UI to choose between those options; but that's bug 148305. Now, Mike Kasanagi has claimed on IRC that:

>  although it's not possible to define RtL for ToC manually, it does follow the page style's RtL setting

however, that's not always the case. I'll soon attach a document where changing the direct in the page style does not affect the ToC.
Comment 1 Eyal Rozenberg 2022-04-01 12:37:15 UTC
Created attachment 179253 [details]
A document exhibiting the bug

This document was originally imported from MS-Word; but almsot all content has been removed, including the original Toc. Anyway, if you switch the first paragraph back and forth between LTR and RTL.
Comment 2 Dieter 2022-04-18 03:52:19 UTC
I can't confirm with

Version: 7.3.3.1 (x64) / LibreOffice Community
Build ID: 1688991ca59a3ca1c74bc2176b274fba1b034928
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL(In reply to Eyal Rozenberg from comment #1)

> This document was originally imported from MS-Word;
that might cause the problem

Ti get the desired result:
1. Open attachment 179253 [details]
2. Strg+A
3. Strg+C
4. Strg+N
5. Strg+V
6. Change text direction in page style

=> WORKFORME

Eyal, do you get the same result? => NEEDINFO
Comment 3 QA Administrators 2022-10-16 03:47:16 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2022-11-16 03:47:23 UTC Comment hidden (obsolete)
Comment 5 Eyal Rozenberg 2022-12-23 13:51:58 UTC
(In reply to Dieter from comment #2)
> I can't confirm
> 
> Ti get the desired result:
> 1. Open attachment 179253 [details]
> 2. Strg+A
> 3. Strg+C
> 4. Strg+N
> 5. Strg+V
> 6. Change text direction in page style
>
> Eyal, do you get the same result? => NEEDINFO

That works for me as well, but - in the original document, changing the page direction doesn't change the ToC direction. So, I'll limit the scope of the bug and reopen.

Seeing this still with:

Version: 7.4.3.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Debian package version: 1:7.4.3-2
Comment 6 Dieter 2023-01-07 10:32:51 UTC Comment hidden (obsolete)
Comment 7 Dieter 2023-01-07 16:56:40 UTC
In a new document PS Contents 1 and Contents 2 have text direction "Use superordinate object settings". So, if you change page direction to LTR, direction of paragraphs also changes.

In original document PS Contents 1 and Contents 2 have text direction RTL. So it's expected, that text direction doesn't change, if you change it in page style.

If you change text direction of PS to "Use superordinate object settings" and change text direction of page style I would expect, that text direction of paragraphs should change also, but it doesn't. But this might be document specific as the copy and paste example shows.

So for me question is: Is it possible for you to reproduce bug from scratch?
=> NEEDINFO
Comment 8 Eyal Rozenberg 2023-01-07 22:50:07 UTC
(In reply to Dieter from comment #7)
> In a new document PS Contents 1 and Contents 2 have text direction "Use
> superordinate object settings". So, if you change page direction to LTR,
> direction of paragraphs also changes.

This bug is not about the direction of paragraphs in the ToC, it's about the order of columns within the ToC. I think I made this clear in the subject and the description.

Also, I do not know how to reproduce this, particularly not from scratch - but I reported this bug explicitly about documents imported from MS-Word.
Comment 9 Buovjaga 2023-03-15 13:50:02 UTC
(In reply to Eyal Rozenberg from comment #1)
> Created attachment 179253 [details]
> A document exhibiting the bug
> 
> This document was originally imported from MS-Word; but almsot all content
> has been removed, including the original Toc. Anyway, if you switch the
> first paragraph back and forth between LTR and RTL.

Do you mean חלק ראשון
What will happen when I switch? I don't see anything happening.

I confirm that the column order is from item 2 in top left to 7 in bottom right. Is this the badness? Would be good to have a DOCX to check with MSO.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 69b0fa8a6267a1fa77e77405000f42e8aeba5fa0
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 15 March 2023
Comment 10 Eyal Rozenberg 2023-03-15 14:16:06 UTC
(In reply to Buovjaga from comment #9)
> Do you mean חלק ראשון
> What will happen when I switch? I don't see anything happening.

Actually, nothing, I had a sentence fragment at the end of the comment and I forget whether I meant to complete it or delete it. Sorry, Ilmari.

> I confirm that the column order is from item 2 in top left to 7 in bottom
> right. Is this the badness? Would be good to have a DOCX to check with MSO.

You mean, page 2 in the top left to page 7 in the bottom right. Yes, that's the badness. The _right_ column should start with the lowest page number,  page 2, at its top (but on the left side of the column); the _left_ column should be the second one, ending with the item with page 7 (on the left side of the left column).