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()
|
dialog.dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Sub setFootnotesNumberingFrom(dialog)
|
Sub setFootnotesNumberingFrom(dialog As Object)
|
||||||
Dim statusIndicator as Object
|
Dim statusIndicator as Object
|
||||||
Dim targetLevel As Integer
|
Dim targetLevel As Integer
|
||||||
Dim stringLevelInput As String
|
Dim stringLevelInput As String
|
||||||
|
@ -95,6 +95,7 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
||||||
thisPortion = enum2.nextElement
|
thisPortion = enum2.nextElement
|
||||||
If isTargetNote(thisPortion, noteType) Then
|
If isTargetNote(thisPortion, noteType) Then
|
||||||
curPage = getPageNumber(thisPortion)
|
curPage = getPageNumber(thisPortion)
|
||||||
|
If ( IsInArray(pageNums, CInt(curPage) ) ) Then
|
||||||
If (curPage <> prevPage) Then
|
If (curPage <> prevPage) Then
|
||||||
curNum = 1
|
curNum = 1
|
||||||
prevPage = curPage
|
prevPage = curPage
|
||||||
|
@ -104,17 +105,15 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
||||||
If label = "" Then
|
If label = "" Then
|
||||||
footnoteText.setLabel(CStr(curNum))
|
footnoteText.setLabel(CStr(curNum))
|
||||||
curNum = curNum + 1
|
curNum = curNum + 1
|
||||||
|
|
||||||
Else
|
Else
|
||||||
labelNum = CLng(label)
|
labelNum = CLng(label)
|
||||||
If labelNum > 0 Then
|
If labelNum > 0 Then
|
||||||
|
|
||||||
footnoteText.setLabel(CStr(curNum))
|
footnoteText.setLabel(CStr(curNum))
|
||||||
|
|
||||||
curNum = curNum + 1
|
curNum = curNum + 1
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
||||||
cellNames = enum1Element.cellNames
|
cellNames = enum1Element.cellNames
|
||||||
|
@ -129,6 +128,7 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
||||||
thisPortion = cellEnum2.nextElement
|
thisPortion = cellEnum2.nextElement
|
||||||
If isTargetNote(thisPortion, noteType) Then
|
If isTargetNote(thisPortion, noteType) Then
|
||||||
curPage = getPageNumber(thisPortion)
|
curPage = getPageNumber(thisPortion)
|
||||||
|
If ( IsInArray(pageNums, CInt(curPage) ) ) Then
|
||||||
If (curPage <> prevPage) Then
|
If (curPage <> prevPage) Then
|
||||||
curNum = 1
|
curNum = 1
|
||||||
prevPage = curPage
|
prevPage = curPage
|
||||||
|
@ -147,6 +147,7 @@ Sub setNotesPaginatedNumbering(noteType As Integer, pageNums() As Integer)
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
EndIf
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
|
@ -274,7 +275,7 @@ Sub getPageNumsFrom(inputString As String, pageNums() As Integer)
|
||||||
Next i
|
Next i
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Function IsInArray(array, content)
|
Function IsInArray(array As Variant, content As Variant) As Boolean
|
||||||
IsInArray = false
|
IsInArray = false
|
||||||
For i = LBound(array) To UBound(array)
|
For i = LBound(array) To UBound(array)
|
||||||
inArr = array(i)
|
inArr = array(i)
|
||||||
|
|
Loading…
Add table
Reference in a new issue