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()