Bug 154928 - current page number get empty if you get over the document total pages number
Summary: current page number get empty if you get over the document total pages number
Status: RESOLVED DUPLICATE of bug 35694
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.2.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Fields-Page-Number
  Show dependency treegraph
 
Reported: 2023-04-20 09:50 UTC by Giovanni
Modified: 2024-03-25 13:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
the ODT example file (9.66 KB, application/vnd.oasis.opendocument.text)
2023-04-20 09:53 UTC, Giovanni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Giovanni 2023-04-20 09:50:38 UTC
Menu / Insert / Page Number
Select that page number, than Right Mouse Button: "Edit Fields" and you set Offset as 98 on page 37 in a document of 134 pages the field get empty instead of 98 + 37 = 135.
If you set Offset with 97 than you get 134 on page 37 but if you see next page you see empty.

It' s like you can add any offset as you wish but:

if "current page number" + "offset" > "document total pages number " than
"current page number" becomes "empty"

It's like the bug #35694: https://bugs.documentfoundation.org/show_bug.cgi?id=35694
Comment 1 Giovanni 2023-04-20 09:53:04 UTC
Created attachment 186809 [details]
the ODT example file
Comment 2 sdc.blanco 2023-04-28 13:39:08 UTC
Maybe this is a duplicate report for bug 149480?

@Giovanni - do you agree?
Comment 3 Giovanni 2023-04-28 13:44:17 UTC
Well, not exactly. I think it's two different issue about the same core code.
Comment 4 Mike Kaganski 2023-04-28 14:15:25 UTC
This is not a bug, but *exactly* how this feature is intended to work.
See the feature's description in the standard [1]:

> The text:page-adjust attribute specifies an adjustment of the value of a page
> number field, to display of page numbers of following or preceding pages. The
> specified value is added to the current page number. **If a page with the resulting page number does not exist, no number is displayed**.

(emphasis is mine)

[1] https://docs.oasis-open.org/office/OpenDocument/v1.3/OpenDocument-v1.3-part3-schema.html#attribute-text_page-adjust
Comment 5 Giovanni 2023-04-28 14:57:18 UTC
It's not a very user friendly feature.
Comment 6 sdc.blanco 2023-04-28 15:02:35 UTC
(In reply to Giovanni from comment #5)
> It's not a very user friendly feature.
You could add a comment to bug 153811 (to suggest a more friendly feature) or open a new ticket, mentioning this ticket, and requesting an enhancement or make a suggestion for a better user interface. (The reason given in comment 4 describes the underlying implementation, but the user interface could be programmed differently).
Comment 7 Mike Kaganski 2023-04-28 15:17:07 UTC
First of all, the wish to use page field like that indicates that one does not number their pages *properly* (i.e., using page breaks' page styles with numbers).
Comment 8 Mike Kaganski 2024-03-25 13:37:56 UTC

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