Replace tracking chages view for bad symbols with navigator
This commit is contained in:
parent
7c5aadcaad
commit
015a1ff42c
3 changed files with 61 additions and 36 deletions
|
@ -304,6 +304,9 @@ Function getRussian(identifier As String) As String
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "fixBrokenCharBackTransparentMenuItem"
|
Case "fixBrokenCharBackTransparentMenuItem"
|
||||||
getRussian = "Исправить некорректные настройки цветовой заливки абзацев"
|
getRussian = "Исправить некорректные настройки цветовой заливки абзацев"
|
||||||
|
Exit Function
|
||||||
|
Case "badSymbols"
|
||||||
|
getRussian = "Неподходящие для публикации символы"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getRussian = "Перевод не найден"
|
getRussian = "Перевод не найден"
|
||||||
|
@ -591,6 +594,9 @@ Function getEnglish(identifier As String) As String
|
||||||
Exit Function
|
Exit Function
|
||||||
Case "fixBrokenCharBackTransparentMenuItem"
|
Case "fixBrokenCharBackTransparentMenuItem"
|
||||||
getEnglish = "Fix incorrect color fill settings for paragraphs "
|
getEnglish = "Fix incorrect color fill settings for paragraphs "
|
||||||
|
Exit Function
|
||||||
|
Case "badSymbols"
|
||||||
|
getEnglish = "Unsuitable for publishing characters"
|
||||||
Exit Function
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getEnglish = "No translation"
|
getEnglish = "No translation"
|
||||||
|
@ -878,6 +884,9 @@ Function getCroatian(identifier As String) As String
|
||||||
Case "fixBrokenCharBackTransparentMenuItem"
|
Case "fixBrokenCharBackTransparentMenuItem"
|
||||||
getCroatian = "Ispravite netočne postavke ispunjavanja boja za odlomke "
|
getCroatian = "Ispravite netočne postavke ispunjavanja boja za odlomke "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSymbols"
|
||||||
|
getCroatian = "Neprimjerene znakova za objavljivanje"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getCroatian = "No translation"
|
getCroatian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1164,6 +1173,9 @@ Function getSerbian(identifier As String) As String
|
||||||
Case "fixBrokenCharBackTransparentMenuItem"
|
Case "fixBrokenCharBackTransparentMenuItem"
|
||||||
getSerbian = "Исправите нетачна подешавања попуњавања боја за пасусе "
|
getSerbian = "Исправите нетачна подешавања попуњавања боја за пасусе "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSymbols"
|
||||||
|
getSerbian = "Неодговарајуће знакова за објављивање"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getSerbian = "No translation"
|
getSerbian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
@ -1450,6 +1462,9 @@ Function getBosnian(identifier As String) As String
|
||||||
Case "fixBrokenCharBackTransparentMenuItem"
|
Case "fixBrokenCharBackTransparentMenuItem"
|
||||||
getBosnian = "Ispravite netočne postavke ispunjavanja boja za odlomke "
|
getBosnian = "Ispravite netočne postavke ispunjavanja boja za odlomke "
|
||||||
Exit Function
|
Exit Function
|
||||||
|
Case "badSymbols"
|
||||||
|
getBosnian = "Neprimjerene znakova za objavljivanje"
|
||||||
|
Exit Function
|
||||||
Case Else
|
Case Else
|
||||||
getBosnian = "No translation"
|
getBosnian = "No translation"
|
||||||
End Select
|
End Select
|
||||||
|
|
|
@ -1,27 +1,10 @@
|
||||||
<?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 markval25
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval26
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function isInDoc(searchString As String) As Boolean
|
|
||||||
Dim founds As Object
|
|
||||||
Dim sDesc As Object
|
|
||||||
Dim srch(0) as new com.sun.star.beans.PropertyValue
|
|
||||||
sDesc = Thiscomponent.createSearchDescriptor()
|
|
||||||
sDesc.SearchAll = true
|
|
||||||
sDesc.ValueSearch = false
|
|
||||||
sDesc.SearchStyles = false
|
|
||||||
sDesc.SearchCaseSensitive = true
|
|
||||||
sDesc.SearchRegularExpression = true
|
|
||||||
sDesc.SearchString = searchString
|
|
||||||
founds = Thiscomponent.findAll(sDesc)
|
|
||||||
If founds.count <> 0 Then
|
|
||||||
isInDoc = true
|
|
||||||
Else
|
|
||||||
isInDoc = false
|
|
||||||
EndIf
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Sub validateButton
|
Sub validateButton
|
||||||
Dim footnotesReport As String
|
Dim footnotesReport As String
|
||||||
|
@ -75,10 +58,9 @@ Sub validateButton
|
||||||
If sectionsReport <> "" Then
|
If sectionsReport <> "" Then
|
||||||
MsgBox sectionsReport
|
MsgBox sectionsReport
|
||||||
EndIf
|
EndIf
|
||||||
If isInDoc("[\uE000-\uF8FF]") Then
|
|
||||||
badText = true
|
badText = findBadCharacters
|
||||||
EndIf
|
|
||||||
|
|
||||||
If config.getPropertyValue("complexity") = "makerUp" then
|
If config.getPropertyValue("complexity") = "makerUp" then
|
||||||
needExtendedInfo = true
|
needExtendedInfo = true
|
||||||
Else
|
Else
|
||||||
|
@ -95,10 +77,7 @@ Sub validateButton
|
||||||
statusIndicator.setValue(80)
|
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")
|
MsgBox getTranslation("validationWarning")
|
||||||
If badText Then
|
|
||||||
MsgBox getTranslation("validationBadSymbolsNotification")
|
|
||||||
removeBadCharacters
|
|
||||||
EndIf
|
|
||||||
Else
|
Else
|
||||||
MsgBox getTranslation("validationSuccess")
|
MsgBox getTranslation("validationSuccess")
|
||||||
EndIf
|
EndIf
|
||||||
|
@ -150,14 +129,6 @@ Private Function checkGraphics() As String
|
||||||
checkGraphics = result
|
checkGraphics = result
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub removeBadCharacters
|
|
||||||
StartTracking
|
|
||||||
AskAndReplace("[\uE000-\uF8FF]+","")
|
|
||||||
StopTracking
|
|
||||||
showTrackedChanges
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub fixDOI
|
Private Sub fixDOI
|
||||||
StartTracking
|
StartTracking
|
||||||
replaceCharsInDOI
|
replaceCharsInDOI
|
||||||
|
@ -979,6 +950,19 @@ Function getCharsInFont(fontName As String) As String
|
||||||
EndIf
|
EndIf
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Function findBadCharacters() As Boolean
|
||||||
|
Dim founds As Object
|
||||||
|
founds = findInDoc("[\uE000-\uF8FF]")
|
||||||
|
findBadCharacters = false
|
||||||
|
If founds.count <> 0 Then
|
||||||
|
MsgBox getTranslation("validationBadSymbolsNotification")
|
||||||
|
startNavigatorDialog(getTranslation("badSymbols"),founds)
|
||||||
|
findBadCharacters = true
|
||||||
|
EndIf
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
Function findColoredBackgroundInDoc() As Boolean
|
Function findColoredBackgroundInDoc() As Boolean
|
||||||
Dim founds As Object
|
Dim founds As Object
|
||||||
Dim sDesc As Object
|
Dim sDesc As Object
|
||||||
|
@ -1114,4 +1098,30 @@ sub openReport(fileName As String)
|
||||||
Kill(tmpName)
|
Kill(tmpName)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
</script:module>
|
|
||||||
|
|
||||||
|
Function isInDoc(searchString As String) As Boolean
|
||||||
|
Dim founds As Variant
|
||||||
|
founds = findInDoc(searchString)
|
||||||
|
If founds.count <> 0 Then
|
||||||
|
isInDoc = true
|
||||||
|
Else
|
||||||
|
isInDoc = false
|
||||||
|
EndIf
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Function findInDoc(searchString As String) As Variant
|
||||||
|
Dim founds As Object
|
||||||
|
Dim sDesc As Object
|
||||||
|
Dim srch(0) as new com.sun.star.beans.PropertyValue
|
||||||
|
sDesc = Thiscomponent.createSearchDescriptor()
|
||||||
|
sDesc.SearchAll = true
|
||||||
|
sDesc.ValueSearch = false
|
||||||
|
sDesc.SearchStyles = false
|
||||||
|
sDesc.SearchCaseSensitive = true
|
||||||
|
sDesc.SearchRegularExpression = true
|
||||||
|
sDesc.SearchString = searchString
|
||||||
|
founds = Thiscomponent.findAll(sDesc)
|
||||||
|
findInDoc = founds
|
||||||
|
End Function
|
||||||
|
</script:module>
|
BIN
translations.ods
BIN
translations.ods
Binary file not shown.
Loading…
Add table
Reference in a new issue