Description: When creating or editing a paragraph template and setting a page number in "Text Flow" / "Breaks", an incorrect page number is shown using "Page number" field. Using "Format" - "Paragraph" - "Text Flow" tab, the page number is shown correctly. Steps to Reproduce: 1. Create a new paragraph style and in "Text Flow" / "Breaks" check "Insert" with "Type" = "page", set a Page Style and set "Page Number" to a number N 2. Apply this template to a paragraph Actual Results: If the number N is even, an even number is shown (but not necessarily the number N), otherwise an odd number is shown Expected Results: The number N should be shown as the page number of the new page Reproducible: Always User Profile Reset: Yes Additional Info: Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac CPU threads: 8; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win Locale: it-IT (it_IT); UI: it-IT Calc: threaded
Thank you for reporting the bug. I'm not able to reproduce this as I'm not quite sure what to look out for. Could you please provide a screenshot and a file demonstrating the bug? If the number N is even, an even number is shown where? I found that if I created 3 pages, and applied the steps to reproduce and set the number N to 8, it considers page 3 as page 4. Tested with: Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6a064b1967e06e40be40817deff99d00c1a8554f CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: ko-KR (en_US); UI: en-US Calc: CL threaded Version: 24.2.1.2 (X86_64) / LibreOffice Community Build ID: db4def46b0453cc22e2d0305797cf981b68ef5ac CPU threads: 16; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded
Created attachment 193252 [details] Test file with wrong page numbers
Created attachment 193253 [details] Wrong page numbers 3 (7 expected) and 4 (10 expected)
I've attached an ODT file and an image to illustrate the problem I'm having: the page number doesn't match the expected number when applying a paragraph style that sets the page number. Using the "A Set Page 7" style on the second page results in the page numbered "3" instead of "7"; using the "A Set Page 10" style on the next page, the page is treated as numbered "4" instead of "10".
I was able to reproduce the bug using the test file you provided. I also encountered similar behavior when I reproduced the steps provided. An even page number only shows an even number N and an odd page number only shows an odd number N. If a page number is odd/even and the number is even/odd, the page number goes back a page. For example, when I tried changing page 11 to page 12, the page number changed to page 10 instead. Everything was tested on MacOS Sonoma 14.1.2 running on my M2 Pro Chip MacBook Pro. These are the two builds I used: Stable Build Version: 24.2.2.2 (AARCH64) / LibreOffice Community Build ID: d56cc158d8a96260b836f100ef4b4ef25d6f1a01 CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded Master/Daily Build Version: 24.8.0.0.alpha0+ (AARCH64) / LibreOffice Community Build ID: c4023d3ec604abfff38be2053e2989c7ec2ba8c1 CPU threads: 10; OS: macOS 14.1.2; UI render: Skia/Metal; VCL: osx Locale: en-US (en_US.UTF-8); UI: en-US Calc: threaded
This is intentional, but see bug 153259. Quoting some comments from the dev chat: "expected behaviour - in print a work with a change from an odd to an odd page number will have an empty page in between, and that is usally counted in the total number" "in Writer, between two odd pages, there will always be an even one (maybe automatic blank); same between two even pages."