Bug 152031 - Reducing width of RTL table creates "stairway" effect
Summary: Reducing width of RTL table creates "stairway" effect
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.2.3 release
Hardware: x86-64 (AMD64) Linux (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: RTL-CTL Writer-Tables DOCX-Tables
  Show dependency treegraph
 
Reported: 2022-11-13 23:04 UTC by Eyal Rozenberg
Modified: 2023-01-24 10:36 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Document exhibiting the bug (28.94 KB, application/vnd.oasis.opendocument.text)
2022-11-13 23:04 UTC, Eyal Rozenberg
Details
Before and after table size reduction (35.86 KB, image/png)
2022-11-13 23:12 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-11-13 23:04:02 UTC
Created attachment 183571 [details]
Document exhibiting the bug

Consider the attached file. If you right-click the table, enter the properties dialog and reduce the table with to, say, 5" (it's currently 5.45"), then you get this weird "stairway" effect, where each table row is shifted further and further to one direction - e.g. to the right - with lower lines disappearing entirely off the page.
Comment 1 Eyal Rozenberg 2022-11-13 23:04:44 UTC
If you then undo the change, the "stairway" effect remains, but - switches sides, so that rows are shifted to the left. Wonderful :-(
Comment 2 Eyal Rozenberg 2022-11-13 23:06:43 UTC
Sorry, in the attached file the table width starts at 5.00 and you need to reduce it a lower value. Try 4.0".
Comment 3 Eyal Rozenberg 2022-11-13 23:12:05 UTC
Created attachment 183572 [details]
Before and after table size reduction

Before-and-after pair of partial screenshots.

Taken with:

Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2486d99c6053af1414117faac2c0db18c0d344c4
CPU threads: 4; OS: Linux 6.0; UI render: default; VCL: gtk3
Locale: en-IL (en_IL); UI: en-US
Comment 4 Eyal Rozenberg 2022-11-13 23:13:57 UTC
The document had originally been imported from MS Word (a DOCX), but had undergone some editing in LO.
Comment 5 Stéphane Guillou (stragu) 2022-11-15 12:43:01 UTC
Reproduced in:

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

No repro:

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

Sometimes, reducing the table width will look like it worked, but undoing will still doing the inverse staircase thing, so make sure to test that step too.
To witness both issues, I changed the width from 12.7 cm to 12 cm.
Comment 6 Stéphane Guillou (stragu) 2022-11-15 13:02:12 UTC
Bisected to commit:

https://git.libreoffice.org/core/+/45e4abfed10aff768cd884ebcb1a38af0fea32d6

commit 45e4abfed10aff768cd884ebcb1a38af0fea32d6
author	Mark Hung <marklm9@gmail.com>	Sun Aug 14 15:23:14 2022 +0800
committer	Xisco Fauli <xiscofauli@libreoffice.org>	Mon Aug 15 15:46:45 2022 +0200
tree e8b2fb8db284538dcd95082629fda5d10c5983fa
parent 7ca35790effb9a5a1ee17bd9a669fc2c38fcb99f

tdf#135991 fix unexpected hidden RTL sections.

Mark, can 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
# bad: [5ba6b111eeebaec7f95782532d05028030afc9a8] source 0854ae596afa863ab4db592fa484f8b0799b37da
git bisect bad 5ba6b111eeebaec7f95782532d05028030afc9a8
# bad: [94b8c53d8888d57920ebdea3f5ce259b8dc0df43] source 6462bd8bca3d7c89e1dbf7c97ca6dc9056472992
git bisect bad 94b8c53d8888d57920ebdea3f5ce259b8dc0df43
# good: [4ab13062e8744f5f0fbbe1cf95981ce467c046a4] source afef8b3eca37f54aa0653bab2d40ad5c55ababce
git bisect good 4ab13062e8744f5f0fbbe1cf95981ce467c046a4
# bad: [efe1849296000c624041f6add9ce7e70155ead18] source deda01eae394c5c4873f951fd2fb10e28290c699
git bisect bad efe1849296000c624041f6add9ce7e70155ead18
# bad: [d937c7b38307a85638ac8d31f2b1971ff6e3f986] source 7dbdcf31cd6af9bc9f2f3db57a6e020ddd767bfb
git bisect bad d937c7b38307a85638ac8d31f2b1971ff6e3f986
# bad: [24a34890b71739085b6d754c782a4119ef3f43a6] source 45e4abfed10aff768cd884ebcb1a38af0fea32d6
git bisect bad 24a34890b71739085b6d754c782a4119ef3f43a6
# good: [331707e441d0fee05f2c49286de4f994f8bd9bb5] source 7ca35790effb9a5a1ee17bd9a669fc2c38fcb99f
git bisect good 331707e441d0fee05f2c49286de4f994f8bd9bb5
# first bad commit: [24a34890b71739085b6d754c782a4119ef3f43a6] source 45e4abfed10aff768cd884ebcb1a38af0fea32d6
Comment 7 Commit Notification 2022-12-15 04:50:24 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:41:13 UTC
I 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 or can this be marked as resolved?
Comment 9 Commit Notification 2022-12-19 08:41:29 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:30 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