Bug Hunting Session
Bug 115611 - FORMATTING: more flexible page numbering method for presentation
Summary: FORMATTING: more flexible page numbering method for presentation
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: ImpressDraw-Enhancements
  Show dependency treegraph
 
Reported: 2018-02-10 12:39 UTC by Mark Hung
Modified: 2019-04-08 09:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
PP2016 starting with slide #3 (36.57 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2018-03-20 14:06 UTC, Heiko Tietze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2018-02-10 12:39:26 UTC
This is a feature enhancement request. Several times I was asked for provide presentation slides that do not count its page number from the beginning. Impress and Draw lacks the ability to do so. While investigating ODF format, I believe it is possible to implement the feature.


1. ODF:
    • text:page-number
    • text:page-variable-set
    • text:page-variable-get
    • text:page-adjust
The text:page-adjust attribute specifies an adjustment to page numbering.
    • text:select-page
display or not the number of a previous ("previous") or following ("next") page rather than the number of the current ("current") page.
    • page number is stored as follows:
          <draw:text-box>
            <text:p text:style-name="MP3">
              <text:page-number>&lt;Page number&gt;</text:page-number>
            </text:p>
          </draw:text-box>

2. OOXML:
    • The firstSlideNum is stored in firstSlideNum of "p:presentation" attribute.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<p:presentation xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:p="http://schemas.openxmlformats.org/presentationml/2006/main" firstSlideNum="17" saveSubsetFonts="1">

Microsoft Powerpoint allow that to be 0 or above.
    • A slide number represent this way:

            <a:fld id="{187415C5-879D-4501-8217-F89AD3660AFC}" type="slidenum">
              <a:rPr lang="en-US" altLang="zh-TW" smtClean="0"/>
              <a:t>17</a:t>
            </a:fld>
Comment 1 Buovjaga 2018-03-03 19:13:53 UTC
Let's ask design team, how it should look like.
Comment 2 Heiko Tietze 2018-03-20 14:06:32 UTC
Created attachment 140746 [details]
PP2016 starting with slide #3

PP16 hides this option at the slide dimension dialog. Better we provide access at the Header and Footer dialog at "[ ] Slide number, starting with [  1]+/-".
Comment 3 Heiko Tietze 2018-03-20 14:09:33 UTC
PP dialog: https://support.office.com/en-us/article/insert-or-change-the-slide-numbers-date-or-footer-in-powerpoint-slides-8bad6395-a1f4-4af6-a360-0df412e510bf?ui=en-US&rs=en-US&ad=US

Exporting the presentation to ODF also starts with 1.

@Regina: Any format restrictions?
Comment 4 Regina Henschel 2018-03-20 15:10:23 UTC
(In reply to Heiko Tietze from comment #3)

> @Regina: Any format restrictions?

Yes. You need the attribute style:first-page-number of the page-layout-properties. Notice, that this is different from Writer. There it is the attribute style:page-number of the table-properties or paragraph-properties respectively.

The attribute style:first-page-number can have the value type "positiveInteger" or the keyword "continue".
http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#property-style_first-page-number

So especially 0 is not allowed. An OASIS issue to allow 0 too does not exist yet. The corresponding issue for style:page-number is https://issues.oasis-open.org/browse/OFFICE-3923.

Currently the attribute style:first-page-number is ignored by LibreOffice.
Comment 5 Heiko Tietze 2018-03-20 15:39:11 UTC
(In reply to Regina Henschel from comment #4)

But "any" number (unsigned short or char makes sense) greater than zero would be compliant with the format, right?
Comment 6 Regina Henschel 2018-03-20 16:00:03 UTC
"positiveInteger" is defined at https://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#positiveInteger

I do not understand your question. Numbers are always characters in file text, because file text is XML. And because it is not implemented, there exists no model. It is up to the implementer to make a model. And the model need not be the same as the UI. In most cases conversions between model and UI are made.
Comment 7 Heiko Tietze 2018-03-20 16:06:39 UTC
(In reply to Regina Henschel from comment #6)
> I do not understand your question. 

You started comment 4 with "Yes (there is a limitation)", and I wanted to make sure that it's only the zero that can't be used.
Comment 8 Mark Hung 2018-05-23 08:58:39 UTC
@Regina:

I wonder if using text:page-adjust="-1" is also a valid solution? 

Something like:
<text:page-number text:page-adjust="-1">

In Writer user can double click on page number field to set the adjust value. Although [OFFICE-3923] is the right way but that requires ODF1.3.
Comment 9 Regina Henschel 2018-05-23 10:13:55 UTC
(In reply to Mark Hung from comment #8)
> @Regina:
> 
> I wonder if using text:page-adjust="-1" is also a valid solution? 
> 

A solution to what problem? The attribute text:page-adjust does not mean to change a page number or do a simple calculation. But e.g. text:page-adjust="2" means to show the number of two pages ahead, _in the case_ such page exists, and otherwise show no number at all. Because there exists no page with number 0, you cannot get a display of 0 by using text:page-adjust="-1".

LibreOffice has not implemented the attribute "style:first-page-number" of the <style:page-layout-properties> element. So you get no user page number at all.

ODF sets domain "positiveInteger" for attribute "style:first-page-number". So we need in addition the same solution as in OFFICE-3923 to allow zero as page number.
Comment 10 Franklin Weng 2018-10-25 12:25:31 UTC
This is a common request to start the page number 1 at slide 2, especially when the slides are used as a tutorial material.

Is this request still under UX evaluation? 
Any plan to implement it?
Comment 11 Regina Henschel 2018-10-25 17:14:20 UTC
Progress is slow. But I have created https://issues.oasis-open.org/browse/OFFICE-3953 in the meantime.
Comment 12 Regina Henschel 2018-10-29 17:16:58 UTC
ODF TC has agreed to allow non-positive numbers for attribute "20.258 style:first-page-number". It will be possible in ODF 1.4. So enough time for UX to suggest, how this will be integrated in the dialogs. Then we need a volunteer to implement it.
Comment 13 Heiko Tietze 2018-10-31 09:26:45 UTC
(In reply to Regina Henschel from comment #12)
> So enough time for UX to suggest, how this will be integrated in the dialogs. 

Still think such an option needs to be close to the place where page numbering is activated (see also comment 2). So ideally below "[ ] Slide number" (with indentation) at the Header and Footer dialog. 

Alternatively we could place the start value at Page settings under the "Page number" type (1,2,3... | A,B,C... etc.). 

While the first variant is very easy to find and draws some attention to the feature I imagine the alternative also not so hard to discover when looking for the option. If we put the option in the Header/Footer dialog it would be part of the master, not sure if that makes sense.