Bug 86630 - MENU: Easily insert page number into header/footer with extended menu Insert
Summary: MENU: Easily insert page number into header/footer with extended menu Insert
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Justin L
URL:
Whiteboard: target:7.6.0 inReleaseNotes:7.6 targe...
Keywords: topicUI
: 52620 106239 107181 (view as bug list)
Depends on:
Blocks: Main-Menu UNO-Command-New Split-Group-Buttons Fields-Page-Number
  Show dependency treegraph
 
Reported: 2014-11-23 14:45 UTC by Yousuf Philips (jay) (retired)
Modified: 2024-03-23 17:30 UTC (History)
15 users (show)

See Also:
Crash report or crash signature:


Attachments
Inserting a page number in MS Word (39.81 KB, image/png)
2014-11-25 14:45 UTC, Yousuf Philips (jay) (retired)
Details
Insert Page Number in OnlyOffice 6.0 - Spanish Version on Windows 10 Pro. (106.74 KB, image/png)
2020-10-28 08:13 UTC, Albert Acer
Details
Inserting Page number in WPS Office Free (Writer) - Spanish Version on Windows 10 Pro. O.S. (235.24 KB, image/jpeg)
2020-11-14 05:45 UTC, Albert Acer
Details
Inserting Header or Footer - WPS Office Writer - with Page Number (Spanish Version) (204.64 KB, image/jpeg)
2020-11-14 06:30 UTC, Albert Acer
Details
Inserting Page Number in FreeOffice - TextMaker (197.27 KB, image/jpeg)
2020-11-28 05:36 UTC, Albert Acer
Details
Inserting Page number in Google Office Docs (170.92 KB, image/png)
2020-12-15 06:09 UTC, Albert Acer
Details
page_number_wizard_allFirst.odt: a 3 page document, all FirstPage style (10.13 KB, application/vnd.oasis.opendocument.text)
2023-04-28 12:26 UTC, Justin L
Details
page number wizard_evenOnly.odt: two pages, two different styles (10.13 KB, application/vnd.oasis.opendocument.text)
2023-04-28 12:40 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-11-23 14:45:11 UTC
In order to make it easier for individuals to add a page number to a document, we could provide this in the Insert Menu in the following way.

Insert
  Page Number
    Into Current Position
    - separator -
    Into Footer Centered
    Into Footer Left Aligned
    Into Footer Right Aligned
    - separator -
    Into Header Centered
    Into Header Left Aligned
    Into Header Right Aligned

Alternatively we could shrink this down by allowing just one in entry each for footer and header and it have it centered and then a user can adjust it accordingly.
Comment 1 Cor Nouws 2014-11-23 15:00:39 UTC
Hi Jay,

I expect that in other applications Insert > Page number also takes care of placing the cursor in the footer, and adding a footer first when needed.
"Adding a page number to the document" is not the same.
Comment 2 Yousuf Philips (jay) (retired) 2014-11-23 16:12:21 UTC
Hi Cor,

Well this one was targeting Writer. :D

With Calc, it would have to modify the styles used in the Header and Footer dialog. With Impress it would check the checkboxes in the Header and Footer dialog for footer and slide number.
Comment 3 Cor Nouws 2014-11-23 21:15:54 UTC
(In reply to Jay Philips from comment #2)
> Hi Cor,
> 
> Well this one was targeting Writer. :D

Well, I'm a bit baffled here. What makes you think that I think it is not Writer?

What is the use of Insert > Page number when the cursor is _not_ in a header/footer?
What people know from the other application, Insert > Page number that is a combination of our Insert > Footer .. and Insert > Field > Page number.
Just as I wrote in the other issue where you suggested to create the Insert > Page number menu. It's not a change as simple as you suggest in you initial comment in this issue.

I assume that an attitude more focused on trying to understand what someone writes, rather then again explaining what your idea was, may be beneficial here.

> With Calc, it would have to modify the styles used in the Header and Footer
> dialog. With Impress it would check the checkboxes in the Header and Footer
> dialog for footer and slide number.

Therefore, since the header/footer in Calc is default, the menu Edit > Header/Footer is logic there. So that one can edit the contents and formatting.
And in Impress indeed Insert > Page number to activate the placeholder that is in the footer and part of the masterpage.
Comment 4 Yousuf Philips (jay) (retired) 2014-11-24 05:06:40 UTC
(In reply to Cor Nouws from comment #3)
> Well, I'm a bit baffled here. What makes you think that I think it is not
> Writer?

As you had mentioned other applications (i'm assuming you meant Calc and Impress by that) i was just clarifying the concept.

> What is the use of Insert > Page number when the cursor is _not_ in a
> header/footer?

Insert > Page Number > Into Footer is intended to create a footer if one is not already present and add the page number to it.

> What people know from the other application, Insert > Page number that is a
> combination of our Insert > Footer .. and Insert > Field > Page number.
> Just as I wrote in the other issue where you suggested to create the Insert
> > Page number menu. It's not a change as simple as you suggest in you
> initial comment in this issue.

Yes i should have been clearer with the concept in the initial description.

> Therefore, since the header/footer in Calc is default, the menu Edit >
> Header/Footer is logic there. So that one can edit the contents and
> formatting.

Yes you are correct about this as LO acts different to other apps, which dont put in the header/footer until a user decides to insert it.
Comment 5 Frank Berke 2014-11-25 12:14:19 UTC
Instead of inflating the menu structure, which slows down workflow, what is the point in letting the user choose whether or not to alter align in a second step?

Please mind, that activating header/footer decreases the real estate on your page, so that an unconscious acitation of these areas might lead to higher frustration levels if the users' carefully arranged content suddenly floats around.

And, as a final point: you usually enter page numbers just once, so there's no big saving anyway. If people repeatedly need documents that contain page numbering, they shoud be encouraged to create page templates.
Comment 6 Yousuf Philips (jay) (retired) 2014-11-25 14:45:29 UTC
Created attachment 110002 [details]
Inserting a page number in MS Word

(In reply to Frank Berke from comment #5)
> Instead of inflating the menu structure, which slows down workflow, what is
> the point in letting the user choose whether or not to alter align in a
> second step?

The point is to automate this process for the user. Have a look in the attachment for how MS Word does it for users.

> Please mind, that activating header/footer decreases the real estate on your
> page, so that an unconscious acitation of these areas might lead to higher
> frustration levels if the users' carefully arranged content suddenly floats
> around.

Most documents have page numbers put in the headers and footers, so i dont understand your argument.

> And, as a final point: you usually enter page numbers just once, so there's
> no big saving anyway. If people repeatedly need documents that contain page
> numbering, they shoud be encouraged to create page templates.

In a single document, you may have different sections and in those sections you would insert the page number each time or in different locations. You may also have different content on left and right pages.
Comment 7 Robinson Tryon (qubit) 2014-12-22 03:25:23 UTC Comment hidden (obsolete)
Comment 8 Yan Pas 2015-06-08 21:26:04 UTC
The purpose of this suggestion is to make life easier for newbies. It was impossible for me to insert page number without Google. But on the other side there is one extra entry in huge submenu.
As a Compromise:
Insert
	Footer
		Basic
		<Other styles>
		------------
		Page number in current page-style
	Header
		Basic
		<Other styles>
		------------
		Page number in current page-style

Footer and headers contain mostly only page number, so...
Comment 9 Robinson Tryon (qubit) 2016-08-25 05:39:25 UTC Comment hidden (obsolete)
Comment 10 Zenaan Harkness 2016-09-07 04:47:39 UTC
In MSO Word 2002, there is the option:
HEADER/FOOTER Toolbar -> Insert AutoText -> Page X of Y

This is a very useful shortcut, which I find myself lamenting the lack of in LO.

Would such a menu entry be a separate enhancement request, or part of this one?
Comment 11 Yousuf Philips (jay) (retired) 2016-09-07 20:32:43 UTC
(In reply to Zenaan Harkness from comment #10)
> Would such a menu entry be a separate enhancement request, or part of this
> one?

I think it is fine here as an alternative option for each of the submenu entries.
Comment 12 Yousuf Philips (jay) (retired) 2017-03-02 10:07:23 UTC
*** Bug 106239 has been marked as a duplicate of this bug. ***
Comment 13 mr.Pablo 2017-03-02 10:15:38 UTC
I agree that the submenu structure mentioned above by Yousuf Philips (Jay) makes a lot of sense and life would be made easier for LO users.

The submenu entries could also be called:

Insert
  Page Number
    Into Current Position
    - separator -
    Bottom Centered
    Bottom Left Aligned
    Bottom Right Aligned
    - separator -
    Top Centered
    Top Left Aligned
    Top Right Aligned
Comment 14 Heiko Tietze 2017-03-02 10:22:57 UTC
I'm against the proposed shortcut, in particular with all the formatting options, and agree with comment 5.

Removing UXEval
Comment 15 mr.Pablo 2017-03-02 10:38:48 UTC Comment hidden (no-value)
Comment 16 V Stuart Foote 2017-03-02 14:33:54 UTC
Adjusting the menu control is fine.

We already have the "Page Number" entry on the Insert menu. So simply making it a split menu to add the sub-menu as indicated in comment 0 or comment 13 does not clutter the UI and makes sense.  Although I would use the "At Current Position" and "Into" for the header/footer.

It becomes a more specialized alternative to the current Insert -> Field sub-menu.
Comment 17 Yousuf Philips (jay) (retired) 2017-04-24 14:32:26 UTC
So we need a group button type UNO command of .uno:InsertPageNumberField, similar to .uno:InsertFieldCtrl. It will be useful button that can go into the Insert tab of the Notebookbar.
Comment 18 Albert Acer 2020-10-28 07:38:15 UTC
This Bug was created 6 years ago (since November 2014) and it has been abandoned since April 2017. Apparently there is no solution in sight or reports about possible advances for its solution. I understand that Mr. Yousuf Philips is retired, so from today I assume as spokesman, on behalf of the users, requesting a solution to this problem. In other free-use office suites such as WPS Office Free, SoftMaker FreeOffice and OnlyOffice Free Desktop Editors have already solved this same problem, some of them using reverse engineering techniques to understand how this works in Microsoft Office Word.
Comment 19 Albert Acer 2020-10-28 08:04:17 UTC
In the image that I attach today (28-October-2020) shows, for example, how this problem was solved in a relatively new Open Source Office Suite, known as OnlyOffice Desktop Editors, which comes with the distribution of GNU / Linux known as LinuxFx 10.X. Taking advantage of the fact that OnlyOffice is open source, I think that LibreOffice developers could review, analyze or study the OnlyOffice code to understand how they managed to solve this problem less than a year ago.
Comment 20 Albert Acer 2020-10-28 08:13:25 UTC
Created attachment 166790 [details]
Insert Page Number in OnlyOffice 6.0 - Spanish Version on Windows 10 Pro.
Comment 21 Albert Acer 2020-11-14 05:45:57 UTC
Created attachment 167295 [details]
Inserting Page number in WPS Office Free (Writer) - Spanish Version on Windows 10 Pro. O.S.

Here's another image showing how to insert page numbering, with all positioning and alignment options, into a text document, using WPS Office Free (Writer), Spanish Version, on Windows 10 Professional.
Comment 22 Albert Acer 2020-11-14 06:30:22 UTC
Created attachment 167296 [details]
Inserting Header or Footer - WPS Office Writer - with Page Number (Spanish Version)

Inserting Header/Footer in WPS Office Free (Writer) - Spanish Version on Windows 10 Pro. O.S.
Comment 23 Albert Acer 2020-11-28 05:36:44 UTC
Created attachment 167630 [details]
Inserting Page Number in FreeOffice - TextMaker

Today I am attaching a screenshot in which we can see how the Page Number is inserted, in a text document, using FreeOffice TextMaker (Spanish Version) from the SoftMaker software house, running on Windows 10 Professional in Spanish.
Comment 24 Albert Acer 2020-12-15 06:09:14 UTC
Created attachment 168179 [details]
Inserting Page number in Google Office Docs

This is the procedure to insert the page number in Google Docs.
Comment 25 Justin L 2022-08-30 14:43:50 UTC
(In reply to Heiko Tietze from comment #14)
> I'm against the proposed shortcut, in particular with all the formatting
> options, and agree with comment 5.
+1
I agree with leaving things as they are. Please note that in the header/footer context menu, there is now an "insert page number" option, making it very easy to add a page number at the same time that you create the header/footer.

(In reply to Zenaan Harkness from comment #10)
> HEADER/FOOTER Toolbar -> Insert AutoText -> Page X of Y
This is bug 52620
Comment 26 Commit Notification 2023-01-06 07:42:45 UTC
offtkp committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/c010b5d2b2cdb22f48ef9d2b9d1fdc6125e1fec2

tdf#86630 sw: Add one-step page number insertion wizard

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 27 Paris Oplopoios 2023-01-06 18:16:11 UTC
There's now a dialog for easy insertion of page numbers to header/footer in master, through Insert->Page Number...

If you want to insert a Page Number field you can still do it through Insert->Fields->Page Number or the Insert->Fields->More Fields... dialog.

I think this bug can be marked solved.
Comment 28 Justin L 2023-01-06 21:09:47 UTC
I would have expected a wizard to offer some advanced features as well:
-select the type of numbering: roman in particular being a common option.
   -of course, the user could also double-click on the field to change this
   -(I didn't know about that until I tried it just now.)

-starting page number: especially important when switching from roman numbering to "Arabic" numbering as is commonly done from index pages to main content.
    -this will be complicated though, because it requires a page break.
    -actually, some of this is already handled by Format - Title Page.
    -double-click on field also offers (poorly worded) "offset" to handle this.

-ability to select different types of numbering  (i.e. page 1 of 3 as requested in comment 10)
   -the " of " becomes problematic though because it needs to be localized (although it is just text, so the user can modify it by hand easily enough once it is in the footer).
   -just including a tick box to "include total page count" would make me happy.
Comment 29 Justin L 2023-01-06 21:11:47 UTC
I noticed running this multiple times inserts multiple page numbers. That's logical, but not ideal. As we make it more complex, it gets harder to determine, so probably this "oddity" can just be ignored.
Comment 30 Stéphane Guillou (stragu) 2023-04-20 20:45:41 UTC
Given that we now have the header/footer dropdown menu's "Insert page number" and the Insert > Page Number dialog, I think this report can be closed.
There certainly is space for improvement in the dialog (including physical space: adding functionalities wouldn't make it too cluttered), but new specific enhancement requests can be opened as follow-ups.
Comment 31 Commit Notification 2023-04-25 22:44:05 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bc6c5356c5cfa5c09145b54b87ad7be4d8f40ca2

tdf#86630 sw page number wizard: default to center of page

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 32 Commit Notification 2023-04-26 07:36:02 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f6f14b98b8be8319c810708e73cffdb189c467ca

tdf#86630 sw page number wizard: set page style numbering type

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 33 Commit Notification 2023-04-28 06:07:20 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/a3a758350e92a3084d2cbef05ca6caef899746a4

tdf#86630 sw page number wizard: only turn on current page footer

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 34 Commit Notification 2023-04-28 06:07:22 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d4cf5814146e375805df98eafba2baf321b9b005

tdf#86630 sw page number wizard: cleanup numbering type patch

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 35 Commit Notification 2023-04-28 06:08:25 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/21fad629e72791f6cc1791fdba858bf52b9bfeff

tdf#86630 sw page number wizard: mirror right/left

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 36 Commit Notification 2023-04-28 10:49:21 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/511505f0ca11632be19b5923791c39d65c994673

tdf#86630 sw page number wizard: mirror margins as well

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 37 Justin L 2023-04-28 12:26:26 UTC
Created attachment 186984 [details]
page_number_wizard_allFirst.odt: a 3 page document, all FirstPage style

This is an interesting test document. It likely won't do what you expect it to do when running the insert page number wizard.

The "First Page" page style automatically spills over into "Default Page Style", so normally it is only seen once, and there is no need therefore to specify a "different first page".

Well, in this example I DID enable different first page, and then on each page break, forced it back to First Page.

That means that the first page will show the first header, the second page will show the Right header (if different l/r is also changed), and the third page will show the Left header.

Currently, the wizard is normally giving pages 2 and 3 a number - not 1. That's a bit unexpected, but probably OK. This is an extreme edge case after all.

I deliberately avoid mirroring these "First" kind of page styles.
Comment 38 Justin L 2023-04-28 12:40:19 UTC
Created attachment 186985 [details]
page number wizard_evenOnly.odt: two pages, two different styles

(In reply to Commit Notification from comment #35)
> tdf#86630 sw page number wizard: mirror right/left
In order for mirroring to work, both a left and right page must exist. Therefore the wizard will ignore the mirror command unless two pages exist (or three if the first header is already not shared).

This example shows how the assumptions can go wrong. If you are on the second page, then it meets the definition of enough (2) pages, but there is only one (even) "Default Page Style" page. So if you try to insert a mirrored right page number, the results might be unexpected.

[Note that if you are on the first page and you insert mirrored right, it won't attempt to put page numbers on page 2 - that is a different page style. That is very intentional...]
Comment 39 sdc.blanco 2023-04-28 12:55:28 UTC
I would suggest to change the label for .uno:PageNumberWizard to "Page Number Wizard" in [1] (so that it does not overlap with the two existing "Page Number" labels shown in the Customize dialog).  (and of course a ContextLabel with "Page Number..." would be needed to get the right appearance in the menu).

[1] officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
Comment 40 sdc.blanco 2023-04-28 13:35:19 UTC
(In reply to Justin L from comment #38)
> In order for mirroring to work, both a left and right page must exist.
Note bug 140655, which points out that this only applies to LTR documents, and suggests Odd/Even for rtl documents.
Comment 41 Justin L 2023-04-28 14:57:16 UTC
(In reply to Justin L from comment #37)
> This is an interesting test document. It likely won't do what you expect it
> to do when running the insert page number wizard.
> 
> Currently, the wizard is normally giving pages 2 and 3 a number - not 1.
That's true when the footer had to be created. In that case, creating the footer moved the cursor to page 2 (GetPhyPageNum() changed for whatever reason). On the second run (when the footer is already created) there is no cursor movement, so the first page can be numbered on the second try. Excellent.
Comment 42 sdc.blanco 2023-04-30 14:24:38 UTC
(In reply to Commit Notification from comment #32)
> tdf#86630 sw page number wizard: set page style numbering type
Thanks for polishing the wizard Justin. Now that the page numbering scheme can be selected in the wizard, I wonder if it is hard to modify the "preview" so that it shows the selected scheme, instead of "#".
Comment 43 Justin L 2023-05-01 20:55:54 UTC
(In reply to sdc.blanco from comment #42)
> I wonder if it is hard to modify the
> "preview" so that it shows the selected scheme, instead of "#".
It will not be trivial to do this. I won't be attempting it.
Comment 44 Commit Notification 2023-05-01 21:56:55 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b89f65a5138fe74b7858c2817fae4204b021c1f5

tdf#86630 sw page number wizard: add contextLabel

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 45 Commit Notification 2023-05-02 11:49:15 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/6dfa1fc2fa9a7cdbbaf5ecd27528c95f744e0db4

tdf#86630 sw page number wizard: allow wizard to be re-run

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 46 Commit Notification 2023-05-02 13:36:36 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/751cb2cf874a2d017cae699a7983e4419dcbe6f6

tdf#86630 sw page number wizard: add page total

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 47 Commit Notification 2023-05-03 01:09:57 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/98f766004e29ea35eef6fcf3a4c28696b95f6c90

tdf#86630 sw page number wizard: try avoid copying bookmarks

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 48 BogdanB 2023-05-03 20:02:31 UTC
Justin, please try this test on master:
- open a new document, click in the top part of the page, then click on Header
- after the header is created, Insert - Page Number (keep everything as it is) - press OK
- Crash (I don't get a report to attach here)

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a4e8c663b613fcd2ec26211faedb6e703f27806b
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 49 BogdanB 2023-05-03 20:09:07 UTC
I restarted in Safe Mode, Factory settings.

These are result from debugrun:

(gdb) run --writer
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/bogdan/Documente/LibreOffice7.6/core/instdir/program/soffice.bin --writer
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libuno_sal.so.3-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libuno_cppu.so.3-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libsvllo.so-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libtllo.so-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libutllo.so-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libvcllo.so-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libbasegfxlo.so-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
[New Thread 0x7fffea5c7640 (LWP 113039)]
[New Thread 0x7fffe9dc6640 (LWP 113040)]
[New Thread 0x7fffe9457640 (LWP 113041)]
[New Thread 0x7fffe8c56640 (LWP 113042)]
[New Thread 0x7fffdbfff640 (LWP 113043)]
[New Thread 0x7fffdb7fe640 (LWP 113044)]
[New Thread 0x7fffdabff640 (LWP 113045)]
[Thread 0x7fffdabff640 (LWP 113045) exited]
[New Thread 0x7fffdabff640 (LWP 113046)]
[New Thread 0x7fffd9fff640 (LWP 113047)]
[Thread 0x7fffdabff640 (LWP 113046) exited]
[New Thread 0x7fffdabff640 (LWP 113048)]
[New Thread 0x7fffd97fe640 (LWP 113049)]
[Thread 0x7fffd9fff640 (LWP 113047) exited]
[Thread 0x7fffdabff640 (LWP 113048) exited]
[Thread 0x7fffd97fe640 (LWP 113049) exited]
[New Thread 0x7fffd97fe640 (LWP 113050)]
[New Thread 0x7fffdabff640 (LWP 113051)]
[New Thread 0x7fffd9fff640 (LWP 113053)]
[New Thread 0x7fffd86f9640 (LWP 113054)]
[New Thread 0x7fffd84f8640 (LWP 113055)]
[New Thread 0x7fffd82f7640 (LWP 113056)]
[New Thread 0x7fffbf3ff640 (LWP 113057)]
[New Thread 0x7fffbf1fe640 (LWP 113058)]
[New Thread 0x7fffbeffd640 (LWP 113059)]
[New Thread 0x7fffbedfc640 (LWP 113060)]
[New Thread 0x7fffbebfb640 (LWP 113061)]
[New Thread 0x7fffbe9fa640 (LWP 113062)]
[New Thread 0x7fffbe7f9640 (LWP 113063)]
[New Thread 0x7fffbe5f8640 (LWP 113064)]
[New Thread 0x7fffbe3f7640 (LWP 113065)]
[New Thread 0x7fffbe1f6640 (LWP 113066)]
[New Thread 0x7fffbdff5640 (LWP 113067)]
[New Thread 0x7fffbddf4640 (LWP 113068)]
[Thread 0x7fffdabff640 (LWP 113051) exited]
[Thread 0x7fffd97fe640 (LWP 113050) exited]
[New Thread 0x7fffd97fe640 (LWP 113069)]
[New Thread 0x7fffdabff640 (LWP 113070)]
[Thread 0x7fffd97fe640 (LWP 113069) exited]
[Thread 0x7fffdabff640 (LWP 113070) exited]
[New Thread 0x7fffdabff640 (LWP 113071)]
[Thread 0x7fffdabff640 (LWP 113071) exited]
[New Thread 0x7fffdabff640 (LWP 113072)]
[New Thread 0x7fffd97fe640 (LWP 113073)]
[Thread 0x7fffdabff640 (LWP 113072) exited]
[Thread 0x7fffd97fe640 (LWP 113073) exited]
[Thread 0x7fffea5c7640 (LWP 113039) exited]
[New Thread 0x7fffea5c7640 (LWP 113075)]
warning: File "/home/bogdan/Documente/LibreOffice7.6/core/instdir/program/libswlo.so-gdb.py" auto-loading has been declined by your `auto-load safe-path' set to "$debugdir:$datadir/auto-load".
[Detaching after vfork from child process 113076]
[New Thread 0x7fffd97fe640 (LWP 113084)]
[New Thread 0x7fffdabff640 (LWP 113085)]
[Thread 0x7fffdabff640 (LWP 113085) exited]
[Thread 0x7fffd97fe640 (LWP 113084) exited]
[Thread 0x7fffea5c7640 (LWP 113075) exited]
[New Thread 0x7fffea5c7640 (LWP 113086)]
[Thread 0x7fffea5c7640 (LWP 113086) exited]
[Thread 0x7fffdb7fe640 (LWP 113044) exited]
[New Thread 0x7fffdb7fe640 (LWP 113090)]
[New Thread 0x7fffea5c7640 (LWP 113091)]
[Thread 0x7fffdb7fe640 (LWP 113090) exited]
[Thread 0x7fffea5c7640 (LWP 113091) exited]
[New Thread 0x7fffea5c7640 (LWP 113092)]
[New Thread 0x7fffdb7fe640 (LWP 113093)]
[Thread 0x7fffea5c7640 (LWP 113092) exited]
[New Thread 0x7fffea5c7640 (LWP 113094)]
[New Thread 0x7fffd97fe640 (LWP 113095)]
[Thread 0x7fffdb7fe640 (LWP 113093) exited]
[Thread 0x7fffea5c7640 (LWP 113094) exited]
[Thread 0x7fffd97fe640 (LWP 113095) exited]
[New Thread 0x7fffd97fe640 (LWP 113096)]
[New Thread 0x7fffea5c7640 (LWP 113097)]
[Thread 0x7fffd97fe640 (LWP 113096) exited]
[Thread 0x7fffea5c7640 (LWP 113097) exited]
[New Thread 0x7fffea5c7640 (LWP 113098)]
[New Thread 0x7fffd97fe640 (LWP 113099)]
[Thread 0x7fffd97fe640 (LWP 113099) exited]
[Thread 0x7fffea5c7640 (LWP 113098) exited]
[New Thread 0x7fffea5c7640 (LWP 113100)]
[New Thread 0x7fffd97fe640 (LWP 113101)]
[Thread 0x7fffea5c7640 (LWP 113100) exited]
[Thread 0x7fffd97fe640 (LWP 113101) exited]
[New Thread 0x7fffd97fe640 (LWP 113102)]
[New Thread 0x7fffea5c7640 (LWP 113103)]
[Thread 0x7fffd97fe640 (LWP 113102) exited]
[Thread 0x7fffea5c7640 (LWP 113103) exited]
[New Thread 0x7fffea5c7640 (LWP 113104)]
[New Thread 0x7fffd97fe640 (LWP 113105)]
[Thread 0x7fffea5c7640 (LWP 113104) exited]
[New Thread 0x7fffea5c7640 (LWP 113106)]
[Thread 0x7fffd97fe640 (LWP 113105) exited]
[New Thread 0x7fffd97fe640 (LWP 113107)]
[Thread 0x7fffea5c7640 (LWP 113106) exited]
[Thread 0x7fffd97fe640 (LWP 113107) exited]
[New Thread 0x7fffd97fe640 (LWP 113108)]
[New Thread 0x7fffea5c7640 (LWP 113109)]
[Thread 0x7fffd97fe640 (LWP 113108) exited]
[Thread 0x7fffea5c7640 (LWP 113109) exited]
[New Thread 0x7fffea5c7640 (LWP 113110)]
[New Thread 0x7fffd97fe640 (LWP 113111)]
[Thread 0x7fffea5c7640 (LWP 113110) exited]
[Thread 0x7fffd97fe640 (LWP 113111) exited]
[New Thread 0x7fffd97fe640 (LWP 113112)]
[New Thread 0x7fffea5c7640 (LWP 113113)]
[Thread 0x7fffd97fe640 (LWP 113112) exited]
[Thread 0x7fffea5c7640 (LWP 113113) exited]
[New Thread 0x7fffea5c7640 (LWP 113114)]
[New Thread 0x7fffd97fe640 (LWP 113115)]
[Thread 0x7fffea5c7640 (LWP 113114) exited]
[Thread 0x7fffd97fe640 (LWP 113115) exited]
[New Thread 0x7fffd97fe640 (LWP 113116)]
[New Thread 0x7fffea5c7640 (LWP 113117)]
[Thread 0x7fffd97fe640 (LWP 113116) exited]
[Thread 0x7fffea5c7640 (LWP 113117) exited]
[New Thread 0x7fffea5c7640 (LWP 113118)]
[New Thread 0x7fffd97fe640 (LWP 113119)]
[Thread 0x7fffea5c7640 (LWP 113118) exited]
[Thread 0x7fffd97fe640 (LWP 113119) exited]
[New Thread 0x7fffd97fe640 (LWP 113120)]
[New Thread 0x7fffea5c7640 (LWP 113121)]
[Thread 0x7fffd97fe640 (LWP 113120) exited]
[Thread 0x7fffea5c7640 (LWP 113121) exited]
[New Thread 0x7fffea5c7640 (LWP 113122)]
[New Thread 0x7fffd97fe640 (LWP 113123)]
[Thread 0x7fffea5c7640 (LWP 113122) exited]
[Thread 0x7fffd97fe640 (LWP 113123) exited]
[New Thread 0x7fffd97fe640 (LWP 113124)]
[New Thread 0x7fffea5c7640 (LWP 113125)]
[Thread 0x7fffd97fe640 (LWP 113124) exited]
[Thread 0x7fffea5c7640 (LWP 113125) exited]
[New Thread 0x7fffea5c7640 (LWP 113126)]
[New Thread 0x7fffd97fe640 (LWP 113127)]
[Thread 0x7fffea5c7640 (LWP 113126) exited]
[Thread 0x7fffd97fe640 (LWP 113127) exited]
[New Thread 0x7fffd97fe640 (LWP 113128)]
[New Thread 0x7fffea5c7640 (LWP 113129)]
[Thread 0x7fffd97fe640 (LWP 113128) exited]
[Thread 0x7fffea5c7640 (LWP 113129) exited]
[New Thread 0x7fffea5c7640 (LWP 113130)]
[New Thread 0x7fffd97fe640 (LWP 113131)]
[Thread 0x7fffea5c7640 (LWP 113130) exited]
[Thread 0x7fffd97fe640 (LWP 113131) exited]
[New Thread 0x7fffd97fe640 (LWP 113132)]
[New Thread 0x7fffea5c7640 (LWP 113133)]
[Thread 0x7fffd97fe640 (LWP 113132) exited]
[New Thread 0x7fffd97fe640 (LWP 113134)]
[New Thread 0x7fffdb7fe640 (LWP 113135)]
[Thread 0x7fffea5c7640 (LWP 113133) exited]
[Thread 0x7fffd97fe640 (LWP 113134) exited]
[Thread 0x7fffdb7fe640 (LWP 113135) exited]
[New Thread 0x7fffdb7fe640 (LWP 113136)]
[New Thread 0x7fffd97fe640 (LWP 113137)]
[Thread 0x7fffdb7fe640 (LWP 113136) exited]
[Thread 0x7fffd97fe640 (LWP 113137) exited]
[New Thread 0x7fffd97fe640 (LWP 113138)]
[New Thread 0x7fffdb7fe640 (LWP 113139)]
[Thread 0x7fffd97fe640 (LWP 113138) exited]
[Thread 0x7fffdb7fe640 (LWP 113139) exited]

Thread 1 "soffice.bin" received signal SIGSEGV, Segmentation fault.
0x00007fff7eedd4ee in SwCursorShell::GotoFooterText() () from /home/bogdan/Documente/LibreOffice7.6/core/instdir/program/../program/libswlo.so
Comment 50 Commit Notification 2023-05-03 23:20:09 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/08aefd5522e54059788d53ecf863d2deac78c029

tdf#86630 sw page number wizard: fix divergence from HIG

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 51 Commit Notification 2023-05-04 00:47:21 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/83b1f6b58a30bdb589e9ce73deef39f021aebde1

tdf#86630 sw page number wizard: avoid crash when no GetCurrFrame

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 52 Justin L 2023-05-04 01:08:10 UTC
(In reply to BogdanB from comment #48)
> Open a new document, create a  Header (and leave the cursor in the header)
> Insert - Page Number  - non-mirrored footer  --> crash
Thanks for finding the reproduceable steps. I'd seen the crash a number of times during development, but hadn't narrowed down the specific sequence.

Interestingly, my favourite testing document in Comment 38 doesn't crash with these steps.
Comment 53 Justin L 2023-05-04 01:13:58 UTC
(In reply to Justin L from comment #28)
> I would have expected a wizard to offer some advanced features as well:
> -select the type of numbering: Roman in particular being a common option.
Done with comment 32

> -starting page number: 
Could be done with a button to call Format - Title page.
https://gerrit.libreoffice.org/c/core/+/151250

I like the idea in general, but not really the implementation. So I don't know whether I'll keep pushing for that.

> -ability to include page totals  (i.e. page 1 of 3 as requested in comment 10)
Done with comment 46.

Another thing I considered was saving the last state. I thought perhaps I might be able to get some of that "for free" because of calls like save_state and get_state_changed_from_saved(). But those are just an alternative to connect_changed handler links. cui/source/options/optgdlg.cxx is an example where true saving is going on. So it wouldn't be terribly difficult, but I don't think it is worth the complication. So I'm giving up on that enhancement.

I think I am done with the enhancements. There are some bookmark duplication/renaming problems under the hood - especially noticed when running the wizard on BOTH the header and the footer. So far I haven't been able to properly grasp all of the complexities of this.
https://gerrit.libreoffice.org/c/core/+/151346
Comment 54 BogdanB 2023-05-04 04:00:21 UTC
Everything fine with
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 83b1f6b58a30bdb589e9ce73deef39f021aebde1
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

I tried to break anything with corner cases. Nothing at the moment. Everything fine.

One question: is reasonable to remember input per session? For example, I inserted in the top center, but I wanted in the top left. Could remember top-center, and I just change to left? Of course, it is not hard to select the old one, delete and insert again more carefully.
Comment 55 Stéphane Guillou (stragu) 2023-05-04 09:22:32 UTC
Thanks everyone!
I updated the release notes credits and screenshot: https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F7.6&type=revision&diff=668078&oldid=667923

One follow-up could be its inclusion in the tabbed UI. Insert tab? Layout tab?
Comment 56 Justin L 2023-05-04 11:10:50 UTC
(In reply to BogdanB from comment #54)
> One question: is reasonable to remember input per session? 
I tried to answer that in comment 53, talking about "saved state". I didn't see any way to get that "for free", but what do I know - I'm not a UI designer.
Comment 57 BogdanB 2023-05-04 11:20:03 UTC
(In reply to Justin L from comment #56)
> (In reply to BogdanB from comment #54)
> > One question: is reasonable to remember input per session? 
> I tried to answer that in comment 53, talking about "saved state". I didn't
> see any way to get that "for free", but what do I know - I'm not a UI
> designer.

Ok. I thought it is easier.
Comment 58 Commit Notification 2023-05-04 17:17:38 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/639c01dcf9aabe587df0ff4f661cc4e38244e304

tdf#86630 sw page number wizard: add to notebookbar insert menus

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 59 Justin L 2023-05-04 17:34:10 UTC
(In reply to Stéphane Guillou (stragu) from comment #55)
> One follow-up could be inclusion in the tabbed UI. Insert tab? Layout tab?

I think this will have to wait until an icon is associated with it. Also (somewhat) required is the ability to customize the labels shown on notebookbar.

Because of those concerns, I am not proposing this patch, which adds it to the layout tab. https://gerrit.libreoffice.org/c/core/+/151398
Comment 60 Justin L 2023-05-04 19:51:51 UTC
(In reply to Justin L from comment #59)
> Also required is the ability to customize the labels shown on notebookbar.
This comes from pretty generic code, where the toolbox creates the string from GetLabelForCommand which looks only at the Name - composed by stripping out mnemonics and '...' from the Label.
AFTERWARDS, the Label is changed to become ContentLabel (if defined).

So, it seems highly unlikely that notebookbar can use a customized name.

The menu entries added by comment 58 get their name from GetPopupLabelForCommand.
Comment 61 Commit Notification 2023-05-04 20:40:59 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/794af70fa802c7f495d217b435991f5a7551edcc

Revert "tdf#86630 sw page number wizard: add contextLabel"

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 62 Commit Notification 2023-05-17 23:58:44 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1c98c88a1208f47327ac2f3beaf593521ce9b394

tdf#86630 sw page number wizard: add to notebookbar insert menus #2

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 63 Commit Notification 2023-05-18 15:54:10 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/00e2e3210da57c138bd998481a89760b8c7a0e47

tdf#86630 sw page number wizard: use '/' for page total

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 64 sdc.blanco 2023-05-24 12:56:51 UTC
Will post here for now, but can open new ticket if preferred.

Change tooltip of .uno:PageNumberWizard to:  "Open Page Number Wizard"

Main reason:  This tooltip is shown when the .uno is added to a toolbar.  The proposed tooltip will explain better what happens (both when using the icon on the toolbar and when encountering the .uno in the Customize dialog).
Comment 65 Justin L 2023-06-14 12:12:56 UTC
(In reply to sdc.blanco from comment #42)
> I wonder if it is hard to modify the
> "preview" so that it shows the selected scheme, instead of "#".
This was changed to show #/# when page total is selected with https://gerrit.libreoffice.org/c/core/+/153030
Comment 66 Commit Notification 2023-06-29 11:17:58 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/19fbd6862302065cdf490085d1a8fea49f73d6ca

tdf#155706 tdf#86630 sw page number wizard: make OK default

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 67 Commit Notification 2023-06-29 20:15:08 UTC
Aron Budea committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/db1cdc6be062cd6c4240a1ec4d96c0ef613e2b27

tdf#155706 tdf#86630 sw page number wizard: make OK default

It will be available in 7.6.0.0.beta2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 68 Commit Notification 2023-07-19 22:59:46 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e823cd380a2ad38cbc7598c7393752f6398cb24f

tdf#86630 sw page number wizard: add to notebookbar layout tab

It will be available in 24.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 69 Commit Notification 2023-08-14 09:31:51 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/078e3289b08ed84e008c927235b1e490b2c07298

tdf#86630 sw page number wizard: add to notebookbar layout tab

It will be available in 7.6.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 70 Buovjaga 2024-02-20 14:17:44 UTC
*** Bug 107181 has been marked as a duplicate of this bug. ***
Comment 71 Justin L 2024-03-23 17:30:02 UTC
*** Bug 52620 has been marked as a duplicate of this bug. ***