Bug 167264 - FILEOPEN: Empty header is added each time i open a docx
Summary: FILEOPEN: Empty header is added each time i open a docx
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: DOCX-Header-Footer
  Show dependency treegraph
 
Reported: 2025-06-27 09:47 UTC by François Wauquier
Modified: 2025-07-15 10:27 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Delete Header (13.66 KB, image/png)
2025-06-27 09:49 UTC, François Wauquier
Details
Reproduction file (8.31 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-06-30 13:05 UTC, François Wauquier
Details
Margins (20.84 KB, image/png)
2025-07-15 10:27 UTC, François Wauquier
Details

Note You need to log in before you can comment on or make changes to this bug.
Description François Wauquier 2025-06-27 09:47:55 UTC
Description:
An Empty header is added each time i open a docx document.
I must manually delete the header each time i edit it.
It mess up my formatting and add make me loose time.

Steps to Reproduce:
1. Open docx document
2.
3.

Actual Results:
Empty header

Expected Results:
no header


Reproducible: Always


User Profile Reset: No

Additional Info:
Window 11 Home v24H2
Document created by Word, then edited by Libre Office.
Even if i resave it with LibreOffice, same effect is observed.
Comment 1 François Wauquier 2025-06-27 09:49:23 UTC
Created attachment 201509 [details]
Delete Header
Comment 2 Xisco Faulí 2025-06-27 10:54:18 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)
Comment 3 François Wauquier 2025-06-30 13:05:52 UTC
Created attachment 201561 [details]
Reproduction file

Here it is
Comment 4 raal 2025-07-01 21:28:37 UTC
Confirm with Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 18f8c2c4695ff93117e5cc9bbd1f7fb4f753f4db
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

ut not in Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a) -  in this version after deletion of header and reload, the header is gone.
Comment 5 Saburo 2025-07-10 01:36:06 UTC
bibisected with win64-7.2
Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: b802ab694a8a7357d4657f3e11b571144fa7c7bf

commit b802ab694a8a7357d4657f3e11b571144fa7c7bf
author	Attila Bakos (NISZ)

tdf#141158 DOCX: import discarded headers/footers

Before the inactive DOCX headers/footers lost during
import time. Now it can be restored by disabling
the options “Same content on left and right pages” and
“Same content on first page” on the Header and the
Footer panes of the Page style. This is for improving
the interoperability with other Office programs, e.g.
supporting DOCX text document templates better.

Follow-up of commit f5dc6b11d2218d94c9effe7a1ab418d0133da5e3
(tdf#140117 sw UI: keep headers/footers when inactive).

To start the py-UItest run:

$ make UITest_writer_tests7 UITEST_TEST_NAME="tdf141158.TestTdf141158.test_tdf141158"

Note: In spite of this patch implements the
left/first/first_left page header/footer stash
at import time, the left one works correctly at now.
This is because the first pages have different
page styles so changing the right page style will
restore the hidden header/footer content.
For this problem further improvements are planned,
exactly in the filter part. Number of unit tests
had to be modified, because before these headers
and footers were dropped.

Co-developed-with: Daniel Arato (NISZ)

Change-Id: I3dd452a648bc465710698707c083734dc762ed94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112580
Comment 6 François Wauquier 2025-07-15 10:27:22 UTC
Created attachment 201809 [details]
Margins

I have also noticed that the top margin of the page is reset to 0.
It might be that the added header and the deleted margin are often of the same size, and this is why this has not been discovered earlier.