Fixes for Foontote/Endnote numeration functions
This commit is contained in:
parent
55f8f9e79b
commit
58f1fb4c34
1 changed files with 10 additions and 9 deletions
|
@ -34,7 +34,7 @@ Sub openFootNotesDialog
|
|||
dialog.dispose()
|
||||
End Sub
|
||||
|
||||
Sub setFootnotesNumberingFrom(dialog)
|
||||
Sub setFootnotesNumberingFrom(dialog As Object)
|
||||
Dim statusIndicator as Object
|
||||
Dim targetLevel As Integer
|
||||
Dim stringLevelInput As String
|
||||
|
@ -95,6 +95,7 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
|||
thisPortion = enum2.nextElement
|
||||
If isTargetNote(thisPortion, noteType) Then
|
||||
curPage = getPageNumber(thisPortion)
|
||||
If ( IsInArray(pageNums, CInt(curPage) ) ) Then
|
||||
If (curPage <> prevPage) Then
|
||||
curNum = 1
|
||||
prevPage = curPage
|
||||
|
@ -104,17 +105,15 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
|||
If label = "" Then
|
||||
footnoteText.setLabel(CStr(curNum))
|
||||
curNum = curNum + 1
|
||||
|
||||
Else
|
||||
labelNum = CLng(label)
|
||||
If labelNum > 0 Then
|
||||
|
||||
footnoteText.setLabel(CStr(curNum))
|
||||
|
||||
curNum = curNum + 1
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
Wend
|
||||
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
||||
cellNames = enum1Element.cellNames
|
||||
|
@ -129,6 +128,7 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
|||
thisPortion = cellEnum2.nextElement
|
||||
If isTargetNote(thisPortion, noteType) Then
|
||||
curPage = getPageNumber(thisPortion)
|
||||
If ( IsInArray(pageNums, CInt(curPage) ) ) Then
|
||||
If (curPage <> prevPage) Then
|
||||
curNum = 1
|
||||
prevPage = curPage
|
||||
|
@ -147,6 +147,7 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
|||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
EndIf
|
||||
Wend
|
||||
EndIf
|
||||
Wend
|
||||
|
@ -274,7 +275,7 @@ Sub getPageNumsFrom(inputString As String, pageNums() As Integer)
|
|||
Next i
|
||||
End Sub
|
||||
|
||||
Function IsInArray(array, content)
|
||||
Function IsInArray(array As Variant, content As Variant) As Boolean
|
||||
IsInArray = false
|
||||
For i = LBound(array) To UBound(array)
|
||||
inArr = array(i)
|
||||
|
|
Loading…
Add table
Reference in a new issue