Add removal for marcro in documents
This commit is contained in:
parent
57f9c9ea95
commit
0c1d91515c
3 changed files with 23 additions and 5 deletions
|
@ -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 mark38
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark39
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -89,6 +89,9 @@ Private Sub cleanAccordingTo(dialog As Object)
|
|||
If dialog.getControl("removeManualPageBreaks").state = 1 Then
|
||||
removeManualPageBreaks
|
||||
EndIf
|
||||
If dialog.getControl("removeBasic").state = 1 Then
|
||||
removeLibs
|
||||
EndIf
|
||||
|
||||
statusIndicator.end()
|
||||
saveAndreload()
|
||||
|
@ -96,6 +99,19 @@ Private Sub cleanAccordingTo(dialog As Object)
|
|||
|
||||
End Sub
|
||||
|
||||
Private Sub removeLibs
|
||||
Dim docBasic as Object
|
||||
docBasic = ThisComponent.BasicLibraries
|
||||
Dim libs() As String
|
||||
libs = docBasic.getElementNames()
|
||||
Dim libName As String
|
||||
Dim i As Integer
|
||||
For i = LBound(libs) To UBound(libs)
|
||||
libName = libs(i)
|
||||
docBasic.removeLibrary(libName)
|
||||
Next i
|
||||
End Sub
|
||||
|
||||
Private Sub quietCleaning
|
||||
Dim description As String
|
||||
Dim statusIndicator As Object
|
||||
|
@ -130,6 +146,7 @@ Private Sub quietCleaning
|
|||
removeUserPageStyles
|
||||
statusIndicator.Start("Загружаем стили из шаблона",100)
|
||||
loadArticleStyles
|
||||
removeLibs
|
||||
statusIndicator.end()
|
||||
saveAndreload()
|
||||
MsgBox "Чистка завершена."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue