Bug 149480 - text:page-adjust behaves wrong when page number is defined manually
Summary: text:page-adjust behaves wrong when page number is defined manually
Status: NEW
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: 2022-06-07 15:12 UTC by Mike Kaganski
Modified: 2025-04-28 03:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2022-06-07 15:12:43 UTC
In a new text document:

1. Add two page breaks (so that the document has three pages);
2. Edit the last page break, to define page style (the same Default) and page number (1);
3. Add a footer to Default page style;
4. Add a Page Number field, a text " and the next is ", and another Page Number field to the footer text; the second Page Number field should have Offset set to 1.

Using of Version: 7.3.4.1 (x64) / LibreOffice Community
Build ID: 13668373362b52f6e3ebcaaecb031bd59a3ac66b
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: CL Jumbo

The end result is:
First page has footer text  "1 and the next is 2"
Second page has footer text "2 and the next is 3"
Third page has footer text  "1 and the next is 2"

Note the ODF description of the feature provided in bug 35694 comment 39; the current text is at [1].

Two problems here:

1. Second page must show "2 and the next is 1";
2. Third page must show  "1 and the next is " (there must be no number after "is").

Rationale:
The feature is meant to refer to previous or following pages, not to do arithmetic operations with current page number. The wording makes sure to tell about "display of page numbers of following or preceding pages", i.e., the offset is used to get to some page before or after, but the display must reflect the target page number as it is defined on that page.

This means that on page 2, the next page is the third one - and that page must be found using the offset; then that third page's number (i.e., "1") must be displayed.

On the third page, the offset must result in an absent next page, and the display must be empty, as specified by the standard.

[1] https://docs.oasis-open.org/office/OpenDocument/v1.3/OpenDocument-v1.3-part3-schema.html#attribute-text_page-adjust
Comment 1 Regina Henschel 2022-06-07 16:30:40 UTC
I agree with you. If the document has a page sequence of "1" "2" "A", then offset +1 should generate "2", "A", "".

I see the same problem in AOO.
Comment 2 BogdanB 2023-04-28 15:45:40 UTC
The same
Retested with
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 424bdeda9fea09f0b48b5551baf872656845c7c3
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded
Comment 3 QA Administrators 2025-04-28 03:09:41 UTC
Dear Mike Kaganski,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug