Fixed getting footnote sign in footnote conversion for archive
This commit is contained in:
parent
df65b5efe1
commit
097883c65a
2 changed files with 20 additions and 13 deletions
|
@ -613,8 +613,7 @@ Sub convertLinkToFootnote(forwardLink,backwardLink)
|
|||
forward = bookmarks.getByName(forwardLink)
|
||||
backward = bookmarks.getByName(backwardLink)
|
||||
oViewCursor.goToRange(forward.Anchor,false)
|
||||
footNoteSign = oViewCursor.getString()
|
||||
removeTextInFootnote()
|
||||
footNoteSign = getTextInFootnote
|
||||
oTextCursor = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||
oTextCursor.gotoEndOfParagraph(false)
|
||||
oTextCursor.gotoStartOfParagraph(true)
|
||||
|
@ -632,13 +631,21 @@ End Sub
|
|||
|
||||
|
||||
|
||||
Sub removeTextInFootnote
|
||||
Function getTextInFootnote As String
|
||||
Dim oViewCursor As Object
|
||||
Dim oTextCursor As Object
|
||||
Dim character As String
|
||||
getTextInFootnote = ""
|
||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||
oTextCursor = oViewCursor.Text.createTextCursorByRange(oViewCursor)
|
||||
oTextCursor.goToStartOfParagraph(false)
|
||||
oViewCursor.goToRange(oTextCursor,false)
|
||||
oViewCursor.goRight(1,true)
|
||||
character = oViewCursor.String
|
||||
Do While isLinkCharacter(character)
|
||||
If IsNumeric(character) Then
|
||||
getTextInFootnote = getTextInFootnote & character
|
||||
EndIf
|
||||
oViewCursor.String = ""
|
||||
oViewCursor.goRight(1,true)
|
||||
character = oViewCursor.String
|
||||
|
@ -648,6 +655,13 @@ Sub removeTextInFootnote
|
|||
Else
|
||||
oViewCursor.goLeft(1,false)
|
||||
EndIf
|
||||
End Function
|
||||
|
||||
Sub removeFootnoteSignInText
|
||||
Dim oViewCursor As Object
|
||||
Dim character As String
|
||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||
oViewCursor.String = ""
|
||||
oViewCursor.goLeft(1,true)
|
||||
character = oViewCursor.String
|
||||
Do While isLinkCharacter(character)
|
||||
|
@ -655,18 +669,11 @@ Sub removeTextInFootnote
|
|||
oViewCursor.goLeft(1,true)
|
||||
character = oViewCursor.String
|
||||
Loop
|
||||
oViewCursor.goRight(1,false)
|
||||
End Sub
|
||||
|
||||
Sub removeFootnoteSignInText
|
||||
Dim oViewCursor As Object
|
||||
Dim character As String
|
||||
oViewCursor = ThisComponent.CurrentController.getViewCursor()
|
||||
oViewCursor.goLeft(1,true)
|
||||
oViewCursor.goRight(1,true)
|
||||
character = oViewCursor.String
|
||||
Do While isLinkCharacter(character)
|
||||
oViewCursor.String = ""
|
||||
oViewCursor.goLeft(1,true)
|
||||
oViewCursor.goRight(1,true)
|
||||
character = oViewCursor.String
|
||||
Loop
|
||||
oViewCursor.goRight(1,false)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Footnotes" script:language="StarBasic" script:moduleType="normal">sub footMark6
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Footnotes" script:language="StarBasic" script:moduleType="normal">sub footMark7
|
||||
End Sub
|
||||
|
||||
Sub openFootNotesDialog
|
||||
|
|
Loading…
Add table
Reference in a new issue