Replaces footnote signs report with navigated report
This commit is contained in:
parent
42682e4331
commit
7e77039620
3 changed files with 197 additions and 162 deletions
|
@ -1,13 +1,13 @@
|
|||
<?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="Validation" script:language="StarBasic">Sub markval27
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval28
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Sub validateButton
|
||||
Dim footnotesReport As String
|
||||
Dim footnotesReport As Boolean
|
||||
Dim graphicsReport As String
|
||||
Dim sectionsReport As String
|
||||
Dim outlinePageStylesReport As String
|
||||
|
@ -27,7 +27,7 @@ Sub validateButton
|
|||
|
||||
badText = false
|
||||
badNumberings = false
|
||||
footnotesReport = noteSingsCheck
|
||||
footnotesReport = noteSingsCheck()
|
||||
statusIndicator.setValue(10)
|
||||
graphicsReport = checkGraphics
|
||||
statusIndicator.setValue(20)
|
||||
|
@ -49,9 +49,6 @@ Sub validateButton
|
|||
MsgBox outlinePageStylesReport
|
||||
EndIf
|
||||
|
||||
If footnotesReport <> "" Then
|
||||
MsgBox footnotesReport
|
||||
EndIf
|
||||
If graphicsReport <> "" Then
|
||||
MsgBox graphicsReport
|
||||
EndIf
|
||||
|
@ -59,7 +56,7 @@ Sub validateButton
|
|||
MsgBox sectionsReport
|
||||
EndIf
|
||||
|
||||
badText = findBadCharacters
|
||||
badText = findBadCharacters()
|
||||
|
||||
If config.getPropertyValue("complexity") = "makerUp" then
|
||||
needExtendedInfo = true
|
||||
|
@ -75,9 +72,8 @@ Sub validateButton
|
|||
|
||||
numberingsErros = printNumberingSymbols(needExtendedInfo)
|
||||
statusIndicator.setValue(80)
|
||||
If brokenCharBackTransparent OR needFixColoredText OR numberingsErros OR badText OR badNumberings OR footnotesReport <> "" OR graphicsReport <> "" Or outlineInNotesReport <> "" Or sectionsReport <> "" OR oulineInTablesReport <> "" OR outlinePageStylesReport <> "" Then
|
||||
If brokenCharBackTransparent OR needFixColoredText OR numberingsErros OR badText OR badNumberings OR footnotesReport OR graphicsReport <> "" Or outlineInNotesReport <> "" Or sectionsReport <> "" OR oulineInTablesReport <> "" OR outlinePageStylesReport <> "" Then
|
||||
MsgBox getTranslation("validationWarning")
|
||||
|
||||
Else
|
||||
MsgBox getTranslation("validationSuccess")
|
||||
EndIf
|
||||
|
@ -142,7 +138,7 @@ Sub replaceCharsInDOI
|
|||
AskAndReplace("(?<=DOI[0-9. /XVI:‒–—−ХOО?-]{1,50})[‒–—−]{1,5}","-")
|
||||
End sub
|
||||
|
||||
Private Function noteSingsCheck() As String
|
||||
Private Function noteSingsCheck() As Boolean
|
||||
Dim footnotes As Object
|
||||
Dim footnote As Object
|
||||
Dim endnote As Object
|
||||
|
@ -152,9 +148,11 @@ Private Function noteSingsCheck() As String
|
|||
Dim char As Long
|
||||
Dim label As String
|
||||
Dim result As String
|
||||
Dim founds() As Object
|
||||
noteSingsCheck = false
|
||||
result = ""
|
||||
footnotes = ThisComponent.footnotes
|
||||
endnotes = ThisComponent.Footnotes
|
||||
footnotes = ThisComponent.Footnotes
|
||||
endnotes = ThisComponent.Endnotes
|
||||
count = footnotes.getCount
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
|
@ -164,8 +162,9 @@ Private Function noteSingsCheck() As String
|
|||
charNum = Len(label)
|
||||
For j = 1 to charNum
|
||||
char = Asc(Right(Left(label,j),1))
|
||||
If char >= 57344 AND char <= 63743 then
|
||||
result = result & getTranslation("validateFootnotes1") & " " & Chr(char) & " " & getTranslation("validateFootnotes2") & " " & i & " " & getTranslation("validateFootnotes3") & chr(10)
|
||||
If char >= 57344 AND char <= 63743 Then
|
||||
addToArray(founds,footnote.Anchor)
|
||||
'result = result & getTranslation("validateFootnotes1") & " " & Chr(char) & " " & getTranslation("validateFootnotes2") & " " & i & " " & getTranslation("validateFootnotes3") & chr(10)
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
@ -176,12 +175,18 @@ Private Function noteSingsCheck() As String
|
|||
charNum = Len(label)
|
||||
For j = 1 to charNum
|
||||
char = Asc(Right(Left(label,j),1))
|
||||
If char >= 57344 AND char <= 63743 then
|
||||
result = result & getTranslation("validateFootnotes1") & " " & Chr(char) & " " & getTranslation("validateEndnotes1") & " " & i & " " & getTranslation("validateFootnotes3") & chr(10)
|
||||
If char >= 57344 AND char <= 63743 Then
|
||||
addToArray(founds,endnote.Anchor)
|
||||
'result = result & getTranslation("validateFootnotes1") & " " & Chr(char) & " " & getTranslation("validateEndnotes1") & " " & i & " " & getTranslation("validateFootnotes3") & chr(10)
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
noteSingsCheck = result
|
||||
If (UBound(founds) > 0) Then
|
||||
noteSingsCheck = true
|
||||
MsgBox(getTranslation("validationBadFootnotesSymbolsNotification"))
|
||||
startNavigatorDialog(getTranslation("badNoteSings"),founds)
|
||||
EndIf
|
||||
'noteSingsCheck = result
|
||||
End Function
|
||||
|
||||
Function checkNotesOutline As String
|
||||
|
@ -1138,4 +1143,4 @@ Function findInDoc(searchString As String) As Variant
|
|||
founds = Thiscomponent.findAll(sDesc)
|
||||
findInDoc = founds
|
||||
End Function
|
||||
</script:module>
|
||||
</script:module>
|
Loading…
Add table
Add a link
Reference in a new issue