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"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!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
|
End Sub
|
||||||
|
|
||||||
|
@ -83,9 +83,9 @@ Sub validateButton
|
||||||
needExtendedInfo = false
|
needExtendedInfo = false
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
printNumberingSymbols(needExtendedInfo)
|
numberingsErros = printNumberingSymbols(needExtendedInfo)
|
||||||
statusIndicator.setValue(80)
|
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")
|
MsgBox getTranslation("validationWarning")
|
||||||
If badText Then
|
If badText Then
|
||||||
MsgBox getTranslation("validationBadSymbolsNotification")
|
MsgBox getTranslation("validationBadSymbolsNotification")
|
||||||
|
@ -433,7 +433,7 @@ Function isHeadingsInText(oText As Object) As Boolean
|
||||||
isHeadingsInText = false
|
isHeadingsInText = false
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub printNumberingSymbols(needExtendedInfo)
|
Function printNumberingSymbols(needExtendedInfo) As Boolean
|
||||||
Dim families As Object
|
Dim families As Object
|
||||||
Dim numStyles As Object
|
Dim numStyles As Object
|
||||||
Dim numStyle As Object
|
Dim numStyle As Object
|
||||||
|
@ -450,6 +450,7 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
||||||
Dim exLength As Integer
|
Dim exLength As Integer
|
||||||
Dim report As String
|
Dim report As String
|
||||||
Dim k As Integer
|
Dim k As Integer
|
||||||
|
printNumberingSymbols = false
|
||||||
families = ThisComponent.StyleFamilies
|
families = ThisComponent.StyleFamilies
|
||||||
numStyles = families.getByName("NumberingStyles")
|
numStyles = families.getByName("NumberingStyles")
|
||||||
result = ""
|
result = ""
|
||||||
|
@ -479,7 +480,7 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
||||||
exLength = Len(excerpt)
|
exLength = Len(excerpt)
|
||||||
EndIf
|
EndIf
|
||||||
If fontChar <> "" Then
|
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
|
If Asc(fontChar) > 57344 AND Asc(fontChar) < 63743 Then
|
||||||
resultBad = resultBad & tmp
|
resultBad = resultBad & tmp
|
||||||
ElseIf fontName <> "IPH Astra Serif" _
|
ElseIf fontName <> "IPH Astra Serif" _
|
||||||
|
@ -499,8 +500,9 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
||||||
|
|
||||||
report = ""
|
report = ""
|
||||||
If result = "" AND resultBad = "" Then
|
If result = "" AND resultBad = "" Then
|
||||||
Exit sub
|
Exit Function
|
||||||
Else
|
Else
|
||||||
|
printNumberingSymbols = true
|
||||||
If resultBad <> "" Then
|
If resultBad <> "" Then
|
||||||
report = getTranslation("validateNumberingsReportSymbols") & chr(10) & resultBad
|
report = getTranslation("validateNumberingsReportSymbols") & chr(10) & resultBad
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -509,7 +511,7 @@ Private Sub printNumberingSymbols(needExtendedInfo)
|
||||||
EndIf
|
EndIf
|
||||||
EndIf
|
EndIf
|
||||||
MsgBox report
|
MsgBox report
|
||||||
End Sub
|
End Function
|
||||||
|
|
||||||
Private Sub showTrackedChanges
|
Private Sub showTrackedChanges
|
||||||
dim document as object
|
dim document as object
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
version=0.9.28
|
version=0.9.29
|
||||||
|
|
Loading…
Add table
Reference in a new issue