Bug 145936 - FORMATTING: Changing text page size changes the page style for endnotes, and hides part of the endnotes
Summary: FORMATTING: Changing text page size changes the page style for endnotes, and ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Footnote-Endnote Writer-Styles-Page
  Show dependency treegraph
 
Reported: 2021-11-28 17:05 UTC by LeroyG
Modified: 2023-02-18 21:01 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample file with a large endnote. (10.80 KB, application/vnd.oasis.opendocument.text)
2021-11-28 17:05 UTC, LeroyG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LeroyG 2021-11-28 17:05:54 UTC
Created attachment 176556 [details]
Sample file with a large endnote.

Version is 7.1.7.2 (not eligible in the list here).

Steps to Reproduce
==================
1. Type some text and add a large (1+ page) endnote (or open the attached file).
2. Activate menu View - Text Boundaries.
3. Change first page height to 5 cm.
4. Restore endnote page size to A4 portrait.
5. Change endnote page height to 5 cm.
6. Click in the second endnote page, hold Shift and press Arrow Up until you reach the first endnote page, then press Arrow Down.
7. Change page one size to A4 portrait.

Actual Results
==============
After step 3:
The page orientation for the endnotes change to landscape.
After step 5:
The endnote text boundarie continues out of the pages border (you can see the text boundaries but no the endnote text).
After step 6:
You can select upward but no downward, unless you do it with (Ctrl+)Arrow Right.
After step 7:
The page orientation for the endnotes change to portrait. Many pages added.

Expected Results
================
After step 3:
The page orientation for the endnotes do not change.
After step 5:
New pages are added to encompass the endnote content.

Other Information
=================
Version: 7.1.7.2 (x64) / LibreOffice Community
Build ID: c6a4e3954236145e2acb0b65f68614365aeee33f
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: default; VCL: win
Locale: es-MX (es_ES); UI: en-US
Calc: CL
Comment 1 LeroyG 2021-11-28 19:28:27 UTC
+ Steps to Reproduce
==================
Before step 6, choose multi-page view and adjust zoom factor to view at least two pages side-by-side (or set zoom factor to Entire Page or Fit width and height).

+ Actual Results
==============
After step 6:
[…] and Ctrl+Arrow Down (always holding down Shift).

The same in this environment:
Version: 7.1.7.2 / LibreOffice Community
Build ID: c6a4e3954236145e2acb0b65f68614365aeee33f
CPU threads: 1; OS: Linux 4.12; UI render: default; VCL: kf5
Locale: es-MX (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 2 Dieter 2021-12-15 07:59:26 UTC
(In reply to LeroyG from comment #0)
> After step 3:
> The page orientation for the endnotes change to landscape.

I confirm it with
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 2934472ab888ebfe64a153984af2902fac63a7a0
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

As there is the basic rule "One bug report for each problem" let's focus this report to the landscape problem. Feel free to open additional reports for the other problems.

Further testings
Height of default page style 22 cm => Endnote page is still in portrait
Height of default page style 21 cm => Endnote page is still in portrait
Height of default page style 20 cm => Orientation of default page style changes to landscape and also endnote page style changes to landscape

So there seems to be the rule "Orientation of endnote page style follows orientation of default page style"

I don't know, if this is the expected behaviour or a bug. Let's ask design team
cc: Design-Team
Comment 3 Heiko Tietze 2021-12-15 08:40:28 UTC
Landscape = Width > Height, so I don't see a problem here.

But in fact, endnotes are not updated when the page style changes. Happens also when you change it from A4 to A5.
Comment 4 Dieter 2021-12-15 09:18:32 UTC
(In reply to Heiko Tietze from comment #3)
> Landscape = Width > Height, so I don't see a problem here.

It's not a problem, that page orientation of default page style changes to landscape. Question was, if endote page syle should also change orientation. Your answer is yes, and that's O.K. for me. Don't know what happens, if you have - for example - first page style in portrait and then a default page style in landscape.
Comment 5 Mike Kaganski 2021-12-15 09:20:01 UTC
(In reply to Dieter from comment #4)
> (In reply to Heiko Tietze from comment #3)
> > Landscape = Width > Height, so I don't see a problem here.
> 
> Question was, if endote page syle should also change orientation.
> Your answer is yes, and that's O.K. for me.

And my answer is "no" ;)
This is a regression - at least it was not so in 4.4.
Comment 6 Heiko Tietze 2021-12-15 09:31:44 UTC
Changing the Default PgS also affects the Endnote PgS but no other in the document (at least one manually created). => bug
Comment 7 raal 2023-02-18 16:17:39 UTC
This seems to have begun at the below commit.
Adding Cc: to Caolán McNamara ; Could you possibly take a look at this one?
Thanks
 a8461899f33e3a07713239130aeea1b29786f075 is the first bad commit
commit a8461899f33e3a07713239130aeea1b29786f075
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Mon Dec 14 21:34:13 2020 +0100

    source ccd89a02f8b5f0e7c542353c5bf0a774dbf781d2

https://git.libreoffice.org/core/+/ccd89a02f8b5f0e7c542353c5bf0a774dbf781d2
Comment 8 Caolán McNamara 2023-02-18 21:01:14 UTC
caolanm->raal: I think that bisect doesn't really help. In the version without that fix add an initial set of adding a single character to the document before following the other steps (this sets the document to "modified"). Then after that, format page, and set height to 5cm, and ok and the same behavior is seen without that commit which just faithfully recognized that there was a modification done to the document by changing a page style.

If I bisect with that extra step then I get the result of:

commit c927ea4c5d8a9ede979e17c09c2303854ccdebec
Author: Muhammet Kara <muhammet.kara@collabora.com>
Date:   Mon Jun 24 01:46:42 2019 +0300

    Sync page orientation of Endnote page
    
    Description:
    When changing the default page style to have a different orientation,
    end-notes are placed on a page with a custom ‘Endnote’ page style.
    This style does not inherit its orientation from the default style.
    
    Repro:
    Create a blank document, insert→End Note, Format→Page in the first page,
    select the Page tab, and alter the Orientation to Landscape, ‘Ok’.
    The End-note page should update its orientation too.
    
    NB. If the Endnote page style is manually set to a different value
    in a document template it will remain in the selected orientation.
    
    After this patch, Default style and the Endnote style have their
    orientations synced after each run of the Format > Page dialog.
    
    Ideally, this should be solved by resolving tdf#41316 on master:
    Page styles should support hierarchical parent-child relationships
    (like paragraph or character styles)
    
    Change-Id: I255b470d1aebb897f50a4a74b8678b771ffbab28
    Reviewed-on: https://gerrit.libreoffice.org/79869
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
    Reviewed-by: Andras Timar <andras.timar@collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/82173
    Tested-by: Jenkins
    Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>

If I go back to the oldest version I have, and manually toggle the "endnote" page style from portrait to landscape then I think I get the odd behavior too.

So the change of the endnote orientation along with the default page style orientation was deliberate, and not in itself a bad idea, but the result is unsatisfactory I guess.

One possible tweak might be to only do the "syncEndnoteOrientation" if the default page style paper size matches the endnote page style paper size?