Bug 160990

Summary: Different header/footer content on first page not honoured after first occurrence
Product: LibreOffice Reporter: ajlittoz <page74010-sf>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: miguelangelrv, stephane.guillou
Priority: medium    
Version: 7.6.6.3 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: First chapter page should have no header/footer

Description ajlittoz 2024-05-08 14:59:56 UTC
Created attachment 194027 [details]
First chapter page should have no header/footer

This is a follow-on to https://ask.libreoffice.org/t/first-page-not-being-appled-to-new-page-after-page-break/105618/9

Default Page Style is configured so that first page can have different header/footer: both boxes are UNCHECKED in Header and Footer tabs (avoiding bug 100287 and bug 156036).

Heading 1 paragraph style Text Flow properties are set for page break Before with Default Page Style.

I then expect the first page of every "chapter" to be considered as the first page in a sequence of Default Page Style. This works on first occurrence where style switches from First Page but fails when starting a new chapter with Heading 1.

I tried replacing the automatic application with direct formatting with same failure.

I am quite puzzled because this is a feature implemented long ago and it has always given the expected result.

Behaviour is faulty both in 7.6.6.3 and 24.2.3.2.

There may be something in the document. Initially it was provided on AskLO but contents copied from internet (AskLO site) was pasted without precaution. Fearing a possible pollution by unwanted formatting directives, I rebuild the example file pasting as unformatted text.I don't see anything weird in the FODT (but I am not an expert in ODF).

Could a developer have a look at the attached file and find the error? Thanks.
Comment 2 Stéphane Guillou (stragu) 2024-05-24 05:44:16 UTC
I'm not super experienced with the flow of styles, but is a page break always also understood as a "restart" of the page style, as in: the page after the page break is considered to be a "first page" regardless of the fact that the previous page uses the same page style?
6.0.0.3 behaves the same as a current daily build, so it's not a new behaviour.
But I see your explanation in https://ask.libreoffice.org/t/no-header-on-first-page-of-a-chapter/82407/6 and it sounds like you made it work previously...

Version: 24.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ae798781ef4df7a1fdef13af0bc459bf4f6e7b4c
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 3 ajlittoz 2024-05-24 11:41:43 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> I'm not super experienced with the flow of styles, but is a page break
> always also understood as a "restart" of the page style, as in: the page
> after the page break is considered to be a "first page" regardless of the
> fact that the previous page uses the same page style?
>
It depends on the page break.

"Ordinary" Ctrl+Enter page breaks do not restart the sequence. And it is fortunate. Forcing a page break is a common event. It is not expected to disturb page sequence.

Since restarting a sequence is rather "exceptional", it is acceptable to have a mnaul process with Insert>More Breaks>Manual Break. In the dialog, you explicitly force the page style. This voluntary action causes the restart, even if the selected page style is the same as the current one.

When such a restart is systematically associated with a paragraph style, the same effect is achieved by configuring the break in the Text Flow tab of the paragraph style.

I am a bit surprised by the bug because I feel it worked previously (which release? I don't remember). I am not affected by this bug because my templates use the "sophisticated" approach with separate page styles for first, left and right pages. Their Next field is set accordingly.

However, newbies are put off balance by it. Using the 3-style approach in every circumstances is not user-friendly and opens the door to severe critics compared to M$ Word. So it is important that the "simplified" 1-style feature be restored quickly.