Bug 118326 - lowriter displays the wrong number of pages
Summary: lowriter displays the wrong number of pages
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.1 all versions
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-22 19:07 UTC by Jordi
Modified: 2018-06-25 19:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Page break assigns number 7 for 2nd page (9.58 KB, application/vnd.oasis.opendocument.text)
2018-06-24 09:36 UTC, Jordi
Details
Page breaks assign odd numbers to even pages and even numbers to odd pages (9.60 KB, application/vnd.oasis.opendocument.text)
2018-06-24 09:38 UTC, Jordi
Details
Assign number 4 to 2nd page. No problem here. (9.50 KB, application/vnd.oasis.opendocument.text)
2018-06-24 09:39 UTC, Jordi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jordi 2018-06-22 19:07:48 UTC
Description:
The total number of pages of the document displayed in lowriter exceeds in 1 the actual number of pages when one or several page breaks with page number are present.

Steps to Reproduce:
1. Create new document
2. Insert page break
3. Click on page break --> edit page break
4. Option "With page style" and "page number": any number but 0 (say n)

Actual Results:
On bottom left corner, where it displays the document's number of pages, it displays "Page 3 of 3 (page n)" 

Expected Results:
it should display "Page 2 of 2 (page n)" 


Reproducible: Always


User Profile Reset: Yes



Additional Info:
I just work with 5.1.6.2, I don't know if there is any earlier version affected.

I tested version 6.0.5.2 in a virtual machine for this bug and could reproduce the problem so version 6.0.5.2 for linux has this problem too.
Comment 1 Susan Gessing 2018-06-23 01:51:42 UTC
I have confirmed a related issue. I'm not sure if it belongs here, but please let me know and I'll follow the proper steps.

On the following 2 builds, if I create a page break and put/keep the focus on the second page, the lower left corner still states "Page 1 of 1". This happens even if I move about from page 1 to 2 and back again.

Using Windows 8.1, happens in:

Version: 6.0.5.2 (x64)
Build ID: 54c8cbb85f300ac59db32fe8a675ff7683cd5a16
CPU threads: 4; OS: Windows 6.3; UI render: GL; 
Locale: en-US (en_US); Calc: CL

 and

Version: 6.2.0.0.alpha0+
Build ID: b1740fba0d1e6e3d69c3781734509317f42a0e4f
CPU threads: 4; OS: Windows 6.3; UI render: GL; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-06-15_08:49:04
Locale: en-US (en_US); Calc: CL
Comment 2 Telesto 2018-06-23 08:26:18 UTC
(In reply to Susan Gessing from comment #1)
> I have confirmed a related issue.
Sounds like bug 116208
Comment 3 Jean-Baptiste Faure 2018-06-23 21:57:21 UTC
@Jordi: what is the style of page used in your document? In some case the insertion of a new chapter beginning at a new page may introduce a blank page if the new chapter must start on an odd (right) page.

Please, attach a test file with which adding a page break causes this weird behavior.

Status set to NEEDINFO, please set it back to UNCONFIRMED once requested
informations are provided.

Best regards. JBF
Comment 4 Jordi 2018-06-24 09:36:11 UTC
Created attachment 143066 [details]
Page break assigns number 7 for 2nd page

writer says there are 3 pages and the document has only 2.
Comment 5 Jordi 2018-06-24 09:38:32 UTC
Created attachment 143067 [details]
Page breaks assign odd numbers to even pages and even numbers to odd pages

writer says there are 7 pages and the document has only 4.
Comment 6 Jordi 2018-06-24 09:39:37 UTC
Created attachment 143068 [details]
Assign number 4 to 2nd page. No problem here.
Comment 7 Jordi 2018-06-24 09:43:00 UTC
@JBF
Reading your answer I noticed that it adds a page if in the page break you assign an odd number to an even page or an even number to an odd page. 

I'm not sure anymore whether or not this is a bug. Just I wouldn't count that non-existing pages on the total number of pages. 

I think the attachments explain quite well the behavior.
Comment 8 Jean-Baptiste Faure 2018-06-24 12:58:25 UTC
It is not a bug, it is the layout Right and left. Odd page numbers are always on right pages, and even page numbers on left page.
If you do not want that behavior (which is standard when you compose a book), you should use alternatively "Right Page" and "Left Page", starting with a right page.

Closing as NotABug.

Best regards. JBF
Comment 9 Jordi 2018-06-24 13:18:18 UTC
Ok, thanks for your time and sorry for the inconvenience.

Jordi