Bug 149867

Summary: Comments in header: unpredictable behaviour
Product: LibreOffice Reporter: ajlittoz <page74010-sf>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: buzea.bogdan, jag, jorendc, telesto
Priority: medium    
Version: 4.4.7.2 release   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=65107
https://bugs.documentfoundation.org/show_bug.cgi?id=128041
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 106179    
Attachments: Simple file with comment in header

Description ajlittoz 2022-07-05 13:48:31 UTC
Created attachment 181127 [details]
Simple file with comment in header

Information attached to a header is expected to be displayed on every page (of the corresponding style).

A header is a nice location to attach a comment related to a significant part of a document and have this comment permanently visible over the extent of the page style usage. Unfortunately, comments are displayed only once.

Steps to reproduce:

1. create an A6 document with a header (A so that pages overflow rapidly)
2. attach a comment in the header (the document is still empty and comment displays on page one
3. "lorem"+F3: you now have 2.5 pages of text (in Text Body format; varies with paragraph style)
   The comment has jumped to page 2
4. if you go to page 3 to add a comment there, it will be displayed aside the existing comment on page 2

= Next steps are hard to reproduce as they seem to occur randomly.
1. go to end of document, "lorem"+F3
   The comment may jump to page 5 (out of 6)
Iterate preceding step: comments seems to be locked to page 5

= Delete whole paragraphs one by one. The comment remains displayed on page 5 until document has less than 5 pages at which time it jumps back to page 2.

Since a header is repeated on every page, user expects EVERY object in the header to be repeated (text, fields, frames, comments, …).

This strange behaviour was already reported in bug 65107, but the issue is perhaps different where OP apparently expect the comment to display only on the page where it is inserted. I also reported an inconsistent header behaviour related to conditional contents (visible depending on a variable value) in bug 128041.
Comment 1 Wolfgang Jäger 2022-07-05 14:24:55 UTC
Confirming. 
Bug also present in V 7.4.0.0.beta1.
Comment 2 Wolfgang Jäger 2022-07-05 15:05:29 UTC
The issue reaches back (at least) to V 4.4.7. 
It was not present the described way in V 4.2.8. There the comments (annotations) are shown for the first page of the first sequence of pages of same PageStyle. 

The (probably intentional) behaviour of showing any annotation only once for a sequence was already present in V 3.3.

Strange: AOO 4.1.7. also doesn't display the comments on the firts page.

Additional: If a sequence of equally styled pages was broken, and the style containing ba comment in its header or footer is newly chosen by a "named page break" the comment isn't shown anywhere for the new sequence. Bad.
Comment 3 ajlittoz 2022-07-05 16:06:07 UTC
Added Jorendc on CC list as he was apparently the author of a "fix" for bug 65107