Fixed numberings validation
This commit is contained in:
parent
32518cec1e
commit
48b81a64d2
2 changed files with 11 additions and 9 deletions
|
@ -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="Validation" script:language="StarBasic">Sub markval21
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval22
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -83,9 +83,9 @@ Sub validateButton
|
|||
needExtendedInfo = false
|
||||
EndIf
|
||||
|
||||
printNumberingSymbols(needExtendedInfo)
|
||||
numberingsErros = printNumberingSymbols(needExtendedInfo)
|
||||
statusIndicator.setValue(80)
|
||||
If badText OR badNumberings OR footnotesReport <> "" OR graphicsReport <> "" Or outlineInNotesReport <> "" Or sectionsReport <> "" OR oulineInTablesReport <> "" OR outlinePageStylesReport <> "" Then
|
||||
If numberingsErros OR badText OR badNumberings OR footnotesReport <> "" OR graphicsReport <> "" Or outlineInNotesReport <> "" Or sectionsReport <> "" OR oulineInTablesReport <> "" OR outlinePageStylesReport <> "" Then
|
||||
MsgBox getTranslation("validationWarning")
|
||||
If badText Then
|
||||
MsgBox getTranslation("validationBadSymbolsNotification")
|
||||
|
@ -433,7 +433,7 @@ Function isHeadingsInText(oText As Object) As Boolean
|
|||
isHeadingsInText = false
|
||||
End Function
|
||||
|
||||
Private Sub printNumberingSymbols(needExtendedInfo)
|
||||
Function printNumberingSymbols(needExtendedInfo) As Boolean
|
||||
Dim families As Object
|
||||
Dim numStyles As Object
|
||||
Dim numStyle As Object
|
||||
|
@ -450,6 +450,7 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
|||
Dim exLength As Integer
|
||||
Dim report As String
|
||||
Dim k As Integer
|
||||
printNumberingSymbols = false
|
||||
families = ThisComponent.StyleFamilies
|
||||
numStyles = families.getByName("NumberingStyles")
|
||||
result = ""
|
||||
|
@ -479,7 +480,7 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
|||
exLength = Len(excerpt)
|
||||
EndIf
|
||||
If fontChar <> "" Then
|
||||
tmp = getTranslation("validateNumberingLevel") &" " & (j + 1) & " " & getTranslation("validateNumberingFont") & " " & fontName & " " & getTranslation("validateNumberingSymbol") & " " & fontChar & " (" & Hex(Asc(fontChar)) & ") "& Left(excerpt,exLength) & chr(10)
|
||||
tmp = numRules.Name &" "& getTranslation("validateNumberingLevel") &" " & (j + 1) & " " & getTranslation("validateNumberingFont") & " " & fontName & " " & getTranslation("validateNumberingSymbol") & " " & fontChar & " (" & Hex(Asc(fontChar)) & ") "& Left(excerpt,exLength) & chr(10)
|
||||
If Asc(fontChar) > 57344 AND Asc(fontChar) < 63743 Then
|
||||
resultBad = resultBad & tmp
|
||||
ElseIf fontName <> "IPH Astra Serif" _
|
||||
|
@ -499,8 +500,9 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
|||
|
||||
report = ""
|
||||
If result = "" AND resultBad = "" Then
|
||||
Exit sub
|
||||
Else
|
||||
Exit Function
|
||||
Else
|
||||
printNumberingSymbols = true
|
||||
If resultBad <> "" Then
|
||||
report = getTranslation("validateNumberingsReportSymbols") & chr(10) & resultBad
|
||||
EndIf
|
||||
|
@ -509,7 +511,7 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
|||
EndIf
|
||||
EndIf
|
||||
MsgBox report
|
||||
End Sub
|
||||
End Function
|
||||
|
||||
Private Sub showTrackedChanges
|
||||
dim document as object
|
||||
|
|
|
@ -1 +1 @@
|
|||
version=0.9.28
|
||||
version=0.9.29
|
||||
|
|
Loading…
Add table
Reference in a new issue