Bug 151609 - Writer: dontSplit and KeepWithNext ignored inside table cells
Summary: Writer: dontSplit and KeepWithNext ignored inside table cells
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2022-10-17 16:59 UTC by ajlittoz
Modified: 2024-09-12 13:04 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Table spanning pages with constrained text (16.85 KB, application/vnd.oasis.opendocument.text)
2022-10-17 16:59 UTC, ajlittoz
Details
Related bugdoc (13.30 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-09-12 13:04 UTC, Miklos Vajna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ajlittoz 2022-10-17 16:59:58 UTC
Created attachment 183100 [details]
Table spanning pages with constrained text

Paragraph may be flagged "Keep with next paragraph" or "Don't split paragraph" in Text Flow tab of the paragraph style.

This works fine in pages or sections.

When a table is used to achieved "parallel" layout, these flags are ignored, whether row is allowed to split or not.

Though I understand the difficulty to manage such a table (cell contents may be forced to next page while text in the adjacent column would remain on the page), I don't see the theoretical reason to restrict this text flow possibility. As an example, consider a cell containing a drawing and its caption. Due to the difficulty to control precisely position and wrapping in this case, the drawing is anchored "As character" in its own paragraph so that it will always stay within the cell boundary (which is not guaranteed  with any other anchor mode, the drawing going possibly into the bottom margin and getting clipped by page limit). The drawing and the caption need to be linked by a "Keep with next paragraph" flag so that they are not separated.

Either it is an unforeseen bug or a restriction should be clearly stated in the documentation due to theoretical reasons.

In the attached A6 landscape sample document, second row contains:
- paragraph "Curabitur": keep with next paragraph
- paragraph "Donec": do not split paragraph
- rows in table are allowed to split (but behaviour is the same if they are not; text in cell is extended until overflow occurs)

All formatting is done with direct formatting in this sample.

Tested with LO 7.3.6.2 under Fedora 36 (Linux) with KDE Plasma desktop
Comment 1 Dieter 2022-11-02 06:19:02 UTC
I confirm it with

Version: 7.4.2.3 (x64) / LibreOffice Community
Build ID: 382eef1f22670f7f4118c8c2dd222ec7ad009daf
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps:
1. Open attachment 183100 [details]

Actual result:
In the attached A6 landscape sample document, second row contains:
- in second paragraph "Curabitur": keep with next paragraph doesn't work
- in paragraph "Donec": do not split paragraph doesn't work
Comment 2 Buovjaga 2024-09-12 12:57:08 UTC
Still repro and already in 3.5.

Arch Linux 64-bit
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3d9b8701cb1751e4139ffa24f72bb836eb877fd1
CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: CL threaded
Built on 12 September 2024
Comment 3 Miklos Vajna 2024-09-12 13:04:33 UTC
Created attachment 196398 [details]
Related bugdoc

This is probably a bug, quick testing with Word shows that they respect keep-with-next inside table cells.