diff --git a/Redaction/Clean.xba b/Redaction/Clean.xba index 67e1bae..8703d6f 100644 --- a/Redaction/Clean.xba +++ b/Redaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark38 +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 "Чистка завершена." diff --git a/Redaction/CleaningDialog.xdl b/Redaction/CleaningDialog.xdl index 70c88c0..8b85a07 100644 --- a/Redaction/CleaningDialog.xdl +++ b/Redaction/CleaningDialog.xdl @@ -1,10 +1,10 @@ - + - + - + @@ -19,5 +19,6 @@ + \ No newline at end of file diff --git a/description.xml b/description.xml index 5d00599..8664eb4 100644 --- a/description.xml +++ b/description.xml @@ -3,7 +3,7 @@ xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> - + Cleaning and validation documents for publishing in html and epub with pagination