Bug 132642 - Text in table going off page with Keep with next paragraph checked
Summary: Text in table going off page with Keep with next paragraph checked
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected) release
Hardware: All All
: medium normal
Assignee: Justin L
Whiteboard: target:7.0.0
Keywords: bibisected, bisected, regression
Depends on:
Reported: 2020-05-03 13:45 UTC by Telesto
Modified: 2020-07-13 12:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Example file (15.86 KB, application/vnd.oasis.opendocument.text)
2020-05-03 13:45 UTC, Telesto
Bibisect log (2.90 KB, text/plain)
2020-05-03 13:47 UTC, Telesto

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-03 13:45:42 UTC
Text in table going of page with Keep with next paragraph checked

Steps to Reproduce:
1. Open the attached file
2. Notice the yellow text going of page
3. Table -> table Properties -> Text flow
4. Uncheck Keep with next paragraph -> Everything looks like it should

Actual Results:
Text going of page with Keep with next paragraph checked

Expected Results:
Shouldn't do that.. Working fine in

Reproducible: Always

User Profile Reset: No

Additional Info:
Found in
Version: (x64)
Build ID: b8fb7ecd9cdbe1898c41eaecd9894df8e8f01e25
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US

and in 5.2
Comment 1 Telesto 2020-05-03 13:45:57 UTC
Created attachment 160279 [details]
Example file
Comment 2 Telesto 2020-05-03 13:47:10 UTC
Created attachment 160280 [details]
Bibisect log

Bisected to
author	Justin Luth <justin_luth@sil.org>	2015-11-27 19:03:40 +0300
committer	Justin Luth <justin_luth@sil.org>	2016-01-18 04:30:59 +0000
commit 0d127baed75929e744d5b6249f510012cfbc0e88 (patch)
tree 428628b43ebaa4fdb40e6077aac0964ae9e195b4
parent 57997db73725583a84dbac36bcc9c1b2829948f9 (diff)
tdf#91083 - .doc: emulate table keep-with-next paragraph
connect table with the following paragraph.  Move forward to a new page
together with the following paragraph if necessary.

Most of the added code allows the table to split if
all of the kept items do not fit on one page - allowing
the emulated table to match the layout of kept tables.

The only difference with .doc occurs when the table itself is larger
than one page.  In that case it ALWAYS starts a new page.  Although
it does not match .odt, it DOES match how MSWord handles that .doc.

Comment 3 Telesto 2020-05-04 13:04:12 UTC
Adding cc to: Justin Luth
Comment 4 Justin L 2020-05-04 15:34:24 UTC
Ouch - I submitted that one without a review? I'm surprised it took so long to find a bug with this...
Comment 5 Justin L 2020-05-04 19:41:41 UTC
Oh, now I see why I just pushed it.
-dozens of test documents made and tested.
-many months in gerrit with nobody was willing to review
-pushed just after master branched for 5.2 - so lots of QA access.

proposed fix at http://gerrit.libreoffice.org/c/core/+/93443

Perfect timing for finding this since I just spent the last few days falling asleep in my chair trying to understand table layouts for another bug.
Comment 6 Telesto 2020-05-04 22:53:57 UTC
(In reply to Justin L from comment #5)
> Perfect timing for finding this since I just spent the last few days falling
> asleep in my chair trying to understand table layouts for another bug.

I'm happy it's not me. The code looks rather complex. Withall those band aids. But he I can't code anyway.  Every commit ends up with a new bug report for something else being broken. Example bug 124677 

And a lovely area to be avoided:
warn:legacy.osl:9604:9604:sw/source/core/layout/calcmove.cxx:296: :-( Layout unstable (this not found)
endless this one:
warn:legacy.osl:9604:9604:sw/source/core/layout/tabfrm.cxx:2632: debug assertion: <SwTabFrame::MakeAll()> - format of table lowers suppressed by fix i44910
Comment 7 Commit Notification 2020-05-19 07:16:25 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":


tdf#132642 sw layout: try2 emulate table kept-with-next not splitting

It will be available in 7.0.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:

Affected users are encouraged to test the fix and report feedback.
Comment 8 Justin L 2020-05-20 05:48:04 UTC
Definitely no intention to backport any layout fixes.
Comment 9 BogdanB 2020-05-29 17:50:56 UTC
Verified in

Build ID: 77140de3fe925f75620e94dbd848b1c925935fb5
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded