Bug 165094 - FILEOPEN RTF Page break in hidden paragraph disappears
Summary: FILEOPEN RTF Page break in hidden paragraph disappears
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:25.8.0 target:25.2.5 target:25...
Keywords: bibisected, bisected, regression
: 165214 (view as bug list)
Depends on:
Blocks: RTF-Opening
  Show dependency treegraph
 
Reported: 2025-02-07 09:01 UTC by Gabor Kelemen (allotropia)
Modified: 2025-05-30 12:46 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file, anonimized manually, from customer (100.24 KB, application/msword)
2025-02-07 09:01 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word and Writer with hidden formatting marks - bad (87.16 KB, image/png)
2025-02-07 09:02 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word and Writer with visible formatting marks - good (94.63 KB, image/png)
2025-02-07 09:02 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) 2025-02-07 09:01:34 UTC
Created attachment 199036 [details]
Example file, anonimized manually, from customer

Attached document contains a page of text, and some hidden paragraphs with a page break.
In Writer the page break is not rendered if the formatting marks are hidden, so the document is 1 page instead of 3. But showing the formatting marks also shows the page break and number of pages becomes 3.

1. Open attached document, make sure the formatting marks were hidden the last time
-> the document is 1 pages long, the table is at the bottom of the first page

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d723103ff8404ddadb3314dd3b67439602799d6c
CPU threads: 14; OS: Windows 10 X86_64 (build 19045); UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Seems to have started in 24.2 with:

https://git.libreoffice.org/core/+/ff7f1b59e22092d8548459e75fe912db852f056f%5E%21

author	Mike Kaganski <mike.kaganski@collabora.com>	Fri Feb 09 11:56:19 2024 +0600
committer	Michael Stahl <michael.stahl@allotropia.de>	Mon Feb 19 12:39:35 2024 +0100

tdf#159565 prerequisite: make hidden sections have zero-height frames
Comment 1 Gabor Kelemen (allotropia) 2025-02-07 09:02:15 UTC
Created attachment 199037 [details]
The example file in Word and Writer with hidden formatting marks - bad
Comment 2 Gabor Kelemen (allotropia) 2025-02-07 09:02:36 UTC
Created attachment 199038 [details]
The example file in Word and Writer with visible formatting marks - good
Comment 3 Gabor Kelemen (allotropia) 2025-02-07 09:04:00 UTC
Adding CC to: Mike Kaganski
Comment 4 raal 2025-02-11 20:54:57 UTC
Confirm with Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7da1497aa462e2b719aa9b308a749caf7b9a19b1
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded
Comment 5 Mike Kaganski 2025-05-25 11:57:31 UTC
*** Bug 165214 has been marked as a duplicate of this bug. ***
Comment 6 Mike Kaganski 2025-05-25 12:03:53 UTC
Note for myself: 7335babda93974104a39202c434e9499b8086f3a may be relevant / a useful code pointer
Comment 7 Mike Kaganski 2025-05-25 19:25:14 UTC
https://gerrit.libreoffice.org/c/core/+/185751
Comment 8 Commit Notification 2025-05-26 04:09:42 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/67308193f6ee8a21b20043fbd3e831a8c455f40a

tdf#165094: do not skip empty page because of wrong page descriptor

It will be available in 25.8.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 9 Commit Notification 2025-05-27 22:50:23 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/3d9d0c63b4826af2aff3a4801dbcb7dcc0e05206

tdf#165094: do not skip empty page because of wrong page descriptor

It will be available in 25.2.5.

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 Commit Notification 2025-05-30 12:46:49 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-2-4":

https://git.libreoffice.org/core/commit/81a600acc684fb06fe3bf2511165266dd38778e9

tdf#165094: do not skip empty page because of wrong page descriptor

It will be available in 25.2.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.