Hi :)
When doing anything unusual or new to a document i tend to create a copy of
it. Many of my folders have a sub-folder called "OldVersions-Backups"
where i put such copies.
It's an extra step to add to Andrew's step 1. Making such a "Backup",
thanks to Murphy's Law, usually means that making the back-up was a waste
of time and everything runs smoothly. It's only when i don't make a
back-up that things go wonky and i find i really needed to make one! Grrr
;)
I have no idea what the code does but Andrew quite literally "wrote the
book" on macros so i would have complete confidence in running it even
without having made a back-up, but i'd still make a back-up anyway.
Regards from
Tom :)
On 14 November 2014 20:05, Andrew Douglas Pitonyak <andrew@pitonyak.org>
wrote:
On a whim, can you run the macro below. As a paranoid sort, I would say...
1. Save your document.
2. Run this macro.
3. If I missed something and it modifies the document, do not save the
changes (it should not change the document).
Sub FindPageBreaks
REM Author: Andrew Pitonyak
Dim iCnt As Long
Dim oCursor as Variant
Dim oText As Variant
Dim s As String
Dim iRightCounter As Long : iRightCounter = 0
Dim wasRightPage As Boolean : wasRightPage = False
oText = ThisComponent.Text
oCursor = oText.CreateTextCursor()
oCursor.GoToStart(False)
Do
If NOT oCursor.gotoEndOfParagraph(True) Then Exit Do
iCnt = iCnt + 1
wasRightPage = False
If NOT IsEmpty(oCursor.PageDescName) Then
s = s & "Paragraph " & iCnt & " has a new page to style " & _
oCursor.PageDescName & CHR$(10)
End If
If Not IsEmpty(oCursor.PageNumberOffset) Then
s = s & "Paragraph " & iCnt & " has a new PageNumberOffset to " & _
oCursor.PageNumberOffset & CHR$(10)
End If
If oCursor.BreakType <> com.sun.star.style.BreakType.NONE Then
s = s & "Paragraph " & iCnt & " has a page break" & CHR$(10)
'oCursor.BreakType = com.sun.star.style.BreakType.NONE
End If
Loop Until NOT oCursor.gotoNextParagraph(False)
MsgBox s
End Sub
What will it tell you? It should tell you every time that the page style
changes, and every time that the page number is specifically told to change
"PageNumberOffset".
I am curious if you see that it is showing a page number offset change at
a page change when the page numbering changes.
It would be easy to change this macro to "clear" page number changes. At
least I expect that it should be as easy as setting an empty value for
this. I should test that.
Yep, just checked, I made a change as follows, which clears all page
number changes after paragraph 10.
If Not IsEmpty(oCursor.PageNumberOffset) Then
s = s & "Paragraph " & iCnt & " has a new PageNumberOffset to " & _
oCursor.PageNumberOffset & CHR$(10)
REM THIS IS THE NEW THING HERE
If iCnt > 10 Then
Dim oEmpty
oCursor.PageNumberOffset = oEmpty
End If
End If
On 11/13/2014 09:17 PM, anne-ology wrote:
My guess would be you've found a bug ...
or maybe ghosts ;-)
From: svenja meyerricks <ajnevs@gmail.com>
Date: Thu, Nov 13, 2014 at 9:09 AM
Subject: [libreoffice-users] LO Writer page numbering resets itself
halfway
through document
To: users@global.libreoffice.org
Dear all,
I am not sure what to try anymore, so hoping that anyone on this list can
help please.
I have a long document (thesis) in .odf format, and the page numbers reset
themselves to 1 after page 170 or so (the page where the page break
occured
sometimes changes, but even when I temporarily resolved it -see below- a
random page break or two always came back).
To resolve this, I have
- deleted and re-inserted page numbers several times (issue remained)
- searched for visible page breaks between pages (there are none)
- checked in the "format"/"paragraph"/"text flow" tab whether the first
paragraph on the reset page had the "Insert Break" box checked (it didn't)
- looked for the same in the paragraphs before and after the invisible
page
break, but couldn't find anything.
- uninstalled and re-installed LibreOffice Version: 4.2.7.2 (that fixed it
at first, but then the same thing happened)
I would be massively grateful if anyone could help please, as I'm not sure
what else to try.
Many thanks,
Svenja
--
Andrew Pitonyak
My Macro Document: http://www.pitonyak.org/AndrewMacro.odt
Info: http://www.pitonyak.org/oo.php
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-
unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be
deleted
--
To unsubscribe e-mail to: users+unsubscribe@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.