[Libreoffice-bugs] [Bug 117995] New: Faulty page numbering sequence

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Jun 4 14:26:44 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=117995

            Bug ID: 117995
           Summary: Faulty page numbering sequence
           Product: LibreOffice
           Version: 5.4.7.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: page74010-sf at yahoo.fr

Description:
Text flow for a paragraph style is set to cause page break "before" to a
dedicated page style with page number forced to restart. This page style (for
the first page in a book part) has a "Next Style" rule to make subsequent pages
use another style (common pages of the book part, so that header is different
from first page).

The book part is written, styling the first paragraph with said paragraph
style. Subsequent paragraphs are styled according to "Next Style" rule until
style settles in a "Text Body"-like one.

Page break occurs as expected switching to desired page style and subsequent
pages have the  expected style.

However, page number sequence is n, 1, 2, 3, … where n is the forced page
number in the "Text Flow" tab of the paragraph style.

I've tried various workarounds but they don't survive save-exit-open cycle. The
only effective workaround is to remove the page break from style definition and
insert a manual page break with the same properties.

Why does it work with manual page break and not with specially crafted
paragraph style?



Steps to Reproduce:
Use the attached document. Go to the license chapter to see the effect where
page number is forced to 25. To revert to a "normal" situation:

1. Modify "GNU FDL Title" paragraph style to uncheck the "Insert break" check
box in "Text Flow" tab
2. Insert a manual page break before the heading of the license chapter with
page style LicenceStart and page number 25
3. Sequence is now correct

Actual Results:  
Page number to forced value on first page after break, then sequence restarted
at 1

Expected Results:
Monotonically increasing page number


Reproducible: Sometimes


User Profile Reset: Yes



Additional Info:
The problem appeared a few releases back with a template applied to many
documents. The attached sample inherits directly from this template.

Since the template is in constant evolution, I don't remember which editing
steps brought it to its present state.

I've even tried to delete and re-create the involved styles (paragraph + page)
to no avail. If I try to build from scratch a small sample document with same
characteristics, it works like a charm. I don't know if it's a matter of size.

I had a look to the XML.

The paragraph style with break <style:style … > has an attribute
style:master-page-name="…" with a nested <style;paragraph-properties …
style:page-number="25" … >

Both data are missing in the "revised" paragraph style (without break).

In the faulty document, usage is:

     <text:h text:style-name="name_of_the_style" … />

In the "corrected" document, a new paragraph style is defined to account for
the manual page break as:

     <style:style style:name="P39" style:family="paragraph"
                  style:parent-style-name="name_of_the_style"
                  style:master-page-name="page_style_to_switch_to">

with an embedded element

    <style:paragraph-properties style:page-number=25"/>

At the point of use we have:

     <text:h text:style-name="name_of_the_style" … />
     <text:h text:style-name="P39" …> … </text:h>

These are the only differences I've noticed, but I'm no XML specialist.


User-Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:60.0) Gecko/20100101
Firefox/60.0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180604/99e69270/attachment-0001.html>


More information about the Libreoffice-bugs mailing list