Bug 153194 - FILEOPEN RTF Empty paragraph after page break moves to previous page
Summary: FILEOPEN RTF Empty paragraph after page break moves to previous page
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.2.0 target:7.6.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Writer-Page-Break RTF-Paragraph
  Show dependency treegraph
 
Reported: 2023-01-25 00:11 UTC by Gabor Kelemen (allotropia)
Modified: 2023-11-30 09:22 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2016 (deleted)
2023-01-25 00:11 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the other example in Word 2016 and Writer (135.79 KB, image/png)
2023-01-25 00:12 UTC, Gabor Kelemen (allotropia)
Details
Updated example file (50.80 KB, application/rtf)
2023-11-28 14:10 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2023-01-25 00:11:43 UTC
Created attachment 184890 [details]
Example file from Word 2016

Attached RTF example file has a page break followed by an empty paragraph.
When opened in Writer the empty paragraph is moved to the previous page, changing the layout of the second page.

1. Open attached file

Notice the "4. BBB..." paragraph is directly at the top of the second page, instead of quite some distance below it.

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f1830bff71847a9c17715cff52383956719847fe
CPU threads: 14; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded

This was good in 7.4.0, broke only recently:

https://git.libreoffice.org/core/+/3c610336a58f644525d5e4d2566c35eee6f7a618

author	Miklos Vajna <vmiklos@collabora.com>	Thu Sep 08 20:14:27 2022 +0200
committer	Miklos Vajna <vmiklos@collabora.com>	Fri Sep 09 08:18:28 2022 +0200

tdf#148214 RTF import: avoid fake paragraph for \page when possible
Comment 1 Gabor Kelemen (allotropia) 2023-01-25 00:12:31 UTC
Created attachment 184891 [details]
Screenshot of the other example in Word 2016 and Writer
Comment 2 Stéphane Guillou (stragu) 2023-01-25 21:58:14 UTC
Reproduced with:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: e125e6623fa1c0f39d927bb37547ca6d1e299cb1
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:

Microsoft® Word for Microsoft 365 MSO (Version 2212 Build 16.0.15928.20196) 64-bit
Comment 3 Jayanthi 2023-01-29 08:28:20 UTC
Reproduced :
version:Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620ad1b7ae06d6f053fb2c9b57af96b736c04e57
CPU threads: 4; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Calc: threaded
Comment 4 Miklos Vajna 2023-11-06 10:55:09 UTC
This is assigned already, so removing it from my dashboard.
Comment 5 Commit Notification 2023-11-16 09:19:55 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/15b886f460919ea3dce425a621dc017c2992a96b

tdf#153194 writerfilter: RTF import: \spltpgpar

It will be available in 24.2.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2023-11-16 14:36:28 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/454e5010aec9953f586fe8af671765358f6cafc4

tdf#153194 writerfilter: RTF import: testContSectionPageBreak last para

It will be available in 24.2.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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Michael Stahl (allotropia) 2023-11-16 14:44:57 UTC
fixed on master

probably not a regression from the commit in description, if i revert that it looks differently wrong (4 paragraphs instead of 3)
Comment 8 Gabor Kelemen (allotropia) 2023-11-28 14:10:14 UTC
Created attachment 191095 [details]
Updated example file
Comment 9 Commit Notification 2023-11-28 20:55:32 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/022e12e9af6e92ac3db853e73b7b2577b3c0511e

tdf#153194 writerfilter: RTF import: \spltpgpar

It will be available in 7.6.4.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Xisco Faulí 2023-11-29 13:20:54 UTC
The content of attachment 184890 [details] has been deleted for the following reason:

User's request
Comment 11 Commit Notification 2023-11-30 09:22:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/bcbc024757b569e1c8999ac4f897bd7f0ee8781b

tdf#153194 writerfilter: RTF import: testContSectionPageBreak last para

It will be available in 7.6.4.

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:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.