Bug 92705 - FORMATTING: "Keep with next paragraph" not working reliably
Summary: FORMATTING: "Keep with next paragraph" not working reliably
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-13 15:11 UTC by Michael Fiedler
Modified: 2015-07-13 17:23 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Document that has the described problem on page 4 (109.81 KB, application/vnd.oasis.opendocument.text)
2015-07-13 15:11 UTC, Michael Fiedler
Details
Screenshot (172.73 KB, image/png)
2015-07-13 15:13 UTC, Michael Fiedler
Details
Fonts needed to display the document correctly (2.52 MB, application/x-gzip)
2015-07-13 15:16 UTC, Michael Fiedler
Details
simple test document (9.51 KB, application/vnd.oasis.opendocument.text)
2015-07-13 16:29 UTC, Gordo
Details
screenshot of overlapping text (14.71 KB, image/png)
2015-07-13 16:34 UTC, Gordo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Fiedler 2015-07-13 15:11:57 UTC
Created attachment 117204 [details]
Document that has the described problem on page 4

Environment:

Debian GNU/Linux 7.8 (wheezy), x86, LibreOffice 4.4.2.2-2 or 4.4.4.3-3 from http://www.libreoffice.org/


Steps to reproduce:

0. start with a new LibreOffice configuration (may not be necessary), for Linux delete ~/.config/libreoffice
1. extract and install the font in the attached archive, for Linux "cd ~ && tar xf fonts.tar.gz" should be enough
2. open the attached document
3. go to page 4
4. the "Heading 1"-formatted "Faust: Der Tragödie erster Teil" is placed at the end of the left column, although its paragraph style's and paragraph's text flow option "Keep with next paragraph"[1] is set (see attached screenshot).

  [1] https://help.libreoffice.org/Writer/Text_Flow#Keep_with_next_paragraph


expected behaviour:

The paragraph should be placed to the beginning of the next column as it must not be separate from the next one according to the format setting.


workarounds:

a) apply the paragraph formatting again, then the expected behaviour occurs
b) add a paragraph before the affected one and delete it immediately, then the expected behaviour occurs and remains.

However, the problem possibly may occur later again and one would have to check every page for such problems.
Comment 1 Michael Fiedler 2015-07-13 15:13:43 UTC
Created attachment 117205 [details]
Screenshot
Comment 2 Michael Fiedler 2015-07-13 15:16:38 UTC
Created attachment 117206 [details]
Fonts needed to display the document correctly
Comment 3 Gordo 2015-07-13 16:14:28 UTC
"Faust: Der Tragödie erster Teil" is in section "Bereich1" while the paragraph "Nacht" is in section "Bereich3".  Maybe keep with next paragraph does not work between sections.  If you enter some empty paragraphs before the heading ("Faust") then the section break will become more obvious visually.

I suggest moving the heading into the next section with "Nacht" to get it to work as desired.
Comment 4 Gordo 2015-07-13 16:29:35 UTC
Created attachment 117210 [details]
simple test document

This attachment shows keep with next paragraph not working between sections.
Comment 5 Gordo 2015-07-13 16:34:55 UTC
Created attachment 117211 [details]
screenshot of overlapping text

With the original document, if I enter empty paragraphs before the "Faust" heading to force it into the next column then the text overlaps.
Comment 6 Michael Fiedler 2015-07-13 16:36:30 UTC
Oh, I see... The sections seem to be there because of copy & paste from HTML, as I did not insert them intentionally.  I only removed direct formatting and did not notice the sections.
Comment 7 Michael Fiedler 2015-07-13 16:47:11 UTC
(In reply to Gordo from comment #5)
> Created attachment 117211 [details]
> screenshot of overlapping text
> 
> With the original document, if I enter empty paragraphs before the "Faust"
> heading to force it into the next column then the text overlaps.

Hm, I cannot reproduce this here, if I add new paragraphs at the line "So menschlich mit dem Teufel selbst zu sprechen." by pressing ENTER, the "Faust: Der Tragödie Erster Teil" paragraphs moves down just as it would happen without sections.
Comment 8 Gordo 2015-07-13 16:57:22 UTC
I did not install the fonts so the placement of the text was different for me.  I entered a whole column's worth of paragraphs to get the effect in the screenshot.

I forgot to include my details.
Windows Vista 64
Version: 4.4.4.3
Build ID: 2c39ebcf046445232b798108aa8a7e7d89552ea8
Comment 9 Michael Fiedler 2015-07-13 17:10:30 UTC
(In reply to Gordo from comment #8)
> I did not install the fonts so the placement of the text was different for
> me.  I entered a whole column's worth of paragraphs to get the effect in the
> screenshot.

I cannot reproduce it even by more than a page of paragraphs.

However, deleting all sections seems to help, at least I cannot see a problem as I had described it any more.  The problem was not really good to reproduce after having done changes, so I cannot definitely say that removing the sections certainly fixed the issue, but it sounds at least quite plausible.