Bug 114085 - Allow to set page break's page number, without also setting page style.
Summary: Allow to set page break's page number, without also setting page style.
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillCpp
Depends on:
Blocks: ODF-spec Writer-Page-Break
  Show dependency treegraph
 
Reported: 2017-11-27 06:32 UTC by Mike Kaganski
Modified: 2019-08-10 21:02 UTC (History)
7 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 2017-11-27 06:32:22 UTC
When one wants to define a new page number for a page starting with this paragraph, one creates a page break and needs to define "With page style", and only then can enter the new number.

This makes it difficult later to change page style of contiguous run of pages that should share common page style, but have some page breaks with page numbers. Each such break starts new pages run that must be processed individually when assigning a new page style in this case.

After commit d36fa0589ab822dc617c65b4d0d3bf68c092ad37 and commit c1e7fc6f497d7570cb0832c43647d295f8592567 (see bug 77111), the page number has its own checkbox. I suppose that now it would be possible to remove this entry's dependency on "With page style" setting.

The page number is defined in paragraph style like this:

> <style:style style:name="P2" style:family="paragraph" style:parent-style-name="Standard" style:master-page-name="Standard">
>     <style:paragraph-properties style:page-number="6" fo:break-before="page"/>
> </style:style>

The style:page-number attribute of style:paragraph-properties seems to not depend on style:master-page-name attribute of style:style. Still, removing the style:master-page-name also disables loading the number form modified file.

So, the suggestion is to disentangle the page number feature from "With page style" option; is that something permitted by standard?
Comment 1 Michael Stahl (CIB) 2017-11-27 14:04:40 UTC
<quote>
20.320 style:page-number
The style:page-number attribute specifies the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.
</quote>

apparently this is currently not permitted - the page number is tied to the page style name.

the interesting question is, are there existing documents that have the style:page-number attribute on a style but not the style:master-page-name one.
Comment 2 Michael Stahl (CIB) 2017-11-27 14:12:11 UTC
just remembered that there is a somewhat related issue:

Clarify how master-page-break and fo:break-before resp. fo:break:after interact
https://issues.oasis-open.org/browse/OFFICE-2103

unfortunately this wasn't actually resolved and by now i forgot it all but i don't think there was any discussion of style:page-number attribute.
Comment 3 Xisco Faulí 2018-01-29 17:32:41 UTC
@Mike, @Michael, How should be proceed here? Should it be moved to NEW or to RESOLVED WONTFIX ? Could you please clarify ?
Comment 4 Dieter 2018-11-27 20:31:22 UTC
(In reply to Xisco Faulí from comment #3)
> @Mike, @Michael, How should be proceed here? Should it be moved to NEW or to
> RESOLVED WONTFIX ? Could you please clarify ?

Set to NEEDINFO because of comment 3.
Comment 5 Mike Kaganski 2018-11-27 20:34:21 UTC
Unless somebody (Regina?) finds a way to make this into the standard (or a way to use existing standard's features for this), this should be WONTFIX...
Comment 6 Xisco Faulí 2018-11-28 13:03:05 UTC
(In reply to Mike Kaganski from comment #5)
> Unless somebody (Regina?) finds a way to make this into the standard (or a
> way to use existing standard's features for this), this should be WONTFIX...

@Regina, any opinion here?
Comment 7 Regina Henschel 2018-11-28 14:37:51 UTC
You can use the custom page number. It is one of the "variables" of the "Fields" (shortcut Ctrl+F2). To restart numbering with 1 use "Set page variable" with value "on" at the start of the first paragraph after the page break. To show the page number e.g. in the header use "Show page variable".

The evaluation of attribute style:page-number of a paragraph/table style is restricted to the case, that the paragraph/table style specifies a master page to be used. As far as I remember, there had been no discussion in ODF TC to evaluate it too in case an attribute fo:break-before or fo:break-after exists. At least I do not find any suitable Jira issue.
Comment 8 Mike Kaganski 2018-11-28 14:43:35 UTC
(In reply to Regina Henschel from comment #7)
> You can use the custom page number. It is one of the "variables" of the
> "Fields" (shortcut Ctrl+F2). To restart numbering with 1 use "Set page
> variable" with value "on" at the start of the first paragraph after the page
> break. To show the page number e.g. in the header use "Show page variable".

The question is not about workarounds: any workaround would be inappropriate in some ways, like using in ToCs or cross-references. That isn't a user question "How do I do this?" either. This is a proposal to enhance the functionality, in particular, to allow a range of pages *with breaks with page number resets* to share a single page style, with possibility to change the style in *one single place* (at the beginning of the range, without the need to go through all the places where page numbers are reset).

> The evaluation of attribute style:page-number of a paragraph/table style is
> restricted to the case, that the paragraph/table style specifies a master
> page to be used. As far as I remember, there had been no discussion in ODF
> TC to evaluate it too in case an attribute fo:break-before or fo:break-after
> exists. At least I do not find any suitable Jira issue.

So I suppose that the idea of this request is to provoke such discussion and create such Jira issue :-)
Comment 9 Regina Henschel 2018-11-28 22:56:58 UTC
Why is such feature important? Are you going to implement it?
Comment 10 Mike Kaganski 2018-11-29 05:17:21 UTC
(In reply to Regina Henschel from comment #9)
> Why is such feature important?

I have been helping users at my prior job; and I always saw the confusion about why they need to define page styles when they want to set a page number. I also see the constant questions on Ask site, where people are confused why, when they apply a page style, it only applies to some small section of the document. This is a very real usability issue, which actually shows a bad design (what is the rationale behind linking together the unrelated concepts of assigning page styles and assigning page numbers to a paragraph?).

> Are you going to implement it?

Well - quite possibly (if the recommended approach would not be over my head :-)). I am the one who asked for that in the first place :-)
Comment 11 Dieter 2018-11-29 08:37:09 UTC
I support your idea, Mike. Perhaps it's a question to the design team.
Comment 12 Heiko Tietze 2018-11-29 12:50:16 UTC
(In reply to Dieter Praas from comment #11)
> I support your idea, Mike. Perhaps it's a question to the design team.

I agree with Mike that it is a weird situation from UX POV. But the previous comments go towards WONTFIX, and a workarounds are there. So what can we do?
Comment 13 Dieter 2018-11-29 13:28:58 UTC
(In reply to Heiko Tietze from comment #12)
> But the previous
> comments go towards WONTFIX, and a workarounds are there. So what can we do?

I only could see this tendency in Reginas comment. the workaround is only for very experienced users. So I vote for NEW.
Comment 14 Regina Henschel 2018-11-29 14:23:35 UTC
I'm only very cautious in regard to new features, because I (or Michael) will have to write the specification text and to defend the change in the ODF TC. But if you think it is useful for ordinary users and Mike will implement it, then NEW is OK for me.
Comment 15 Mike Kaganski 2018-12-10 05:22:29 UTC
Code pointers:
* class SwFormatPageDesc
* XMLPropStyleContext::CreateAndInsert (ODF import; see XML_STYLE_FAMILY_TEXT_PARAGRAPH)
Comment 16 Heiko Tietze 2018-12-10 08:29:59 UTC Comment hidden (no-value)
Comment 17 Mike Kaganski 2018-12-10 08:45:06 UTC
(In reply to Heiko Tietze from comment #16)

This was meant for myself :-)