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
|
||||
Case "fixBrokenCharBackTransparentMenuItem"
|
||||
getRussian = "Исправить некорректные настройки цветовой заливки абзацев"
|
||||
Exit Function
|
||||
Case "badSymbols"
|
||||
getRussian = "Неподходящие для публикации символы"
|
||||
Exit Function
|
||||
Case Else
|
||||
getRussian = "Перевод не найден"
|
||||
|
@ -591,6 +594,9 @@ Function getEnglish(identifier As String) As String
|
|||
Exit Function
|
||||
Case "fixBrokenCharBackTransparentMenuItem"
|
||||
getEnglish = "Fix incorrect color fill settings for paragraphs "
|
||||
Exit Function
|
||||
Case "badSymbols"
|
||||
getEnglish = "Unsuitable for publishing characters"
|
||||
Exit Function
|
||||
Case Else
|
||||
getEnglish = "No translation"
|
||||
|
@ -878,6 +884,9 @@ Function getCroatian(identifier As String) As String
|
|||
Case "fixBrokenCharBackTransparentMenuItem"
|
||||
getCroatian = "Ispravite netočne postavke ispunjavanja boja za odlomke "
|
||||
Exit Function
|
||||
Case "badSymbols"
|
||||
getCroatian = "Neprimjerene znakova za objavljivanje"
|
||||
Exit Function
|
||||
Case Else
|
||||
getCroatian = "No translation"
|
||||
End Select
|
||||
|
@ -1164,6 +1173,9 @@ Function getSerbian(identifier As String) As String
|
|||
Case "fixBrokenCharBackTransparentMenuItem"
|
||||
getSerbian = "Исправите нетачна подешавања попуњавања боја за пасусе "
|
||||
Exit Function
|
||||
Case "badSymbols"
|
||||
getSerbian = "Неодговарајуће знакова за објављивање"
|
||||
Exit Function
|
||||
Case Else
|
||||
getSerbian = "No translation"
|
||||
End Select
|
||||
|
@ -1450,6 +1462,9 @@ Function getBosnian(identifier As String) As String
|
|||
Case "fixBrokenCharBackTransparentMenuItem"
|
||||
getBosnian = "Ispravite netočne postavke ispunjavanja boja za odlomke "
|
||||
Exit Function
|
||||
Case "badSymbols"
|
||||
getBosnian = "Neprimjerene znakova za objavljivanje"
|
||||
Exit Function
|
||||
Case Else
|
||||
getBosnian = "No translation"
|
||||
End Select
|
||||
|
|
|
@ -1,27 +1,10 @@
|
|||
<?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 markval25
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval26
|
||||
|
||||
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
|
||||
Dim footnotesReport As String
|
||||
|
@ -75,10 +58,9 @@ Sub validateButton
|
|||
If sectionsReport <> "" Then
|
||||
MsgBox sectionsReport
|
||||
EndIf
|
||||
If isInDoc("[\uE000-\uF8FF]") Then
|
||||
badText = true
|
||||
EndIf
|
||||
|
||||
|
||||
badText = findBadCharacters
|
||||
|
||||
If config.getPropertyValue("complexity") = "makerUp" then
|
||||
needExtendedInfo = true
|
||||
Else
|
||||
|
@ -95,10 +77,7 @@ Sub validateButton
|
|||
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
|
||||
MsgBox getTranslation("validationWarning")
|
||||
If badText Then
|
||||
MsgBox getTranslation("validationBadSymbolsNotification")
|
||||
removeBadCharacters
|
||||
EndIf
|
||||
|
||||
Else
|
||||
MsgBox getTranslation("validationSuccess")
|
||||
EndIf
|
||||
|
@ -150,14 +129,6 @@ Private Function checkGraphics() As String
|
|||
checkGraphics = result
|
||||
End Function
|
||||
|
||||
Private Sub removeBadCharacters
|
||||
StartTracking
|
||||
AskAndReplace("[\uE000-\uF8FF]+","")
|
||||
StopTracking
|
||||
showTrackedChanges
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub fixDOI
|
||||
StartTracking
|
||||
replaceCharsInDOI
|
||||
|
@ -979,6 +950,19 @@ Function getCharsInFont(fontName As String) As String
|
|||
EndIf
|
||||
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
|
||||
Dim founds As Object
|
||||
Dim sDesc As Object
|
||||
|
@ -1114,4 +1098,30 @@ sub openReport(fileName As String)
|
|||
Kill(tmpName)
|
||||
End If
|
||||
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