push new version

This commit is contained in:
Georgy Litvinov 2020-09-24 10:40:52 +02:00
parent 11f2eb17b8
commit 9b7982da1a
7 changed files with 53 additions and 4 deletions

View file

@ -1,6 +1,6 @@
<?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="Clean" script:language="StarBasic">Sub mark61
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark64
End Sub
@ -29,6 +29,7 @@ Private Sub makerUpMenu
dialog.getControl(&quot;replaceWhiteBackground&quot;).Label = getTranslation(&quot;advancedMenuReplaceWhiteBackground&quot;)
dialog.getControl(&quot;removeUnusedStyles&quot;).Label = getTranslation(&quot;advancedMenuRemoveUnusedStyles&quot;)
dialog.getControl(&quot;removeLinks&quot;).Label = getTranslation(&quot;advancedMenuRemoveLinks&quot;)
dialog.getControl(&quot;removeAllFields&quot;).Label = getTranslation(&quot;advancedMenuRemoveAllFields&quot;)
dialog.getControl(&quot;removeBookmarks&quot;).Label = getTranslation(&quot;advancedMenuRemoveBookmarks&quot;)
dialog.getControl(&quot;configTables&quot;).Label = getTranslation(&quot;advancedMenuConfigTables&quot;)
dialog.getControl(&quot;configAnchors&quot;).Label = getTranslation(&quot;advancedMenuConfigAnchors&quot;)
@ -87,6 +88,10 @@ Private Sub cleanAccordingTo(dialog As Object)
statusIndicator.Start(getTranslation(&quot;statusRemoveLinks&quot;),100)
removeHyperlinks
EndIf
If dialog.getControl(&quot;removeAllFields&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;statusRemoveAllFields&quot;),100)
removeAllFields
EndIf
If dialog.getControl(&quot;removeBookmarks&quot;).state = 1 Then
statusIndicator.Start(getTranslation(&quot;statusRemoveBookmarks&quot;),100)
disposeAllBookmarks
@ -377,6 +382,18 @@ Private Sub removeUserPageStyles
Next i
End Sub
Sub removeAllFields()
Dim fields As Object
Dim fieldEnum As Object
Dim field As Object
fields = ThisComponent.getTextFields()
fieldEnum = fields.createEnumeration()
While fieldEnum.hasMoreElements
field = fieldEnum.nextElement()
field.dispose()
Wend
End sub
Private Sub fixFrequentMistakes
Dim config As Object
config = initRedactionConfiguration()

View file

@ -23,5 +23,6 @@
<dlg:button dlg:id="buttonLoad" dlg:tab-index="18" dlg:left="158" dlg:top="172" dlg:width="52" dlg:height="12" dlg:value="loadTemplate">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Redaction.Configuration.setDeafultTemplate?language=Basic&amp;location=application" script:language="Script"/>
</dlg:button>
<dlg:checkbox dlg:id="removeAllFields" dlg:tab-index="19" dlg:left="11" dlg:top="160" dlg:width="218" dlg:height="7" dlg:value="Удалить все поля" dlg:checked="false"/>
</dlg:bulletinboard>
</dlg:window>

View file

@ -257,6 +257,12 @@ Function getRussian(identifier As String) As String
Case &quot;charFirstPage&quot;
getRussian = &quot;Найден на стр.&quot;
Exit Function
Case &quot;statusRemoveAllFields&quot;
getRussian = &quot;Удаляются все поля данных&quot;
Exit Function
Case &quot;advancedMenuRemoveAllFields&quot;
getRussian = &quot;Удалить все поля данных&quot;
Exit Function
Case Else
getRussian = &quot;Перевод не найден&quot;
End Select
@ -496,6 +502,12 @@ Function getEnglish(identifier As String) As String
Case &quot;charFirstPage&quot;
getEnglish = &quot;Found on page&quot;
Exit Function
Case &quot;statusRemoveAllFields&quot;
getEnglish = &quot;Removing all fields&quot;
Exit Function
Case &quot;advancedMenuRemoveAllFields&quot;
getEnglish = &quot;Remove all fields&quot;
Exit Function
Case Else
getEnglish = &quot;No translation&quot;
End Select
@ -734,6 +746,12 @@ Function getCroatian(identifier As String) As String
Case &quot;charFirstPage&quot;
getCroatian = &quot;Pronađeno na stranici&quot;
Exit Function
Case &quot;statusRemoveAllFields&quot;
getCroatian = &quot;Uklanjanje svih polja&quot;
Exit Function
Case &quot;advancedMenuRemoveAllFields&quot;
getCroatian = &quot;Uklonite sva polja&quot;
Exit Function
Case Else
getCroatian = &quot;No translation&quot;
End Select
@ -972,6 +990,12 @@ Function getSerbian(identifier As String) As String
Case &quot;charFirstPage&quot;
getSerbian = &quot;Пронађено на страници&quot;
Exit Function
Case &quot;statusRemoveAllFields&quot;
getSerbian = &quot;Уклањање свих поља&quot;
Exit Function
Case &quot;advancedMenuRemoveAllFields&quot;
getSerbian = &quot;Уклоните сва поља&quot;
Exit Function
Case Else
getSerbian = &quot;No translation&quot;
End Select
@ -1210,6 +1234,12 @@ Function getBosnian(identifier As String) As String
Case &quot;charFirstPage&quot;
getBosnian = &quot;Pronađeno na stranici&quot;
Exit Function
Case &quot;statusRemoveAllFields&quot;
getBosnian = &quot;Uklanjanje svih polja&quot;
Exit Function
Case &quot;advancedMenuRemoveAllFields&quot;
getBosnian = &quot;Uklonite sva polja&quot;
Exit Function
Case Else
getBosnian = &quot;No translation&quot;
End Select