Bug 167846 - Improve Header/Footer implementation
Summary: Improve Header/Footer implementation
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Header-Footer
  Show dependency treegraph
 
Reported: 2025-08-07 09:31 UTC by Heiko Tietze
Modified: 2025-08-07 11:44 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2025-08-07 09:31:21 UTC
Insert > Header and Footers... depend on Format > Page Style. We have the following scenarios:

[x] Header: [x] Same on left/right [x] Same on first
[x] Footer: [x] Same on left/right [x] Same on first
=> Header/Footer -> as expected

[x] Header: [x] Same on left/right [ ] Same on first
[ ] Footer
=> Header (right) -> I'd expect Header (but it starts ScHFEditRightHeaderDlg)
(same for Footer)

Page Layout: Mirrored
[x] Header/Footer: [ ] Same on left/right [x] Same on first
=> Header/Footer (first/left/right) -> would expect Header/Footer (left/right) but no first

Page Layout: Mirrored
[x] Header/Footer: [x] Same on left/right [ ] Same on first
=> Header/Footer -> would expect Header/Footer (first) and Header/Footer

----

We currently have a large number of dialogs for the command, see sc/source/ui/inc/hfedtdlg.hxx.  It executes per SID_HFEDIT and picks one of the RID_SCDLG_HFEDIT_* depending on the page settings. Would be much easier to maintain if the tabs were conditionally added or removed in one c'tor.

I wonder how Caolan's work in ScHFEditActiveDlg comes into play with all these other functions.

The
Comment 1 Roman Kuznetsov 2025-08-07 10:04:12 UTC
In bug 121777 I suggested something about it
Comment 2 Heiko Tietze 2025-08-07 11:44:14 UTC
(In reply to Roman Kuznetsov from comment #1)
> In bug 121777 I suggested something about it

Interesting idea. But it misses header/footer varying on first/left/right pages. And that's what seems to be broken.