Bug 153811 - When modify Offset of Page Number field, last Page Number is not shown
Summary: When modify Offset of Page Number field, last Page Number is not shown
Status: RESOLVED DUPLICATE of bug 35694
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields-Page-Number
  Show dependency treegraph
 
Reported: 2023-02-24 17:51 UTC by jcsanz
Modified: 2024-03-25 13:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Demo document with 3 pages and an offset of 2 (9.16 KB, application/vnd.oasis.opendocument.text)
2023-04-28 15:28 UTC, BogdanB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jcsanz 2023-02-24 17:51:08 UTC
Description:
When modify Offset of a Page Number in the Edit fields dialog, the last Page Number field don't show the page number

Steps to Reproduce:
1. Open a Writer document
2. Insert a (page) footer
3. Insert a Page Number in the footer
4. Double clic in the Page Number field to show Edit Fields dialog
5. Modify Offset 
6. Ok to close dialog
7. The page number disappears in the last page
8. Write text or insert a page break to obtain a new page
9. The page number appears in the page but is not shown in the new page

Actual Results:
The page number disappears in the last page

Expected Results:
All the page should have a page number


Reproducible: Always


User Profile Reset: No

Additional Info:
The last page page number is not shown on a page preview nor when the page is printed.
--------------
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 14a36ad49518bcb5b606b0f1640e3ca56b636e89
CPU threads: 16; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded
--------------
Version: 7.4.4.2 / LibreOffice Community
Build ID: 40(Build:2)
CPU threads: 2; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: es-ES
Ubuntu package version: 1:7.4.4-0ubuntu0.22.10.2
Calc: threaded
Comment 1 m_a_riosv 2023-02-24 22:06:20 UTC
Reproducible also in Header.
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ab20dba30769a5a52830220daa347772485db6a2
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded Jumbo
Comment 2 BogdanB 2023-04-02 16:52:46 UTC
After pressing OK, the field should be updated and the cursor should move before the field, like for the date field. Somehow, the field is selected and deleted after the update.
Comment 3 sdc.blanco 2023-04-28 13:13:49 UTC
seems related to bug 154928  (or bug 154928 gives a diagnosis for this report).

For example: use offset 3.
Then the footer page number is shown for all pages, except for the last 3 pages.
Comment 4 sdc.blanco 2023-04-28 13:40:12 UTC
Or maybe a DUP of bug 149480?
Comment 5 sdc.blanco 2023-04-28 14:23:54 UTC
Maybe this is NAB?  See bug 154928 comment 4, which quotes from the ODF spec [1].

"If a page with the resulting page number does not exist, no number is displayed"

It is also mentioned in the help [2].  If the help should be improved, then this ticket's component could be converted to Documentation.

[1] https://docs.oasis-open.org/office/OpenDocument/v1.3/OpenDocument-v1.3-part3-schema.html#attribute-text_page-adjust
[2] https://help.libreoffice.org/7.6/en-US/text/swriter/01/04090001.html
Comment 6 BogdanB 2023-04-28 15:27:57 UTC
Based on Documentation, in a document with 3 pages and NO offset:
Page 1 is Page 1
Page 2 is Page 2
Page 3 is Page 3

Expected:
In the same document with 3 pages and with an offset of 2, based of documentation:
Page 1 is Page 3
Page 2 doesn't have a number (should be 4, but there is no a 4-th page)
Page 3 doesn't have a number (should be 5, but there is no a 5-th page)

Actual Result:
Page 1 is Page 3 [OK]
Page 2 is Page 4 (in spite of not having 4 pages in total) [NOT ok]
Page 3 doesn't have a number (should be 5, but there is no a 5-th page), so is correct based on documentation.

Documentation: https://help.libreoffice.org/7.6/en-US/text/swriter/01/04090001.html
With an Offset value of 1, the field will display a number that is 1 more than the current page number, but only if a page with that number exists. On the last page of the document, this same field will be empty.
Comment 7 BogdanB 2023-04-28 15:28:31 UTC
Created attachment 186986 [details]
Demo document with 3 pages and an offset of 2
Comment 8 Mike Kaganski 2024-03-25 13:47:25 UTC

*** This bug has been marked as a duplicate of bug 35694 ***