Bug 152960 - Filesave: "Keep with next paragraph" not working on sections to follow
Summary: Filesave: "Keep with next paragraph" not working on sections to follow
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2023-01-10 11:01 UTC by goodguy00@zoho.com
Modified: 2023-05-25 10:37 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
doc with section inserted (57.83 KB, application/vnd.oasis.opendocument.text)
2023-01-10 11:03 UTC, goodguy00@zoho.com
Details

Note You need to log in before you can comment on or make changes to this bug.
Description goodguy00@zoho.com 2023-01-10 11:01:50 UTC
Description:
having a paragraph (eg. heading) being followed by an linked in section is not considered as a "next paragraph" leaving the heading on page bottom.


Steps to Reproduce:
look at attached document. i placed the title at the bottom of the page and having it on keep with next. after inserting a section (here from the same document, maybe the path needs to be adjusted) the heading is not kept with this paragraph.

Actual Results:
well ... the heading is not kept with this paragraph.

Expected Results:
section or not, the heading must be kept with it (hence taken to the top of the next page)


Reproducible: Always


User Profile Reset: Yes

Additional Info:
-> it seems to be related to a very old problem Bug 92705, which has been considered as not a bug. i cannot understand, how there "removing the sections" can be offered as a workaround. i have documents well above 500 pages, where LO (actually none wordprocessors on the market) can deal smoothly with. i have to subdivide it into chapters and link them together with sections.
Comment 1 goodguy00@zoho.com 2023-01-10 11:03:02 UTC
Created attachment 184556 [details]
doc with section inserted
Comment 2 Stéphane Guillou (stragu) 2023-01-10 14:24:15 UTC
Reproduced with steps:

1. Put cursor to right of first heading, press enter: Heading follows the newly inserted paragraph to the second page.
2. Insert > Section...
3. Insert a new section: link to another file, or Indent, or Area, or Footnotes/Endnotes. See that the heading sticks to the section and stays on page 2.
4. Save and reload

Result: heading goes back to page 1, doesn't stick to the inserted section anymore.

Can _not_ reproduce with a Columns section, so there is some inconsistency too.

Repro in:

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

Also in:

Version: 7.4.3.2 / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
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.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

but not in:

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

-> Regression.
Comment 3 Stéphane Guillou (stragu) 2023-01-11 15:38:05 UTC
bibisected with linux-64-7.3 repo to first bad commit df462691a013a8e99d9a11c0620dd03016fedfab which point to core commit 6433dc223f6d21570e7132c4a580d186a5d5a334 which is a cherry-pick of:

commit 657de5fba12b0e9afcdee361654d2a2d0dbd7311
author	Michael Stahl <michael.stahl@allotropia.de>	Fri Nov 19 16:08:57 2021 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	Thu Dec 23 09:11:59 2021 +0100
tree 5826d4081b90c4e55e262d203b0dffff3bbbc51d
parent d11fb6cecaf72787973990e09cc7e8d03bdbf9d7
Revert "Revert "sw_fieldmarkhide: init fieldmark mode from options""
This reverts commit 70dd95aabd11b2146e2556c1da87da4a22d6f7b5.
Looks like we might get some time to fix bugs.
Change-Id: I7038c5e854676e2540011dd2a8dcfb8870788502
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125558

Michael, sorry, it's a revert of a revert, but could you please have a look?
Comment 4 Michael Stahl (allotropia) 2023-01-19 16:41:28 UTC
doesn't look like a regression.

i've tried to revert that commit - no difference.

i've tried loading the attached bugdoc on builds from every bibisect repo
from 7.4 to 5.3 on Linux - not a single one respected the "keep-with-next".

OOo 3.3 also displays it that way.

=> clearing regression keywords
Comment 5 Stéphane Guillou (stragu) 2023-01-19 23:11:13 UTC
(In reply to Michael Stahl (allotropia) from comment #4)
> doesn't look like a regression.
> 
> i've tried to revert that commit - no difference.
> 
> i've tried loading the attached bugdoc on builds from every bibisect repo
> from 7.4 to 5.3 on Linux - not a single one respected the "keep-with-next".
> 
> OOo 3.3 also displays it that way.
> 
> => clearing regression keywords

Michael, I agree that all versions will probably display the same, because the issue is a filesave issue and the example document was saved with a version that has the bug.

To test, you will have to follow the steps in comment 2. Could you please have another look at the effect of reverting the commit, following the steps?
Comment 6 Michael Stahl (allotropia) 2023-01-20 10:19:40 UTC
it's not plausible that this is an import/export problem - open "Format->Paragraph->Text Flow" on the heading paragraph and it has "Keep with next" enabled.
Comment 7 Buovjaga 2023-02-16 17:09:33 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> Reproduced with steps:
> 
> 1. Put cursor to right of first heading, press enter: Heading follows the
> newly inserted paragraph to the second page.
> 2. Insert > Section...
> 3. Insert a new section: link to another file, or Indent, or Area, or
> Footnotes/Endnotes. See that the heading sticks to the section and stays on
> page 2.
> 4. Save and reload
> 
> Result: heading goes back to page 1, doesn't stick to the inserted section
> anymore.

I can repro with 657de5fba12b0e9afcdee361654d2a2d0dbd7311 but not with the preceding commit.