Bug 152085 - Section with two columns do not work in East Asian vertical writing mode (TB_RL)
Summary: Section with two columns do not work in East Asian vertical writing mode (TB_RL)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.2.3 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.0.0.beta2 tar...
Keywords: bibisected, bisected, regression
Depends on:
Blocks: CJK Vertical-Text Section
  Show dependency treegraph
 
Reported: 2022-11-17 13:10 UTC by Regina Henschel
Modified: 2023-01-24 10:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document in tb-rl writing mode (23.29 KB, application/vnd.oasis.opendocument.text)
2022-11-17 13:10 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2022-11-17 13:10:00 UTC
Created attachment 183644 [details]
Document in tb-rl writing mode

Open attached document. It is a document in "Right-to-left (Vertical)" which is writing mode TB-RL.

Mark the Japanese text and go to Insert > Section.
Set column number to 2.
Notice, that the Automatic shows about 40mm for column width.
OK

Observed:
The second column is outside the page.

Expected:
Each of the columns has about 40mm width.
Remind, in a TB-RL context a "column" is actually a horizontal row and these are stacked top-to-bottom. So "40mm width" actually means the vertical dimension.
Comment 1 Stéphane Guillou (stragu) 2022-11-17 16:00:20 UTC
Reproduced in:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a81e957f5026373f3935390c786c21416fc74fcc
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

and

Version: 7.4.2.3 / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

It's a regression, as 6.3 behaved as expected, with the page split in two equal parts.

Version: 7.3.6.2 / LibreOffice Community
Build ID: c28ca90fd6e1a19e189fc16c05f8f8924961e12e
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 2 Stéphane Guillou (stragu) 2022-11-17 16:11:56 UTC
Bisected to:
 3dc7ac3eadc21b7eb707e374d789b2510fd6d911 is the first bad commit
commit 3dc7ac3eadc21b7eb707e374d789b2510fd6d911
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Sep 21 14:56:48 2022 +0200

    source 5e3abdf6ecded4f69bc7e1bdfb9dc8300f30685d

Which points to:

commit 5e3abdf6ecded4f69bc7e1bdfb9dc8300f30685d
author	Mark Hung <marklm9@gmail.com>	Fri Sep 09 16:09:47 2022 +0800
committer	Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>	Wed Sep 21 12:54:07 2022 +0200
tree 05413f1ebfee0be75f5742790d03669607012cd7
parent 55900a5afdd2d5a51557712ee7f9e9e051f58301

tdf#150642 fix table layout with vertical writing.

Mark, could you please have a look?

bisect log:

# bad: [84c8ef56869631d6f245bb03dda89fc864c7b9f0] source 403ff3d3ccba1498568e82e4840a12e53a188406
# good: [36b1ce7e6118699fd36c37261da7f24f935b41ac] source 229123ccc6f90ebf66b3e659bebbd53f8a9bdd3a
git bisect start 'origin/master' 'oldest'
# good: [ed646e1db031892ffd209a1a5ee0f8e05d584582] source 1e7be382b1f400801d350067e4dfd40d4cfd2db3
git bisect good ed646e1db031892ffd209a1a5ee0f8e05d584582
# good: [58040a927cfb1f0f0f1c9adcb23a1461af827a91] source 71dee51995d46d0c820c83790d521fbd6bdd568d
git bisect good 58040a927cfb1f0f0f1c9adcb23a1461af827a91
# good: [a72085ebf57badbf8f32c9865efd6cafe2e578ae] source 6c3e1ec7d2177271ea6e01da4cedce022823c622
git bisect good a72085ebf57badbf8f32c9865efd6cafe2e578ae
# good: [1443894950b710c72f5d2697589d5c33cb23f574] source ee68863baa51e47ae9bb00373fce2f86ba8df1e8
git bisect good 1443894950b710c72f5d2697589d5c33cb23f574
# good: [1306f53a9f337a49523273b123afd5318bbb4212] source 0fefdd80d4420d794882e2e4790e4937c2130100
git bisect good 1306f53a9f337a49523273b123afd5318bbb4212
# good: [5ba6b111eeebaec7f95782532d05028030afc9a8] source 0854ae596afa863ab4db592fa484f8b0799b37da
git bisect good 5ba6b111eeebaec7f95782532d05028030afc9a8
# good: [21973fd1b6641e91f39911313762261fae95cae5] source 16de18eeb5f1b94b699cc5f81bb214298c0f8dfe
git bisect good 21973fd1b6641e91f39911313762261fae95cae5
# good: [db0aea6f63d2299c90bb6a1238c6d7b2aa084baa] source 5ef5b313ad0f6fdb8f8de0a7463cb2a0c4956f1a
git bisect good db0aea6f63d2299c90bb6a1238c6d7b2aa084baa
# bad: [7425b5fcc3fd5e3517af9458bfcbe0e503c8b9c7] source a81b6299deca88a61fe4d8c5909c02375c9f8620
git bisect bad 7425b5fcc3fd5e3517af9458bfcbe0e503c8b9c7
# bad: [3dc7ac3eadc21b7eb707e374d789b2510fd6d911] source 5e3abdf6ecded4f69bc7e1bdfb9dc8300f30685d
git bisect bad 3dc7ac3eadc21b7eb707e374d789b2510fd6d911
# good: [b42d2e4edafa6d1e36f541543097f6f735f6b945] source 613494b0d2dbde377473b42412a33f20c4b7d45c
git bisect good b42d2e4edafa6d1e36f541543097f6f735f6b945
# good: [0b35b0ac05493178d57859af6951152a33917367] source 1bff2caff1bbb39fe431c455aeab1f0234200d8d
git bisect good 0b35b0ac05493178d57859af6951152a33917367
# good: [286433e7f03a793a153a7d6d7fef1e9eb33cc0e1] source 55900a5afdd2d5a51557712ee7f9e9e051f58301
git bisect good 286433e7f03a793a153a7d6d7fef1e9eb33cc0e1
# first bad commit: [3dc7ac3eadc21b7eb707e374d789b2510fd6d911] source 5e3abdf6ecded4f69bc7e1bdfb9dc8300f30685d
Comment 3 Regina Henschel 2022-11-17 17:45:18 UTC
Hi Stéphan, you have put bug 152084 and this 152085 to meta bug "RTL-CTL". I think, that is not correct. RTL-CTL means "right-to-left complex text layout". That is for Hebrew and Arabic. The problems in RTL are very different, because RTL involves Unicode BiDi-Algorithm and column swap.

The column problem here can also be seen in vertical page layout and in vertical frames. I think bug 83066 would better fit. (Now with a search for "CJK" I have found it.)
Comment 4 Stéphane Guillou (stragu) 2022-11-18 08:30:04 UTC
(In reply to Regina Henschel from comment #3)
> Hi Stéphan, you have put bug 152084 and this 152085 to meta bug "RTL-CTL". I
> think, that is not correct. RTL-CTL means "right-to-left complex text
> layout". That is for Hebrew and Arabic. The problems in RTL are very
> different, because RTL involves Unicode BiDi-Algorithm and column swap.
> 
> The column problem here can also be seen in vertical page layout and in
> vertical frames. I think bug 83066 would better fit. (Now with a search for
> "CJK" I have found it.)

Thank you for the info, Regina! My bad, I thought that "Complex Text Layout" was a inclusive of both right-to-left and top-to-bottom / bottom-to-top scripts.

Maybe we could clarify the CJK meta with more acronyms (e.g. "vertical" and "TB"), so it is easier to find?
Comment 5 Ming Hua 2022-11-18 08:50:31 UTC
(In reply to Stéphane Guillou (stragu) from comment #4)
> Maybe we could clarify the CJK meta with more acronyms (e.g. "vertical" and
> "TB"), so it is easier to find?
Technically, "vertical layout" and "CJK" are two related but different areas.

Without going into details, let me say that CJK is more about the specific languages/scripts used, and concerns both horizontal and vertical layouts.  On the other hand, vertical layouts can be used for any text, and even 90-degree-rotated English text are sometimes discussed as "vertical" in LO context.

We do have another meta bug 106045 which is about vertical layout, which I've added to the dependency list.
Comment 6 Stéphane Guillou (stragu) 2022-11-18 14:23:28 UTC
Thanks for clarifying, Ming Hua! Makes more sense now. I also added that meta to Bug 152084.
Comment 7 Commit Notification 2022-12-15 04:50:26 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ae6e57d99cfdeac69cc42cd82904c24edc866310

tdf#152031,tdf#152085 minimize impact to table layout.

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Stéphane Guillou (stragu) 2022-12-16 18:39:21 UTC
I can see it fixed in:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4e4a31ac7d920c71e26ca4acd18c11ec2bd015bb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Thank you Mark! Do you have follow-up commits?
Comment 9 Commit Notification 2022-12-19 08:41:31 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6a4bedc761bba6c1d1cb44d9e36c5d12bc8719f7

tdf#152031,tdf#152085 minimize impact to table layout.

It will be available in 7.5.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-12-21 10:51:32 UTC
Mark Hung committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/65cbb9c52301c784dd4e185967cec140bb8fcd50

tdf#152031,tdf#152085 minimize impact to table layout.

It will be available in 7.4.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Xisco Faulí 2023-01-24 10:36:21 UTC
7.4.5 was a hotfix release, updating target in status-whiteboard