diff --git a/Redaction/Clean.xba b/Redaction/Clean.xba index 2011ebb..d7e7d47 100644 --- a/Redaction/Clean.xba +++ b/Redaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark54 +Sub mark55 End Sub @@ -55,6 +55,10 @@ Private Sub cleanAccordingTo(dialog As Object) saveDocument statusIndicator.Start(getTranslation("statusStarted"),100) doNotTrack + If dialog.getControl("loadStandardStyles").state = 1 Then + statusIndicator.Start(getTranslation("resaving"),100) + saveAsDocAndBackToODT + EndIf If dialog.getControl("fontsInStyles").state = 1 Then statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100) replaceStyleFonts @@ -138,6 +142,7 @@ Private Sub quietCleaning Dim statusIndicator As Object statusIndicator = ThisComponent.getCurrentController.statusIndicator saveDocument + saveAsDocAndBackToODT statusIndicator.Start(getTranslation("statusStarted"),100) doNotTrack statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100) @@ -667,7 +672,7 @@ Private Sub saveAndreload() document = ThisComponent.CurrentController.Frame dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array()) - dispatcher.executeDispatch(document, ".uno:Reload", "", 0, Array()) + End Sub @@ -1710,4 +1715,30 @@ Private Function insertUserField(cursor As Object,fieldName As String,fieldValue cursor.Text.insertTextContent(cursor, oField, False) oField.IsVisible = false End Function + +sub saveAsDocAndBackToODT + dim document as object + dim dispatcher as object + Dim path As String + Dim tmpName As String + Dim oldName As String + document = ThisComponent.CurrentController.Frame + dispatcher = createUnoService("com.sun.star.frame.DispatchHelper") + oldName = ThisComponent.getURL() + tmpName = oldName & "--tmp" & ".doc" + dim args1(1) as new com.sun.star.beans.PropertyValue + args1(0).Name = "URL" + args1(0).Value = tmpName + args1(1).Name = "FilterName" + args1(1).Value = "MS Word 97" + dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1()) + dispatcher.executeDispatch(document, ".uno:Reload", "", 0, Array()) + args1(0).Value = oldName + args1(1).Value = "writer8" + dispatcher.executeDispatch(document, ".uno:SaveAs", "", 0, args1()) + dispatcher.executeDispatch(document, ".uno:Reload", "", 0, Array()) + If FileExists(tmpName) Then + Kill(tmpName) + End If +end sub \ No newline at end of file diff --git a/description.xml b/description.xml index 19aa501..a4f5d5b 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 diff --git a/releasenotes.txt b/releasenotes.txt index 348444b..6e0d406 100644 --- a/releasenotes.txt +++ b/releasenotes.txt @@ -1,3 +1,4 @@ +0.7.13 Added conversion to doc and back to odt to filter broken default paragraph style settings 0.7.12 Transaltions update, fix for mistakes added 0.7.11 Serbian, Croatian, Bosnian translations added 0.7.9 Translations improved