diff --git a/Redaction/Clean.xba b/Redaction/Clean.xba index b7477b0..0a662d7 100644 --- a/Redaction/Clean.xba +++ b/Redaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark60 +Sub mark61 End Sub @@ -531,13 +531,13 @@ End Function Private Sub removeHyperlinks() Dim aNote As Object - Dim i As Long + Dim x As Long removeHLInText(ThisComponent.Text) - For i = 0 to ThisComponent.FootNotes.Count -1 + For x = 0 to ThisComponent.FootNotes.Count -1 aNote = ThisComponent.FootNotes.getByIndex(x) removeHLInText(aNote.Text) Next - For i = 0 to ThisComponent.EndNotes.Count -1 + For x = 0 to ThisComponent.EndNotes.Count -1 aNote = ThisComponent.EndNotes.getByIndex(x) removeHLInText(aNote.Text) Next diff --git a/Redaction/Translations.xba b/Redaction/Translations.xba index 659f870..af73421 100644 --- a/Redaction/Translations.xba +++ b/Redaction/Translations.xba @@ -208,6 +208,9 @@ Function getRussian(identifier As String) As String Exit Function Case "validateEndnotes1" getRussian = "в концевой сноске (абсолютный номер)" + Exit Function + Case "setOutlineLevel" + getRussian = "задан уровень структуры документа" Exit Function Case Else getRussian = "Перевод не найден" @@ -399,6 +402,9 @@ Function getEnglish(identifier As String) As String Exit Function Case "validateEndnotes1" getEnglish = "in endnote (absolute number)" + Exit Function + Case "setOutlineLevel" + getEnglish = "set document structure level" Exit Function Case Else getEnglish = "No translation" @@ -590,6 +596,9 @@ Function getCroatian(identifier As String) As String Case "validateEndnotes1" getCroatian = "u end fusnoti (apsolutni broj)" Exit Function + Case "setOutlineLevel" + getCroatian = "zadati uroven strukturni dokument" + Exit Function Case Else getCroatian = "No translation" End Select @@ -780,6 +789,9 @@ Function getSerbian(identifier As String) As String Case "validateEndnotes1" getSerbian = "у end фусноти (апсолутни број)" Exit Function + Case "setOutlineLevel" + getSerbian = "задатен уровен структури документа" + Exit Function Case Else getSerbian = "No translation" End Select @@ -970,6 +982,9 @@ Function getBosnian(identifier As String) As String Case "validateEndnotes1" getBosnian = "u end fusnoti (apsolutni broj)" Exit Function + Case "setOutlineLevel" + getBosnian = "zadati uroven strukturni dokument" + Exit Function Case Else getBosnian = "No translation" End Select diff --git a/Redaction/Validation.xba b/Redaction/Validation.xba index f1ce458..dc1bcc0 100644 --- a/Redaction/Validation.xba +++ b/Redaction/Validation.xba @@ -25,42 +25,39 @@ End Function Sub validateButton Dim footnotesReport As String Dim graphicsReport As String + Dim outlineInNotesReport As String Dim badText As Boolean Dim badNumberings As Boolean - Dim badFootnoteSigns As Boolean - Dim badGraphics As Boolean Dim needExtendedInfo As Boolean - badGraphics = false + Dim config As Object + config = initRedactionConfiguration() badText = false - badFootnoteSigns = false badNumberings = false footnotesReport = noteSingsCheck graphicsReport = checkGraphics - If footnotesReport <> "" Then - badFootnoteSigns = true + outlineInNotesReport = checkNotesOutline() + If outlineInNotesReport <> "" Then + MsgBox outlineInNotesReport EndIf + If footnotesReport <> "" Then + MsgBox footnotesReport + EndIf If graphicsReport <> "" Then - badGraphics = true + MsgBox graphicsReport EndIf If isInDoc("[\uE000-\uF8FF]") Then badText = true EndIf - If badFootnoteSigns Then - MsgBox footnotesReport - EndIf - If badGraphics Then - MsgBox graphicsReport - EndIf - Dim config As Object - config = initRedactionConfiguration() + If config.getPropertyValue("complexity") = "makerUp" then needExtendedInfo = true Else needExtendedInfo = false EndIf - printNumberingSymbols(needExtendedInfo) - If badText OR badNumberings OR badFootnoteSigns OR badGraphics Then + printNumberingSymbols(needExtendedInfo) + + If badText OR badNumberings OR footnotesReport <> "" OR graphicsReport <> "" Or outlineInNotesReport <> "" Then MsgBox getTranslation("validationWarning") If badText Then MsgBox getTranslation("validationBadSymbolsNotification") @@ -165,6 +162,42 @@ Private Function noteSingsCheck() As String noteSingsCheck = result End Function +Function checkNotesOutline As String + Dim oDescriptor As Object + Dim footNotes As Object + Dim x As Integer + Dim aNote As Object + Dim oEnum As Object + Dim oCurPar As Object + Dim result As String + result = "" + footNotes = thisComponent.footNotes + endNotes = thisComponent.footNotes + for x = 0 to footNotes.Count -1 + aNote = footNotes.getByIndex(x) + aNote.Anchor.CharStyleName="Footnote anchor" + oEnum = aNote.Text.createEnumeration() + Do While oEnum.hasMoreElements() + oCurPar = oEnum.nextElement() + If oCurPar.OutlineLevel > 0 Then + result = result & getTranslation("validateFootnotes2") & " " & x & " " & getTranslation("setOutlineLevel") & " " & oCurPar.OutlineLevel & chr(10) + EndIf + Loop + Next + for x = 0 to endNotes.Count -1 + aNote = endNotes.getByIndex(x) + aNote.Anchor.CharStyleName="Footnote anchor" + oEnum = aNote.Text.createEnumeration() + Do While oEnum.hasMoreElements() + oCurPar = oEnum.nextElement() + If oCurPar.OutlineLevel > 0 Then + result = result & getTranslation("validateEndnotes1") & " " & x & " " & getTranslation("setOutlineLevel") & " " & oCurPar.OutlineLevel & chr(10) + EndIf + Loop + Next + checkNotesOutline = result +End Function + Private Sub printNumberingSymbols(needExtendedInfo) Dim families As Object Dim numStyles As Object diff --git a/translations.ods b/translations.ods index 47a0abd..5319347 100644 Binary files a/translations.ods and b/translations.ods differ