[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-26 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #16 from Justin L  ---
Proposed fix that allows Title Page wizard to be re-run multiple times, and
that forces a page style break to accompany a restarted page number can be
found at http://gerrit.libreoffice.org/c/core/+/108322.

This will fix OP's problem where "Page 2" returned on fileopen, even though the
wizard had set "restart numbering on page 2" it to one.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #15 from Alan Robinson  ---
There is therefore an obvious workaround: I have abandoned using the wizard and
am now using a manual page break instead. It appears to work.

Regards, Alan R.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #14 from Justin L  ---
Created attachment 168489
  --> https://bugs.documentfoundation.org/attachment.cgi?id=168489=edit
titlePage.odt: run format-titlePage twice and first-page's page number changes

Format->Title Page is basically just broken. (sw/source/ui/misc/titlepage.cxx)

1.) GotoPage fails if a blank page exists. [first and follow are both even or
both odd]. The result is changes get applied to "random" pages.
2.) GotoPage( bRecord=false ) BY DEFINITION returns false, yet when adding more
than one index page, it hopes it will return true before setting the page
style.
3.) The wrong pages get changed to Index style. [Apparently layout hasn't
recognized the newly added pages yet because I can't access any page higher
than 3.]

Well obviously GotoPage is completely worthless if it doesn't even recognize
the newly added pages. So if ANYTHING at all works in this wizard, it is just a
coincidence... sigh.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #13 from Justin L  ---
(In reply to Alan Robinson from comment #9)
> It is not true that the only way the user can control page numbers is to use
> a page break with page number.
This looks like a wizard that does what I was mentioning about
page-style-with-page-number. The problem is that the wizard seems to not work
when there is a page break already. So a work-around is to remove the page
break first and then do it again.

Format-Title page is already broken in this was as far back as I can test - LO
3.5.

I'll start looking into the code to see why an existing RES_BREAK is preventing
it being replaced by a RES_PAGEDESC.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #12 from Justin L  ---
(In reply to Alan Robinson from comment #11)
> I had problems with the page count: it appears to be a count of the total
> number of pages regardless of whether they are included in the page
> numbering. To get round this, the final field in the footer in the submitted
> document is a reference to a bookmark at the end of the text.
Yes, this seems like a good, proper solution. It looks to me like the "of 1" is
the cached value (it is written into the ODT) so that is what is displayed
until an edit updates the field content.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #11 from Alan Robinson  ---
I had problems with the page count: it appears to be a count of the total
number of pages regardless of whether they are included in the page numbering.
To get round this, the final field in the footer in the submitted document is a
reference to a bookmark at the end of the text.

Regards, Alan R.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #10 from Justin L  ---
(In reply to Justin L from comment #7)
> There may be some strange things going on that I don't know about,
Umm yeah. I totally missed seeing any reference to Format - Title page. I've
never used or noticed that before.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

--- Comment #9 from Alan Robinson  ---
It is not true that the only way the user can control page numbers is to use a
page break with page number.

Clicking Format->Title Page launches the Title page dialogue box which includes
a check box, 'Reset page numbering after title pages'. In my document this is
checked, and the next page number is set to 1.

The problem is that on opening the document, these settings are not applied.
But if you open the dialogue box then close it again without changing anything
it is applied. It has to be done every time the document is opened.

Regards, Alan R.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs


[Libreoffice-bugs] [Bug 138907] End of Document page field is not updated initially when specific document is opened

2020-12-25 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=138907

Justin L  changed:

   What|Removed |Added

   Hardware|x86-64 (AMD64)  |All
Version|5.2.5.1 release |5.1.0.3 release
   Severity|normal  |minor
Summary|Wrong page numbers in   |End of Document page field
   |footer when document is |is not updated initially
   |opened  |when specific document is
   ||opened
 OS|Windows (All)   |All

--- Comment #8 from Justin L  ---
The second issue is "of 1". However, that is not the normal "Page Count"
variable that one would expect to be used in this case. It is some "End of
Document" marker.

This was fixed in LO 4.4 - so that it immediately showed "of 2" with
commit cd94a84b89c476760ad74bf088a5d6f8ba4ce209
Author: Oliver-Rainer Wittmann on Fri Jun 13 20:32:14 2014 +0200
125044: - use field's content cache on  construction only
... for clipboard documents

- assure invalidation and updates on code to update fields


It was broken again in LO 5.1 (for which on Linux I only have the ability to
bibisect to a one day range) by one of these
https://cgit.freedesktop.org/libreoffice/core/log/?id=22355042a6fc7aecf3caab69b3fa3be1430b697f=range=a3050f632517137f809d76662170726b518f043a..5a61d7f049a81d6e747d9d097f364ae45f58697b

Perhaps a Windows person can verify with their bibisect, but I highly suspect
authorAshod Nakashian on 2015-07-15 07:46:01 +
commit  b0fde7a912ff3aa370496802f20895b1158b072c
> tdf#38837 Reduce power consumption by minimizing idle timers
> Both the document statistics- and state-manager have their
> own modified flags. There is a cyclic dependency between the
> the two in that updating the document's statistics also marks
> the document as modified. Of course when a document is edited
> the statistics modified flag is set to trigger an update.
> 
> To avoid a perpetual cycle, the statistics manager resets the
> document's modified state to that before setting the new
> statistics. However, this doesn't reset the statistics
> modified flag, which was set when the document was modified
> by setting the new statistics. Hence, the statistics thinks
> there are modifications in the document when there isn't.
> 
> This patch is to make DocumentStateManager::ResetModified()
> symmetrical to DocumentStateManager::SetModified() by
> reseting the modified flag of the statistics manager.
> 
> The idle CPU drops to nil on unmodified documents after this.
> However, for modified documents the statistics is recalculated
> perpetually until the document is saved. This will need a
> different patch to fix.

That makes sense with what we are seeing. Any modification causes the End of
Document field to update itself. For example, printing or exporting to PDF also
update the field. So I'd say this part is a rather minor irritant.

Also, it is hard to reproduce. Adding a third page "fixes" the problem.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs