Bug 159133 - FILEOPEN DOCX Extra empty page is automatically inserted in specific file
Summary: FILEOPEN DOCX Extra empty page is automatically inserted in specific file
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks: DOCX-Section
  Show dependency treegraph
 
Reported: 2024-01-11 14:18 UTC by Gabor Kelemen (allotropia)
Modified: 2024-02-12 15:20 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word 2016 (26.68 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-01-11 14:18 UTC, Gabor Kelemen (allotropia)
Details
The example file in Word 2016 and current master (58.96 KB, image/png)
2024-01-11 14:18 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) 2024-01-11 14:18:30 UTC
Created attachment 191876 [details]
Example file from Word 2016

Attached simplified, user made document contains a section break and two pages.
When opened in Writer, for some reason there is an automatically inserted empty page after the section break added.

1. Open attached file
-> 3 pages instead of 2

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 55e97eaabf6cce91f424e440af392143f11f3343
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: threaded

Seems to be like this since 4.2.
Comment 1 Gabor Kelemen (allotropia) 2024-01-11 14:18:50 UTC
Created attachment 191877 [details]
The example file in Word 2016 and current master
Comment 2 Gabor Kelemen (allotropia) 2024-01-11 14:42:32 UTC
Bibisect-43all leads to the range:

https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=8a569f1c4decc7440e9dae1af35d7fa59c3b0121..621c1e491e56db5416da1c763aaff862e8ede67a

of which this one is sus:
https://cgit.freedesktop.org/libreoffice/core/commit/?id=b904b9a4875a023b430f013e62b81bc90ea8a592

fdo#44689: fix for DOCX import+export of page number start value
Comment 3 Dieter 2024-01-21 10:21:56 UTC
I can only see two pages, but status bar says "Page 1 of 3" and "Page 3 of 3"

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 40617d867346956588ac023511f31210107217f4
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
Comment 4 Buovjaga 2024-01-31 12:41:44 UTC
(In reply to Dieter from comment #3)
> I can only see two pages, but status bar says "Page 1 of 3" and "Page 3 of 3"

I get the same result.

Gábor: please confirm what you see exactly.

Arch Linux 64-bit, X11
Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 4253acd5300c526b062fc5b5f109e93e6e9d08df
CPU threads: 8; OS: Linux 6.7; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 31 January 2024
Comment 5 Dieter 2024-01-31 16:56:10 UTC
(In reply to Buovjaga from comment #4)
> (In reply to Dieter from comment #3)
> > I can only see two pages, but status bar says "Page 1 of 3" and "Page 3 of 3"
> 
> I get the same result.
> 
> Gábor: please confirm what you see exactly.
=> NEEDINFO
Comment 6 Gabor Kelemen (allotropia) 2024-02-12 15:20:39 UTC
(In reply to Buovjaga from comment #4)
> (In reply to Dieter from comment #3)
> > I can only see two pages, but status bar says "Page 1 of 3" and "Page 3 of 3"
> 
> I get the same result.
> 
> Gábor: please confirm what you see exactly.

Exactly that, but there should be no automatically inserted empty page, as there is no such in Word.
This messes up number of pages field, and before printing one needs to find&uncheck the "Print automatically inserted pages" box on the second page of the Print dialog, to get the same printed layout as in Word.

Setting to NEW since you see the same thing as me :).