Replaced some reports with navigatable problems
This commit is contained in:
parent
cd9266e83d
commit
ce738866ec
3 changed files with 168 additions and 51 deletions
|
@ -314,6 +314,15 @@ Function getRussian(identifier As String) As String
|
||||||
Case "validationBadFootnotesSymbolsNotification"
|
Case "validationBadFootnotesSymbolsNotification"
|
||||||
getRussian = "В символах сносок обнаружены не подходящие для публикации символы." & chr(10) & " Нажимая на стрелки навигатора вы сможете перемещаться между найденными символами сносок."
|
getRussian = "В символах сносок обнаружены не подходящие для публикации символы." & chr(10) & " Нажимая на стрелки навигатора вы сможете перемещаться между найденными символами сносок."
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSectionsInTables"
|
||||||
|
getRussian = "Разделы, которые не должны находится внутри таблиц"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInFootnotes"
|
||||||
|
getRussian = "Заголовки, которые не должны находиться в сносках"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInTables"
|
||||||
|
getRussian = "Заголовки, которые нельзя размещать внутри таблиц"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getRussian = "Перевод не найден"
|
getRussian = "Перевод не найден"
|
||||||
End Select
|
End Select
|
||||||
|
@ -610,6 +619,15 @@ Function getEnglish(identifier As String) As String
|
||||||
Case "validationBadFootnotesSymbolsNotification"
|
Case "validationBadFootnotesSymbolsNotification"
|
||||||
getEnglish = "Unsuitable for publication symbols were found in footnote symbols. "& Chr (10) &" By clicking on the navigator arrows, you can navigate between found footnote symbols. "
|
getEnglish = "Unsuitable for publication symbols were found in footnote symbols. "& Chr (10) &" By clicking on the navigator arrows, you can navigate between found footnote symbols. "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSectionsInTables"
|
||||||
|
getEnglish = "Sections that shouldn't be inside tables "
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInFootnotes"
|
||||||
|
getEnglish = "Headings that should not be in footnotes"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInTables"
|
||||||
|
getEnglish = "Headers that shouldn't be placed inside tables"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getEnglish = "No translation"
|
getEnglish = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -905,6 +923,15 @@ Function getCroatian(identifier As String) As String
|
||||||
Case "validationBadFootnotesSymbolsNotification"
|
Case "validationBadFootnotesSymbolsNotification"
|
||||||
getCroatian = "U simbolima fusnota pronađeni su neprikladni za objavljivanje simboli. "& Chr (10) &" Klikom na strelice navigatora možete se kretati između pronađenih simbola fusnota. "
|
getCroatian = "U simbolima fusnota pronađeni su neprikladni za objavljivanje simboli. "& Chr (10) &" Klikom na strelice navigatora možete se kretati između pronađenih simbola fusnota. "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSectionsInTables"
|
||||||
|
getCroatian = "Odjeljci koji ne bi trebali biti unutar tablica "
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInFootnotes"
|
||||||
|
getCroatian = "Naslovi koji ne bi trebali biti u fusnotama"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInTables"
|
||||||
|
getCroatian = "Zaglavlja koja se ne smiju stavljati unutar tablica"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getCroatian = "No translation"
|
getCroatian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1200,6 +1227,15 @@ Function getSerbian(identifier As String) As String
|
||||||
Case "validationBadFootnotesSymbolsNotification"
|
Case "validationBadFootnotesSymbolsNotification"
|
||||||
getSerbian = "У симболима фуснота пронађени су неприкладни за објављивање симболи. "& chr(10) &" Кликом на стрелице навигатора можете се кретати између пронађених симбола фуснота. "
|
getSerbian = "У симболима фуснота пронађени су неприкладни за објављивање симболи. "& chr(10) &" Кликом на стрелице навигатора можете се кретати између пронађених симбола фуснота. "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSectionsInTables"
|
||||||
|
getSerbian = "Одељци који не би требало да буду унутар табела"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInFootnotes"
|
||||||
|
getSerbian = "Наслови који не смеју бити у фуснотама"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInTables"
|
||||||
|
getSerbian = "Заглавља која не смеју бити смештена унутар табела"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getSerbian = "No translation"
|
getSerbian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1495,6 +1531,15 @@ Function getBosnian(identifier As String) As String
|
||||||
Case "validationBadFootnotesSymbolsNotification"
|
Case "validationBadFootnotesSymbolsNotification"
|
||||||
getBosnian = "U simbolima fusnota pronađeni su neprikladni za objavljivanje simboli. "& Chr (10) &" Klikom na strelice navigatora možete se kretati između pronađenih simbola fusnota. "
|
getBosnian = "U simbolima fusnota pronađeni su neprikladni za objavljivanje simboli. "& Chr (10) &" Klikom na strelice navigatora možete se kretati između pronađenih simbola fusnota. "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSectionsInTables"
|
||||||
|
getBosnian = "Odjeljci koji ne bi trebali biti unutar tablica "
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInFootnotes"
|
||||||
|
getBosnian = "Naslovi koji ne bi trebali biti u fusnotama"
|
||||||
|
Exit Function
|
||||||
|
Case "badHeadingsInTables"
|
||||||
|
getBosnian = "Zaglavlja koja se ne smiju stavljati unutar tablica"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getBosnian = "No translation"
|
getBosnian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
|
|
@ -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 markval29
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval30
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -9,10 +9,10 @@ End Sub
|
||||||
Sub validateButton
|
Sub validateButton
|
||||||
Dim badFootnoteSigns As Boolean
|
Dim badFootnoteSigns As Boolean
|
||||||
Dim badGraphics As Boolean
|
Dim badGraphics As Boolean
|
||||||
Dim sectionsReport As String
|
Dim badSectionsInTables As Boolean
|
||||||
|
Dim badHeadingsInFootnotes As Boolean
|
||||||
Dim outlinePageStylesReport As String
|
Dim outlinePageStylesReport As String
|
||||||
Dim outlineInNotesReport As String
|
Dim badHeadingsInTables As Boolean
|
||||||
Dim oulineInTablesReport As String
|
|
||||||
Dim badText As Boolean
|
Dim badText As Boolean
|
||||||
Dim needExtendedInfo As Boolean
|
Dim needExtendedInfo As Boolean
|
||||||
Dim config As Object
|
Dim config As Object
|
||||||
|
@ -23,7 +23,7 @@ Sub validateButton
|
||||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||||
statusIndicator.Start(getTranslation("validationStarted"),100)
|
statusIndicator.Start(getTranslation("validationStarted"),100)
|
||||||
|
|
||||||
badFootnoteSigns = noteSingsCheck()
|
badFootnoteSigns = noteSignsCheck()
|
||||||
statusIndicator.setValue(10)
|
statusIndicator.setValue(10)
|
||||||
|
|
||||||
badGraphics = checkGraphics()
|
badGraphics = checkGraphics()
|
||||||
|
@ -33,33 +33,24 @@ Sub validateButton
|
||||||
needFixColoredText = findColoredBackgroundInDoc()
|
needFixColoredText = findColoredBackgroundInDoc()
|
||||||
|
|
||||||
statusIndicator.setValue(20)
|
statusIndicator.setValue(20)
|
||||||
'
|
|
||||||
sectionsReport = checkSectionsInTables()
|
badSectionsInTables = checkSectionsInTables()
|
||||||
statusIndicator.setValue(30)
|
statusIndicator.setValue(30)
|
||||||
'
|
|
||||||
outlineInNotesReport = checkNotesOutline()
|
badHeadingsInFootnotes = checkNotesOutline()
|
||||||
statusIndicator.setValue(40)
|
statusIndicator.setValue(40)
|
||||||
'
|
|
||||||
outlinePageStylesReport = checkHeadingsInHeadersFooters()
|
outlinePageStylesReport = checkHeadingsInHeadersFooters()
|
||||||
statusIndicator.setValue(50)
|
statusIndicator.setValue(50)
|
||||||
'
|
|
||||||
oulineInTablesReport = checkHeadingsInTextTables()
|
badHeadingsInTables = checkHeadingsInTextTables()
|
||||||
|
|
||||||
statusIndicator.setValue(60)
|
statusIndicator.setValue(60)
|
||||||
If outlineInNotesReport <> "" Then
|
|
||||||
MsgBox outlineInNotesReport
|
|
||||||
EndIf
|
|
||||||
If oulineInTablesReport <> "" Then
|
|
||||||
MsgBox oulineInTablesReport
|
|
||||||
EndIf
|
|
||||||
If outlinePageStylesReport <> "" Then
|
If outlinePageStylesReport <> "" Then
|
||||||
MsgBox outlinePageStylesReport
|
MsgBox outlinePageStylesReport
|
||||||
EndIf
|
EndIf
|
||||||
|
|
||||||
If sectionsReport <> "" Then
|
|
||||||
MsgBox sectionsReport
|
|
||||||
EndIf
|
|
||||||
|
|
||||||
If config.getPropertyValue("complexity") = "makerUp" then
|
If config.getPropertyValue("complexity") = "makerUp" then
|
||||||
needExtendedInfo = true
|
needExtendedInfo = true
|
||||||
Else
|
Else
|
||||||
|
@ -73,7 +64,7 @@ Sub validateButton
|
||||||
|
|
||||||
numberingsErros = printNumberingSymbols(needExtendedInfo)
|
numberingsErros = printNumberingSymbols(needExtendedInfo)
|
||||||
statusIndicator.setValue(80)
|
statusIndicator.setValue(80)
|
||||||
If brokenCharBackTransparent OR needFixColoredText OR numberingsErros OR badText OR badFootnoteSigns OR badGraphics Or outlineInNotesReport <> "" Or sectionsReport <> "" OR oulineInTablesReport <> "" OR outlinePageStylesReport <> "" Then
|
If brokenCharBackTransparent OR needFixColoredText OR numberingsErros OR badText OR badFootnoteSigns OR badGraphics Or badHeadingsInFootnotes Or badSectionsInTables OR badHeadingsInTables OR outlinePageStylesReport <> "" Then
|
||||||
MsgBox getTranslation("validationWarning")
|
MsgBox getTranslation("validationWarning")
|
||||||
Else
|
Else
|
||||||
MsgBox getTranslation("validationSuccess")
|
MsgBox getTranslation("validationSuccess")
|
||||||
|
@ -137,7 +128,7 @@ Sub replaceCharsInDOI
|
||||||
AskAndReplace("(?<=DOI[0-9. /XVI:‒–—−ХOО?-]{1,50})[‒–—−]{1,5}","-")
|
AskAndReplace("(?<=DOI[0-9. /XVI:‒–—−ХOО?-]{1,50})[‒–—−]{1,5}","-")
|
||||||
End sub
|
End sub
|
||||||
|
|
||||||
Private Function noteSingsCheck() As Boolean
|
Private Function noteSignsCheck() As Boolean
|
||||||
Dim footnotes As Object
|
Dim footnotes As Object
|
||||||
Dim footnote As Object
|
Dim footnote As Object
|
||||||
Dim endnote As Object
|
Dim endnote As Object
|
||||||
|
@ -148,7 +139,7 @@ Private Function noteSingsCheck() As Boolean
|
||||||
Dim label As String
|
Dim label As String
|
||||||
Dim result As String
|
Dim result As String
|
||||||
Dim founds() As Object
|
Dim founds() As Object
|
||||||
noteSingsCheck = false
|
noteSignsCheck = false
|
||||||
result = ""
|
result = ""
|
||||||
footnotes = ThisComponent.Footnotes
|
footnotes = ThisComponent.Footnotes
|
||||||
endnotes = ThisComponent.Endnotes
|
endnotes = ThisComponent.Endnotes
|
||||||
|
@ -180,24 +171,24 @@ Private Function noteSingsCheck() As Boolean
|
||||||
End If
|
End If
|
||||||
Next j
|
Next j
|
||||||
Next i
|
Next i
|
||||||
If (UBound(founds) > 0) Then
|
If (UBound(founds) > -1) Then
|
||||||
noteSingsCheck = true
|
noteSignsCheck = true
|
||||||
MsgBox(getTranslation("validationBadFootnotesSymbolsNotification"))
|
MsgBox(getTranslation("validationBadFootnotesSymbolsNotification"))
|
||||||
startNavigatorDialog(getTranslation("badNoteSings"),founds)
|
startNavigatorDialog(getTranslation("badNoteSings"),founds)
|
||||||
EndIf
|
EndIf
|
||||||
'noteSingsCheck = result
|
'noteSignsCheck = result
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function checkNotesOutline As String
|
Function checkNotesOutline As Boolean
|
||||||
Dim oDescriptor As Object
|
|
||||||
Dim footNotes As Object
|
Dim footNotes As Object
|
||||||
Dim endNotes As Object
|
Dim endNotes As Object
|
||||||
Dim x As Integer
|
Dim x As Long
|
||||||
Dim aNote As Object
|
Dim aNote As Object
|
||||||
Dim oEnum As Object
|
Dim oEnum As Object
|
||||||
Dim oCurPar As Object
|
Dim oCurPar As Object
|
||||||
Dim result As String
|
' Dim result As String
|
||||||
result = ""
|
Dim founds() As Object
|
||||||
|
' result = ""
|
||||||
footNotes = thisComponent.footNotes
|
footNotes = thisComponent.footNotes
|
||||||
endNotes = thisComponent.EndNotes
|
endNotes = thisComponent.EndNotes
|
||||||
for x = 0 to footNotes.Count -1
|
for x = 0 to footNotes.Count -1
|
||||||
|
@ -207,7 +198,8 @@ Function checkNotesOutline As String
|
||||||
Do While oEnum.hasMoreElements()
|
Do While oEnum.hasMoreElements()
|
||||||
oCurPar = oEnum.nextElement()
|
oCurPar = oEnum.nextElement()
|
||||||
If oCurPar.OutlineLevel > 0 Then
|
If oCurPar.OutlineLevel > 0 Then
|
||||||
result = result & getTranslation("validateFootnotes2") & " " & x & " " & getTranslation("setOutlineLevel") & " " & oCurPar.OutlineLevel & chr(10)
|
addToArray(founds,oCurPar)
|
||||||
|
' result = result & getTranslation("validateFootnotes2") & " " & x & " " & getTranslation("setOutlineLevel") & " " & oCurPar.OutlineLevel & chr(10)
|
||||||
EndIf
|
EndIf
|
||||||
Loop
|
Loop
|
||||||
Next
|
Next
|
||||||
|
@ -218,21 +210,29 @@ Function checkNotesOutline As String
|
||||||
Do While oEnum.hasMoreElements()
|
Do While oEnum.hasMoreElements()
|
||||||
oCurPar = oEnum.nextElement()
|
oCurPar = oEnum.nextElement()
|
||||||
If oCurPar.OutlineLevel > 0 Then
|
If oCurPar.OutlineLevel > 0 Then
|
||||||
result = result & getTranslation("validateEndnotes1") & " " & x & " " & getTranslation("setOutlineLevel") & " " & oCurPar.OutlineLevel & chr(10)
|
addToArray(founds,oCurPar)
|
||||||
|
' result = result & getTranslation("validateEndnotes1") & " " & x & " " & getTranslation("setOutlineLevel") & " " & oCurPar.OutlineLevel & chr(10)
|
||||||
EndIf
|
EndIf
|
||||||
Loop
|
Loop
|
||||||
Next
|
Next
|
||||||
checkNotesOutline = result
|
If (UBound(founds) > -1) Then
|
||||||
|
startNavigatorDialog(getTranslation("badHeadingsInFootnotes"),founds)
|
||||||
|
checkNotesOutline = true
|
||||||
|
Else
|
||||||
|
checkNotesOutline = false
|
||||||
|
EndIf
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function checkSectionsInTables As String
|
Function checkSectionsInTables As Boolean
|
||||||
Dim x As Integer
|
Dim x As Integer
|
||||||
Dim oEnum As Object
|
Dim oEnum As Object
|
||||||
Dim result As String
|
'Dim result As String
|
||||||
Dim sections As Object
|
Dim sections As Object
|
||||||
Dim section As Object
|
Dim section As Object
|
||||||
Dim anchor As Object
|
Dim anchor As Object
|
||||||
Dim anchorText As Object
|
Dim anchorText As Object
|
||||||
|
Dim badSections() As Object
|
||||||
result = ""
|
result = ""
|
||||||
sections = thisComponent.TextSections
|
sections = thisComponent.TextSections
|
||||||
for x = 0 to sections.Count -1
|
for x = 0 to sections.Count -1
|
||||||
|
@ -240,10 +240,17 @@ Function checkSectionsInTables As String
|
||||||
anchor = section.getAnchor()
|
anchor = section.getAnchor()
|
||||||
anchorText = anchor.getText()
|
anchorText = anchor.getText()
|
||||||
If anchorText.supportsService("com.sun.star.text.CellProperties") Then
|
If anchorText.supportsService("com.sun.star.text.CellProperties") Then
|
||||||
result = result & getTranslation("section") & " " & section.Name & " " & getTranslation("isInTable") & chr(10)
|
addToArray(badSections(),anchor)
|
||||||
|
'result = result & getTranslation("section") & " " & section.Name & " " & getTranslation("isInTable") & chr(10)
|
||||||
EndIf
|
EndIf
|
||||||
Next
|
Next
|
||||||
checkSectionsInTables = result
|
|
||||||
|
If (UBound(badSections) > -1) Then
|
||||||
|
checkSectionsInTables = true
|
||||||
|
startNavigatorDialog(getTranslation("badSectionsInTables"),badSections)
|
||||||
|
Else
|
||||||
|
checkSectionsInTables = false
|
||||||
|
EndIf
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function checkHeadingsInHeadersFooters As String
|
Function checkHeadingsInHeadersFooters As String
|
||||||
|
@ -301,7 +308,7 @@ Function checkHeadingsInHeadersFooters As String
|
||||||
checkHeadingsInHeadersFooters = result
|
checkHeadingsInHeadersFooters = result
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Function checkHeadingsInTextTables() As String
|
Function checkHeadingsInTextTables() As Boolean
|
||||||
Dim enum1Element As Object
|
Dim enum1Element As Object
|
||||||
Dim enum1 As Object
|
Dim enum1 As Object
|
||||||
Dim enum2 As Object
|
Dim enum2 As Object
|
||||||
|
@ -314,8 +321,7 @@ Function checkHeadingsInTextTables() As String
|
||||||
Dim cell As Object
|
Dim cell As Object
|
||||||
Dim cellText As Object
|
Dim cellText As Object
|
||||||
Dim firstCellName As String
|
Dim firstCellName As String
|
||||||
Dim result As String
|
Dim founds() As Object
|
||||||
result = ""
|
|
||||||
enum1 = ThisComponent.Text.createEnumeration
|
enum1 = ThisComponent.Text.createEnumeration
|
||||||
While enum1.hasMoreElements
|
While enum1.hasMoreElements
|
||||||
enum1Element = enum1.nextElement
|
enum1Element = enum1.nextElement
|
||||||
|
@ -326,20 +332,86 @@ Function checkHeadingsInTextTables() As String
|
||||||
cell = enum1Element.getCellByName(cellNames(i))
|
cell = enum1Element.getCellByName(cellNames(i))
|
||||||
cellText = cell.getText()
|
cellText = cell.getText()
|
||||||
If cellNames(i) = firstCellName Then
|
If cellNames(i) = firstCellName Then
|
||||||
If isHeadingNotFirstInText(cellText) Then
|
addHeadingNotFirstInText(cellText,founds)
|
||||||
result = result & getTranslation("foundHeadingIn") & " " & getTranslation("table") & " " & enum1Element.TableName & chr(10)
|
|
||||||
EndIf
|
|
||||||
Else
|
Else
|
||||||
If isHeadingsInText(cellText) Then
|
addHeadingsInText(cellText,founds)
|
||||||
result = result & getTranslation("foundHeadingIn") & " " & getTranslation("table") & " " & enum1Element.TableName & chr(10)
|
|
||||||
EndIf
|
|
||||||
EndIf
|
EndIf
|
||||||
Next i
|
Next i
|
||||||
EndIf
|
EndIf
|
||||||
Wend
|
Wend
|
||||||
checkHeadingsInTextTables = result
|
If (UBound(founds) > -1) Then
|
||||||
|
checkHeadingsInTextTables = true
|
||||||
|
startNavigatorDialog(getTranslation("badHeadingsInTables"),founds)
|
||||||
|
Else
|
||||||
|
checkHeadingsInTextTables = false
|
||||||
|
EndIf
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Sub addHeadingNotFirstInText(oText As Object, founds() As Object)
|
||||||
|
Dim enum1Element As Object
|
||||||
|
Dim enum1 As Object
|
||||||
|
Dim enum2 As Object
|
||||||
|
Dim thisPortion As Object
|
||||||
|
Dim footnoteText As Object
|
||||||
|
Dim label As String
|
||||||
|
Dim labelNum As Integer
|
||||||
|
Dim i As Integer
|
||||||
|
Dim count As Integer
|
||||||
|
Dim cell As Object
|
||||||
|
Dim cellText As Object
|
||||||
|
Dim first As Boolean
|
||||||
|
first = true
|
||||||
|
enum1 = oText.createEnumeration
|
||||||
|
While enum1.hasMoreElements
|
||||||
|
enum1Element = enum1.nextElement
|
||||||
|
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
||||||
|
If Not first Then
|
||||||
|
If enum1Element.OutlineLevel > 0 Then
|
||||||
|
addToArray(founds,enum1Element)
|
||||||
|
EndIf
|
||||||
|
EndIf
|
||||||
|
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
||||||
|
cellNames = enum1Element.cellNames
|
||||||
|
For i = LBound(cellNames) To Ubound(cellNames)
|
||||||
|
cell = enum1Element.getCellByName(cellNames(i))
|
||||||
|
cellText = cell.getText()
|
||||||
|
addHeadingsInText(cellText,founds)
|
||||||
|
Next i
|
||||||
|
EndIf
|
||||||
|
first = false
|
||||||
|
Wend
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Sub addHeadingsInText(oText As Object, founds() As Object)
|
||||||
|
Dim enum1Element As Object
|
||||||
|
Dim enum1 As Object
|
||||||
|
Dim enum2 As Object
|
||||||
|
Dim thisPortion As Object
|
||||||
|
Dim footnoteText As Object
|
||||||
|
Dim label As String
|
||||||
|
Dim labelNum As Integer
|
||||||
|
Dim i As Integer
|
||||||
|
Dim count As Integer
|
||||||
|
Dim cell As Object
|
||||||
|
Dim cellText As Object
|
||||||
|
enum1 = oText.Text.createEnumeration
|
||||||
|
While enum1.hasMoreElements
|
||||||
|
enum1Element = enum1.nextElement
|
||||||
|
If enum1Element.supportsService("com.sun.star.text.Paragraph") Then
|
||||||
|
If enum1Element.OutlineLevel > 0 Then
|
||||||
|
addToArray(founds,enum1Element)
|
||||||
|
EndIf
|
||||||
|
ElseIf enum1Element.supportsService("com.sun.star.text.TextTable") Then
|
||||||
|
cellNames = enum1Element.cellNames
|
||||||
|
For i = LBound(cellNames) To Ubound(cellNames)
|
||||||
|
cell = enum1Element.getCellByName(cellNames(i))
|
||||||
|
cellText = cell.getText()
|
||||||
|
addHeadingsInText(cellText,founds)
|
||||||
|
Next i
|
||||||
|
EndIf
|
||||||
|
Wend
|
||||||
|
End Sub
|
||||||
|
|
||||||
Function isHeadingNotFirstInText(oText As Object) As Boolean
|
Function isHeadingNotFirstInText(oText As Object) As Boolean
|
||||||
Dim enum1Element As Object
|
Dim enum1Element As Object
|
||||||
Dim enum1 As Object
|
Dim enum1 As Object
|
||||||
|
@ -961,7 +1033,7 @@ Function findBadCharacters() As Boolean
|
||||||
founds = findInDoc("[\uE000-\uF8FF]+")
|
founds = findInDoc("[\uE000-\uF8FF]+")
|
||||||
findBadCharacters = false
|
findBadCharacters = false
|
||||||
If founds.count <> 0 Then
|
If founds.count <> 0 Then
|
||||||
MsgBox getTranslation("validationBadSymbolsNotification")
|
'MsgBox getTranslation("validationBadSymbolsNotification")
|
||||||
foundObjects = convertXIndexAccessToArray(founds)
|
foundObjects = convertXIndexAccessToArray(founds)
|
||||||
startNavigatorDialog(getTranslation("badSymbols"),foundObjects)
|
startNavigatorDialog(getTranslation("badSymbols"),foundObjects)
|
||||||
findBadCharacters = true
|
findBadCharacters = true
|
||||||
|
|
BIN
translations.ods
BIN
translations.ods
Binary file not shown.
Loading…
Add table
Reference in a new issue