Bug 144368 - Calc; Format -> Page Style -> Header and Footer switched on setting does not save or load with document, Organizer Style greyed out
Summary: Calc; Format -> Page Style -> Header and Footer switched on setting does not ...
Status: RESOLVED DUPLICATE of bug 144940
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-08 08:02 UTC by Nico
Modified: 2021-10-05 10:27 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (69.10 KB, image/png)
2021-09-08 08:04 UTC, Nico
Details
Screenshot (55.88 KB, image/png)
2021-09-08 08:05 UTC, Nico
Details
Screenshot (54.75 KB, image/png)
2021-09-08 08:05 UTC, Nico
Details
Calc file with header whose "on" state isn't saved (16.54 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-09-10 19:08 UTC, Richard Manning
Details
Status of Header and Footer (21.80 KB, application/vnd.oasis.opendocument.spreadsheet-flat-xml)
2021-09-12 13:55 UTC, Kiyotaka Nishibori
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nico 2021-09-08 08:02:47 UTC
Description:
Since Version

7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded

the Header and Footer switch on and its respective settings (like margins) do not save or load with document.

The settings in Organizer are greyed out.

Steps to Reproduce:
1. Edit Page Style Header an Footer
2. Save file
3. Open file
4. Look in Page Style
5. Header and Footer deactivated

Actual Results:
Header and Footer deactivated

Expected Results:
When activating and editing header and footer and saving the calc file on reopening the file these settings should be the same.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 4; OS: Mac OS X 10.13.6; UI render: default; VCL: osx
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded
Comment 1 Nico 2021-09-08 08:04:51 UTC
Created attachment 174872 [details]
Screenshot
Comment 2 Nico 2021-09-08 08:05:13 UTC
Created attachment 174873 [details]
Screenshot
Comment 3 Nico 2021-09-08 08:05:41 UTC
Created attachment 174874 [details]
Screenshot
Comment 4 m.a.riosv 2021-09-08 17:27:27 UTC
What file type do you use to save?
Comment 5 Nico 2021-09-08 18:36:32 UTC
Native ods
Comment 6 Richard Manning 2021-09-10 19:08:48 UTC
Created attachment 174957 [details]
Calc file with header whose "on" state isn't saved
Comment 7 Richard Manning 2021-09-10 19:10:34 UTC
Can confirm: exact same behavior occurs in Win10.  "Header On" box doesn't stay checked when file is saved & reopened.  

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 8 Kiyotaka Nishibori 2021-09-12 13:55:52 UTC
Created attachment 174988 [details]
Status of Header and Footer

Open this file using  a text editor and LibreOffice Calc.
Comment 9 Kiyotaka Nishibori 2021-09-12 13:59:13 UTC
The issue could be reproduced on the libreoffice-fresh package of Arch linux: 
Version: 7.2.0.4 / LibreOffice CommunityBuild ID: 20(Build:4)
CPU threads: 8; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
7.2.0-2
Calc: threaded

In my examination, it could be reproduced not only a file saved as ods format but also one as fods .

The steps for my examination are as follows:
1. Open a new calc file
2. Go to Format -> Page Style -> Header
3. Check "Header on"
4. Enter  1.6 cm in "Height"
5. Go to Footer tab
6. Check "Footer on"
7. Enter 1.6 cm in "Height"
8. Click "OK" in the Page Style dialog
9. Enter something in A1 cell
10. Save the file with  .fods format 
11. Close the file
12. Reopen the saved file

Expected Results: "Header on" and "Footer on" are checked and both height is 1.6 cm.

Actual Results: "Header on" and "Footer on" are unchecked and both height is the default value; 0.50 cm.

The attachment is the saved file. If you open it using a text editor, you will find those following lines:

   <style:header-style>
    <style:header-footer-properties fo:min-height="1.6cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-bottom="0cm"/>
   </style:header-style>
   <style:footer-style>
    <style:header-footer-properties fo:min-height="1.6cm" fo:margin-left="0cm" fo:margin-right="0cm" fo:margin-top="0cm"/>
   </style:footer-style>

I suppose that this issue occurs when a file is opened rather than a file is saved.
Comment 10 Shinji Enoki 2021-09-12 15:02:55 UTC
Reproduced in the following cases

1. Created file in 7.2.0 and opened in 7.2.0
2. Created file in 7.2.0 and opened in 7.1.6
3. Created file in 7.2.0 and opened in 7.0.0
4. Created file in 7.2.0 and opened in daily build


Not reproduced in the following cases:

1. Created file in 7.1.6 and opened in 7.1.6
2. Created file in 7.1.6 and opened in 7.2.0
3. Created file in 7.1.6 and opened in 7.0.0
4. Created file in 7.1.6 and opened in daily build

Version: 7.2.0.4 / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Version: 7.1.6.2 / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Version: 7.0.0.3
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 8; OS:Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 84e1c79dd7394168459a3bbdea8bd94d765708e0
CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-09-10_21:28:22
Calc: threaded
Comment 11 Shinji Enoki 2021-09-12 15:12:08 UTC
Created in 7.2.0 and open in 7.2, header and footer options are off. 
I turn on the header and press the edit button, it will have the data.

Created in 7.2.0 and open in 7.1.6, header and footer options are off.
I turn on the header and press the edit button, data is not there.
Comment 12 himajin100000 2021-09-12 15:17:22 UTC
I'm in the middle of bibisection. (no plans to investigate further)

$ git bisect log
# bad: [3a2bb2f0e2e56def58d4ffea7ca5962c674829e3] source sha:8fdbb8aed1b48734a717d5f98ada566de7204605
# good: [0de175072f79362baeb83b6733b9300d4de5fba4] source sha:738bcf5e9a8c443d60c29c3a8068e8c16c72638a
git bisect start 'latest' 'oldest'
# good: [7a711a39141eeaffb2bd55f93e928a8d2f4d42fb] source sha:3dfb8552eb84eaf831c4c3eb59c398afc87e9174
git bisect good 7a711a39141eeaffb2bd55f93e928a8d2f4d42fb
# good: [03bb15e381faa6e4fd958366dfc5bbcdda662ccb] source sha:ff673ce838a5538b1432daf9007c047f6455a5ba
git bisect good 03bb15e381faa6e4fd958366dfc5bbcdda662ccb
# good: [09cbda122bd57e44592a6c0147c31e17e2086bf1] source sha:b3cd042285af08a0bdc5dea608d131424d850f9c
git bisect good 09cbda122bd57e44592a6c0147c31e17e2086bf1
# good: [800f4aa950513ad3452a649e716bd0fb0bdaf13d] source sha:8ed68179e2eaf07289663c64d923d8b5dd8b25c9
git bisect good 800f4aa950513ad3452a649e716bd0fb0bdaf13d
# good: [41304823c10dfd6c0a5943c4729b5679409483ed] source sha:4e534f53b4e65905fbc6a7d5f84b88b4ba6c4ea0
git bisect good 41304823c10dfd6c0a5943c4729b5679409483ed
# bad: [58afe90fc80082572c73b179125ca77e98d5a4a7] source sha:ad980a729fa5773c12339452518aa7c4e56f1fb5
git bisect bad 58afe90fc80082572c73b179125ca77e98d5a4a7
# skip: [c9b94726bcc75803473a09f0d2c96cdf9c6dc7aa] source sha:b19b08e51163e949ba4aa656196ebb554ca879a2
git bisect skip c9b94726bcc75803473a09f0d2c96cdf9c6dc7aa
# bad: [020370b4f6da202dc202bc7c764ae82316a8b70b] source sha:3c7172bf9cfec0a8dfb103d3ab9df927407cf6ff
git bisect bad 020370b4f6da202dc202bc7c764ae82316a8b70b
# good: [069f1b99efca3d3f6363fda4f03b7845a64aa051] source sha:f0c8a0a00d74a21ac940923f02710bdceb63f508
git bisect good 069f1b99efca3d3f6363fda4f03b7845a64aa051
# bad: [2ffcef7bd1010b11fdf304a12fcdd4346a76ffcb] source sha:89e19634a775d53ea855db8767113f3ab08a3479
git bisect bad 2ffcef7bd1010b11fdf304a12fcdd4346a76ffcb
# bad: [a0f0c77d86d549d022bbc7cfd841a0201da85ae0] source sha:900ec0ac2b5fa0eb3bf42220077dc391e1aa4522
git bisect bad a0f0c77d86d549d022bbc7cfd841a0201da85ae0
# skip: [a0f0c77d86d549d022bbc7cfd841a0201da85ae0] source sha:900ec0ac2b5fa0eb3bf42220077dc391e1aa4522
git bisect skip a0f0c77d86d549d022bbc7cfd841a0201da85ae0
# skip: [a0f0c77d86d549d022bbc7cfd841a0201da85ae0] source sha:900ec0ac2b5fa0eb3bf42220077dc391e1aa4522
git bisect skip a0f0c77d86d549d022bbc7cfd841a0201da85ae0
-----------
$ git bisect skip
Bisecting: 3 revisions left to test after this (roughly 2 steps)
error: Your local changes to the following files would be overwritten by checkout:
        instdir/program/abplo.dll
        instdir/program/basctllo.dll
        instdir/program/chartcontrollerlo.dll
        instdir/program/chartcorelo.dll
        instdir/program/cuilo.dll
        instdir/program/dbalo.dll
        instdir/program/dbaxmllo.dll
        instdir/program/dbulo.dll
        instdir/program/deploymentgui.dll
        instdir/program/dlgprovlo.dll
        instdir/program/frmlo.dll
        instdir/program/gengal.exe
        instdir/program/lwpftlo.dll
        instdir/program/msfilterlo.dll
        instdir/program/msformslo.dll
        instdir/program/mswordlo.dll
        instdir/program/ooxlo.dll
        instdir/program/pcrlo.dll
        instdir/program/pdffilterlo.dll
        instdir/program/rptlo.dll
        instdir/program/rptuilo.dll
        instdir/program/rptxmllo.dll
        instdir/program/scfiltlo.dll
        instdir/program/sclo.dll
        instdir/program/scuilo.dll
        instdir/program/sdbtlo.dll
        instdir/program/sdfiltlo.dll
        instdir/program/sdlo.dll
        instdir/program/sduilo.dll
        instdir/program/setup.ini
        instdir/program/slideshowlo.dll
        instdir/program/smlo.dll
        instdir/program/soffice.bin
        instdir/program/sofficeapp.dll
        instdir/program/svgfilterlo.dll
        instdir/program/svxcorelo.dll
        instdir/program/svxlo.dll
        instdir/program/swlo.dll
        instdir/program/swuilo.dll
        instdir/program/utllo.dll
        instdir/program/uuilo.dll
        instdir/program/vbaeventslo.dll
        instdir/program/vbahelperlo.dll
        instdir/program/vbaobjlo.dll
        instdir/program/vbaswobjlo.dll
        instdir/program/version.ini
        instdir/program/wpftcalclo.dll
        instdir/program/wpftdrawlo.dll
        instdir/program/wpftimpresslo.dll
        instdir/program/wpftwriterlo.dll
        instdir/program/writerfilterlo.dll
        instdir/program/writerperfectlo.dll
        instdir/program/xmlsecurity.dll
        instdir/share/config/images_breeze.zip
        instdir/share/config/images_breeze_dark.zip
        instdir/share/config/images_breeze_dark_svg.zip
        instdir/share/config/images_breeze_svg.zip
        instdir/share/config/images_colibre.zip
        instdir/share/config/images_colibre_svg.zip
        instdir/share/config/images_elementary.zip
        instdir/share/config/images_elementary_svg.zip
        instdir/share/config/images_karasa_jaga.zip
        instdir/share/config/images_karasa_jaga_svg.zip
        instdir/share/config/images_sifr.zip
        instdir/share/config/images_sifr_dark.zip
        instdir/share/config/images_sifr_dark_svg.zip
Please commit your changes or stash them before you switch branches.
Aborting
Comment 13 himajin100000 2021-09-12 15:30:21 UTC
possibly..?

https://gerrit.libreoffice.org/c/core/+/116842
Comment 14 JO3EMC 2021-09-13 06:14:18 UTC
Reproduced in Win10.

The situation is as follows:

Header and Footer are enabled:
  - When the file is created in 7.1.6

Header and Footer are disabled:
  - When the file is created in 
    7.2.0, 
    7.2.1.2, 
    7.3.0.0.a0(daily master 2021-09-12_05.43.05)

For the same file, the behavior was the same no matter which of the following versions was used to open it.
    7.1.6, 
    7.2.0, 
    7.2.1.2, 
    7.3.0.0.a0(daily master 2021-09-12_05.43.05)

The situation is the same for ODS and FODS.

So, I suppose that this issue occurs when a file is saved rather than a file is opened.

Version: 7.1.6.2 (x64) / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL

Version: 7.2.0.4 (x64) / LibreOffice Community
Build ID: 9a9c6381e3f7a62afc1329bd359cc48accb6435b
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL

Version: 7.2.1.2 (x64) / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: b733ccad171e6def8fbdb93f31875dfdea47bdc6
CPU threads: 8; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL
Comment 15 JO3EMC 2021-09-13 07:28:16 UTC
I tried a similar approach to Comment 9.
Look at the FODF file.

Open attachment 174988 [details] (header-footer-test.fods) with text editor.

(1)
See lines 195-200.
You can find strings {fo:min-height="1.6cm"}.
In other words, the set height information is saved in the file.

(2)
See lines 218-227.
You can find elements, 
  {<style:header-first style:display="false"/>}
  and 
  {<style:footer-first style:display="false"/>}.
These elements were not found in another FODS file created in 7.1.6.
Delete or comment out these two lines (lines 222 and 227), save them, and try opening them in LO.
We will find the resurrected headers and footers, corresponding to each line.
The height setting value will also be reproduced.

From the above, it seems that the parameters newly output after 7.2 are causing the problem.

(3)
When attachment 174957 [details] is saved in FODS, 
  {<style:header style:display="false"/>}
  was output instead of 
  {<style:header-first style:display="false"/>}.
I don't know what's different between the two.
Comment 16 JO3EMC 2021-09-13 07:47:12 UTC
(In reply to JO3EMC from comment #14)
> So, I suppose that this issue occurs when a file is saved rather than a file
> is opened.
> 
However, there is a possibility that the newly output parameters should be read...
Comment 17 m.a.riosv 2021-09-13 13:29:52 UTC

*** This bug has been marked as a duplicate of bug 144184 ***
Comment 18 Xisco Faulí 2021-10-05 10:27:39 UTC

*** This bug has been marked as a duplicate of bug 144940 ***