Bug 153196 - FILEOPEN RTF/DOCX Extra footer appears when section break is in the middle of page
Summary: FILEOPEN RTF/DOCX Extra footer appears when section break is in the middle of...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.4.0.3 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.8.0 target:24.2.2
Keywords: bibisected, regression
Depends on:
Blocks: RTF-Header-Footer
  Show dependency treegraph
 
Reported: 2023-01-25 00:58 UTC by Gabor Kelemen (allotropia)
Modified: 2024-03-01 11:00 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Example file from Word (50.89 KB, application/msword)
2023-01-25 00:58 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word 2016 and Writer (114.73 KB, image/png)
2023-01-25 00:59 UTC, Gabor Kelemen (allotropia)
Details
The example file saved as docx in Word 2016 (16.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-01-25 00:59 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:58:44 UTC
Created attachment 184894 [details]
Example file from Word

Attached example RTF file has a Next Page type section break at the middle of the second page.
Word shows the footer of the section at the bottom of the first page, but not at the second. It shows a different footer at the bottom of the third page, which is a new section.
Writer shows the first sections footer at the bottom of the second page too.
The same happens if the example file is saved as DOCX in Word.

1. Open attached file

Observe the "Hello world" footer is visible at the bottom of the second page, but there should not be any footer.

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 until 4.3, got broken in 4.4 in range:

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=fad62d928a4b4cd3aa96e16d7ab8f8db0331b8c0..a107bdfdfc1baf73f14055262d64bf616fc0a889

of which, this looks relevant:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b32881b6723072c8d1a652ea147d12e75766d504

fix reading even/odd page breaks from .docx (bnc#519228)
Comment 1 Gabor Kelemen (allotropia) 2023-01-25 00:59:24 UTC
Created attachment 184895 [details]
The example file in Word 2016 and Writer
Comment 2 Gabor Kelemen (allotropia) 2023-01-25 00:59:56 UTC
Created attachment 184896 [details]
The example file saved as docx in Word 2016
Comment 3 Stéphane Guillou (stragu) 2023-01-25 22:04:33 UTC
Reproduced in:

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 checked in:

Microsoft® Word for Microsoft 365 MSO (Version 2212 Build 16.0.15928.20196) 64-bit
Comment 4 Commit Notification 2024-02-20 21:29:05 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/340f8ea4ae7f11b4d3a95499188a29fe801867cf

tdf#153196 writerfilter: fix page style for even/odd section break

It will be available in 24.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 5 Michael Stahl (allotropia) 2024-02-20 21:35:17 UTC
fixed on master

can't backport to upstream libreoffice-7-6 because it needs commit 4b0fa253a4540f5461397815d290586f9ddabe61
Comment 6 Commit Notification 2024-03-01 11:00:04 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

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

tdf#153196 writerfilter: fix page style for even/odd section break

It will be available in 24.2.2.

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.