Bug 144184 - Calc disables header/footer or looses footer content when saves a spreadsheet
Summary: Calc disables header/footer or looses footer content when saves a spreadsheet
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: All All
: highest critical
Assignee: Dániel Arató (NISZ)
URL:
Whiteboard: target:7.3.0 target:7.2.2
Keywords: bibisected, bisected, dataLoss, regression
Depends on:
Blocks: Calc-Header-Footer 144940
  Show dependency treegraph
 
Reported: 2021-08-30 13:05 UTC by Roman Kuznetsov
Modified: 2022-01-12 15:24 UTC (History)
21 users (show)

See Also:
Crash report or crash signature:


Attachments
Current master still has the bug (1.55 MB, image/gif)
2021-10-05 10:14 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2021-08-30 13:05:25 UTC
Description:
Calc disables header/footer when saves a spreadsheet

Steps to Reproduce:
1. Open Calc
2. Type into A1 cell any data, like 1111
3. Make sure Header and Footer checkboxes are enabled in Format-Page dialog on its tabs
4. Save file as ODS and close it
5. Open the file
6. Look at header and Footer tabs in Format-Page dialog => the both options are disabled

Actual Results:
Calc disables header/footer when saves a spreadsheet

Expected Results:
Calc saves header/footer state when saves a spreadsheet


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: threaded

but not in 7.1.0.3 => regression
Comment 1 Xisco Faulí 2021-08-30 14:39:11 UTC
I can't reproduce it in

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 6669c1a06bcc3ce31c9c17c714fdf2c2e0e25360
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 2 Xisco Faulí 2021-08-30 14:40:25 UTC
Nor in

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 6669c1a06bcc3ce31c9c17c714fdf2c2e0e25360
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: x11
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Roman Kuznetsov 2021-08-30 17:33:44 UTC
repro in

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4debb7e8cc12563f46d1aaa58afdcb831f21cc83
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: ru-RU
Calc: CL

I bisected it in win64-7.2 bisect repo and got

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

https://gerrit.libreoffice.org/c/core/+/118067

Added to CC: NISZ team for checking and László Németh and Daniel Arato
Comment 4 Mike Kaganski 2021-08-31 08:33:32 UTC
Repro using Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 48cff413e21830e3da4df8cb55540e68a4f009a6
CPU threads: 12; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL
Comment 5 Roman Kuznetsov 2021-09-03 11:39:08 UTC
*** Bug 144281 has been marked as a duplicate of this bug. ***
Comment 6 [REDACTED] 2021-09-06 10:51:57 UTC
This bug report title contains "(Win Only)". However, I can reproduce on 

Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.3; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 7 m_a_riosv 2021-09-11 11:22:28 UTC
*** Bug 144430 has been marked as a duplicate of this bug. ***
Comment 8 m_a_riosv 2021-09-11 11:25:00 UTC
As reproducible with a version in production
Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 4; OS: Windows 10.0 Build 21390; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL

I think it is a critical bug.
Comment 9 Timur 2021-09-13 08:35:27 UTC
Reproduced in Linux, so setting All. Data is not lost, just disabled. 

Next I made different steps:
1. Open Calc and type into A1 cell any data
2. Format-Page, Header-Edit and add some field, Footer-Edit and add some field, see that Header On and Footer On checkboxes are enabled
3. Save file as ODS, close it, reopen
See that header content is there but footer content is not, although both are enabled. 
And this makes it dataLoss.
Comment 10 m_a_riosv 2021-09-13 13:29:13 UTC
*** Bug 144448 has been marked as a duplicate of this bug. ***
Comment 11 m_a_riosv 2021-09-13 13:29:52 UTC
*** Bug 144368 has been marked as a duplicate of this bug. ***
Comment 12 Totya 2021-09-14 15:54:02 UTC
Hi!

I confirmed this bug.

I started works with xls file. I noticed, header margin (left and right) values are always lost after file load (format/pagestyle/top header). Same as xlsx files. If I save to ods, the problem is bigger, because after next start, the header completely disabled on all pages.

Again: Header left/right margin values are lost after load (xlx/xlsx) file, it's big problem for me. I noticed this bug on two different win10 x64 machines.

Additionlal problem (after load), often the print area lost too, I need select again the print area (usually columns). And again and again. I noticed this bug easyly, because the print page count for example 50, and not 25. I noticed this too on two different win10 x64 machines.

Sorry for my weak english!
Comment 13 Ulf Dunkel 2021-09-15 05:57:24 UTC
I can confirm this issue in v7.2.0.4 on Win10 and on macOS 11.5.
Comment 14 Xisco Faulí 2021-09-15 09:09:38 UTC
There are already some duplicates, let's increase the importance
Comment 15 Totya 2021-09-16 19:09:40 UTC
This bug (these bugs, see my last post) present in the 7.2.1.2 version too (win10 x64).
Comment 16 Timur 2021-09-20 08:08:37 UTC
*** Bug 144613 has been marked as a duplicate of this bug. ***
Comment 17 Dániel Arató (NISZ) 2021-09-22 11:04:22 UTC
(In reply to Timur from comment #9)
> 1. Open Calc and type into A1 cell any data
> 2. Format-Page, Header-Edit and add some field, Footer-Edit and add some
> field, see that Header On and Footer On checkboxes are enabled
> 3. Save file as ODS, close it, reopen
> See that header content is there but footer content is not, although both
> are enabled.

I found the root cause of Timur's bug, it turns out to be a simple typo so the fix is actually trivial.

Should we split this bug off into a separate ticket or can I file this minor fix under the 144184 ticket number?
Comment 18 Xisco Faulí 2021-09-22 11:08:13 UTC
(In reply to Dániel Arató (NISZ) from comment #17)
> (In reply to Timur from comment #9)
> > 1. Open Calc and type into A1 cell any data
> > 2. Format-Page, Header-Edit and add some field, Footer-Edit and add some
> > field, see that Header On and Footer On checkboxes are enabled
> > 3. Save file as ODS, close it, reopen
> > See that header content is there but footer content is not, although both
> > are enabled.
> 
> I found the root cause of Timur's bug, it turns out to be a simple typo so
> the fix is actually trivial.
> 
> Should we split this bug off into a separate ticket or can I file this minor
> fix under the 144184 ticket number?

Use this one for that. After the fix, we can reevaluate what is fixed and what is not and create follow-up tickets. Thanks for looking into this
Comment 19 helpdesk 2021-09-22 11:24:11 UTC
I followed the steps of Dániel Arató. In A1 wrote something in, activated the header and footer and wrote something in. Saved as ODS and opened again.

When I open the file, the header and footer are disabled again.
Comment 20 Dániel Arató (NISZ) 2021-09-22 11:29:32 UTC
(In reply to helpdesk from comment #19)

That seems to be a bit of a Heisenbug, we have had several negative and several positive confirmations above with a variety of builds and systems. I, for one, cannot reproduce the header/footer disabling on Windows.
Comment 21 Commit Notification 2021-09-28 09:34:17 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6f04952e6828cf1419b991e82070514bae24896c

tdf#144184 sc: fix first page footer export

It will be available in 7.3.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 22 Commit Notification 2021-09-28 12:19:58 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

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

tdf#144184 sc: fix first page footer export

It will be available in 7.2.3.

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 23 Xisco Faulí 2021-09-28 12:39:54 UTC
Let's close this issue as RESOLVED FIXED. For other similar issues, please create a follow-up issue
Comment 24 Commit Notification 2021-09-29 05:39:19 UTC
Daniel Arato (NISZ) committed a patch related to this issue.
It has been pushed to "libreoffice-7-2-2":

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

tdf#144184 sc: fix first page footer export

It will be available in 7.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.
Comment 25 Timur 2021-10-01 12:42:10 UTC
This was fixed for Comment 9 (if FH were changed) and not for Comment 0 (if FH were left empty), so that needs to go to another bug.
Some of duplicates here could be reopened, but I can't say which is for which problem, Comment 0 could be bug 144430 (that was sooner anyway).

ODS attachment 174988 [details] from bug 144368 still has the problem: if FH furned on (regardless if content changed) and saved, on reopen they are turned off. 
That still seems like this bug so I don't support Comment 23.
Comment 26 JO3EMC 2021-10-01 13:08:20 UTC
I also confirmed.
At least Bug 144368 doesn't seem to be fixed in 7.3 daily build.

(https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb77-TDF/2021-10-01_05.31.40/)
Comment 27 Mike Kaganski 2021-10-05 09:33:16 UTC
*** Bug 144935 has been marked as a duplicate of this bug. ***
Comment 28 Mike Kaganski 2021-10-05 10:14:11 UTC
Created attachment 175538 [details]
Current master still has the bug

The bug is not fixed in master, using exactly the steps from comment 0.

Closing it was wrong. Setting back to new.
Comment 29 Xisco Faulí 2021-10-05 10:25:05 UTC
I created the follow-up ticket in bug 144184. Sorry for the noise
Comment 30 NISZ LibreOffice Team 2021-10-06 09:04:16 UTC
Verified in:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: c2de581d1943df2d84f2b71817b6a8bee41f0217
CPU threads: 8; OS: Windows 10.0 Build 18363; UI render: Skia/Vulkan; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL
Comment 31 Marqeaux 2021-10-14 23:31:18 UTC
This bug has been marked as "fixed", and was also published as "fixed". But when I installed LibreOffice 7.2.2.2 this afternoon, the issue was still there.

Info about the LibreOffice I used this afternoon:
Version: 7.2.2.2 / LibreOffice Community
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: nl-NL (nl_NL.UTF-8); UI: nl-NL
Ubuntu package version: 1:7.2.2~rc2-0ubuntu0.18.04.1~lo1
Calc: threaded

Can someone confirm this? I can't reproduce any more steps regarding this issue  because I decided to switch back to LibreOffice 7.1.6. (which hasn't got this problem).
Comment 32 Mike Kaganski 2021-10-15 03:58:29 UTC
(In reply to Marqeaux from comment #31)

As I already described, though this bug had started with the problem you likely see, it ended up to focus on another problem - namely, described in comment 9. And what is described in *comment 9* is what is *fixed* in this bug.

The rest (the initial problem) has moved to bug 144940, and it is still being worked on. It doesn't need confirming that what is described in comment 0, and in the bug 144940, is indeed not yet fixed, and is still reproducible.
Comment 33 edmarcos 2021-11-02 01:00:18 UTC Comment hidden (no-value)
Comment 34 John Allender 2021-11-09 15:29:28 UTC Comment hidden (no-value)