Bug 148644 - Bug within paragraph constraints (keep with next / do not split paragraph)
Summary: Bug within paragraph constraints (keep with next / do not split paragraph)
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.8.2 release
Hardware: All All
: low minor
Assignee: Not Assigned
URL: https://help.libreoffice.org/7.4/en-U...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-18 08:09 UTC by Gaëtan Delannay
Modified: 2023-09-18 09:24 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
The highlighted paragraph in this file illustrates the bug. Please check styles applied to it and the following paragraph. (59.84 KB, application/vnd.oasis.opendocument.text)
2022-04-18 08:11 UTC, Gaëtan Delannay
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gaëtan Delannay 2022-04-18 08:09:06 UTC
Description:
In the attached example, the highlighted paragraph should start at the end of the previous column, but LibreOffice pushes it at the start of the second column. This para has this style: () Do not split paragraph, (x) Keep with next para (x) Orphan control (2 lines) and (x) Widow control (2 lines). The next para has (bullet #1) has () keep with next para.

Steps to Reproduce:
1. Open the attached file with any version of LO, from 6.2.8.2 to 7.3.2.2

Actual Results:
The highlighted paragraph starts at the start of a new column.

Expected Results:
The highlighted paragraph should be splitted and start at the end of the previous column.


Reproducible: Always


User Profile Reset: No



Additional Info:
This bug can be reproduced, AFAIK, from LO 6.2.8.2 to 7.3.2.2.
Comment 1 Gaëtan Delannay 2022-04-18 08:11:36 UTC
Created attachment 179635 [details]
The highlighted paragraph in this file illustrates the bug. Please check styles applied to it and the following paragraph.
Comment 2 Telesto 2022-04-18 19:14:57 UTC Comment hidden (obsolete)
Comment 3 Telesto 2022-04-18 19:21:28 UTC
(In reply to Telesto from comment #2)
> I confirm the behaviour, but unsure if this being a bug or simply "Keep with
> next paragraph" being turned on
> 
> What do you exactly expect from "Keep with next paragraph" in this case and
> especially why?

Ok well export to DOC/DOCX and opening with MSO does indeed split the highlighted text.. so there surely something wrong (aside from bug 148657)
Comment 4 Gaëtan Delannay 2022-04-18 19:34:56 UTC
Hello, thanks for your quick answer.
What I expect from "Keep with next" here is that the *end* of the highlighted paragraph (name it P) should be on the same column or page as the next one (in the example, the first bullet cannot directly be on top of a page or a column). But P could start on the previous column (this would be nice, a blank zone would be avoided): indeed, it is splittable (checkbox "Do not split paragraph" is unchecked); orphan and widow rules can be enforced as well.
Does it make sense to you? Many thanks again.
Comment 5 Heiko Tietze 2022-04-22 09:39:30 UTC
Round-trip issues are per se bugs. But ours or MSO'es?
Comment 6 Timur 2022-04-22 14:10:15 UTC
I don't see a bug . 
Help says:
"Keep with next paragraph
Keeps the current paragraph and the following paragraph together when a break or column break is inserted."

 "Keep with next" should be for the whole para, for comment 4 just turn it off. 

We cannot prove here with Word, it has another option "Keep lines together".
And for Keep with next it says "Keeps paragraphs together on a page or in a column".
Comment 7 Timur 2022-04-22 14:15:13 UTC
I may be wrong, "Do not split paragraph" is unavailable, can't say why.
Comment 8 Telesto 2022-04-23 07:50:16 UTC
(In reply to Timur from comment #7)
> I may be wrong, "Do not split paragraph" is unavailable, can't say why.

Do not split paragraph" will become available if you uncheck both Orphan and Window control

The result of checking "Do not split paragraph" or "Keep with next paragraph" will be the same in the case here (but don't ask me what the difference is) 

Help doesn't state disabling Orphan and Window control being pre-required to enable "Do not split paragraph"
Comment 9 Telesto 2022-04-23 07:53:04 UTC
(In reply to Telesto from comment #3)
> Ok well export to DOC/DOCX and opening with MSO does indeed split the
> highlighted text.. so there surely something wrong (aside from bug 148657)

To be clear: MSO opens the DOCX/DOC generated with LibreOffice with "Keep with next paragraph on" differently compared to LibreOffice
Comment 10 Dieter 2023-09-17 12:17:08 UTC
(In reply to Timur from comment #6)
> I don't see a bug . 
> Help says:
> "Keep with next paragraph
> Keeps the current paragraph and the following paragraph together when a
> break or column break is inserted."
> 
>  "Keep with next" should be for the whole para, for comment 4 just turn it
> off. 

I'm not sure for 100%, because in this case widow and orphan control makes no sense and should be greyed out, but they are still active.

Heiko, what do you think?

Anyway, help [1] should be improved here.

[1] https://help.libreoffice.org/7.6/en-GB/text/swriter/01/05030200.html?System=WIN&DbPAR=WRITER&HID=cui/ui/textflowpage/TextFlowPage#bm_id3147406
Comment 11 Heiko Tietze 2023-09-18 09:24:54 UTC
(In reply to Timur from comment #6)
> We cannot prove here with Word, it has another option "Keep lines together".
> And for Keep with next it says "Keeps paragraphs together on a page or in a
> column".

https://support.microsoft.com/en-us/office/paragraph-line-and-paragraph-breaks-tab-a529bd20-1ee0-4507-8898-5415f618b8a9

Apparently "Keep lines together" comes for MSO in addition to "Widow/Orphan control" (which always considers only one line). So I think it's not a bug; the paragraph attributes just need to be set properly.

And the disabled state makes sense for the mutual exclusive options.

(In reply to Gaëtan Delannay from comment #4)
> What I expect from "Keep with next" here is that the *end* of the
> highlighted paragraph (name it P) should be on the same column or page as
> the next one...

Can you follow the arguments, Gaetan?