Added filter for bad default paragraph styles settings
This commit is contained in:
parent
a8f91c44c4
commit
805815e2ae
3 changed files with 35 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
|
<!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 mark54
|
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark55
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -55,6 +55,10 @@ Private Sub cleanAccordingTo(dialog As Object)
|
||||||
saveDocument
|
saveDocument
|
||||||
statusIndicator.Start(getTranslation("statusStarted"),100)
|
statusIndicator.Start(getTranslation("statusStarted"),100)
|
||||||
doNotTrack
|
doNotTrack
|
||||||
|
If dialog.getControl("loadStandardStyles").state = 1 Then
|
||||||
|
statusIndicator.Start(getTranslation("resaving"),100)
|
||||||
|
saveAsDocAndBackToODT
|
||||||
|
EndIf
|
||||||
If dialog.getControl("fontsInStyles").state = 1 Then
|
If dialog.getControl("fontsInStyles").state = 1 Then
|
||||||
statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100)
|
statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100)
|
||||||
replaceStyleFonts
|
replaceStyleFonts
|
||||||
|
@ -138,6 +142,7 @@ Private Sub quietCleaning
|
||||||
Dim statusIndicator As Object
|
Dim statusIndicator As Object
|
||||||
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
statusIndicator = ThisComponent.getCurrentController.statusIndicator
|
||||||
saveDocument
|
saveDocument
|
||||||
|
saveAsDocAndBackToODT
|
||||||
statusIndicator.Start(getTranslation("statusStarted"),100)
|
statusIndicator.Start(getTranslation("statusStarted"),100)
|
||||||
doNotTrack
|
doNotTrack
|
||||||
statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100)
|
statusIndicator.Start(getTranslation("statusReplaceFontsInStyles"),100)
|
||||||
|
@ -667,7 +672,7 @@ Private Sub saveAndreload()
|
||||||
document = ThisComponent.CurrentController.Frame
|
document = ThisComponent.CurrentController.Frame
|
||||||
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
|
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
|
||||||
dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())
|
dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())
|
||||||
dispatcher.executeDispatch(document, ".uno:Reload", "", 0, Array())
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
@ -1710,4 +1715,30 @@ Private Function insertUserField(cursor As Object,fieldName As String,fieldValue
|
||||||
cursor.Text.insertTextContent(cursor, oField, False)
|
cursor.Text.insertTextContent(cursor, oField, False)
|
||||||
oField.IsVisible = false
|
oField.IsVisible = false
|
||||||
End Function
|
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
|
||||||
</script:module>
|
</script:module>
|
|
@ -3,7 +3,7 @@
|
||||||
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
xmlns:dep="http://openoffice.org/extensions/description/2006"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<identifier value="pro.litvinovg.Redaction" />
|
<identifier value="pro.litvinovg.Redaction" />
|
||||||
<version value="0.7.12" />
|
<version value="0.7.13" />
|
||||||
<platform value="all" />
|
<platform value="all" />
|
||||||
<display-name>
|
<display-name>
|
||||||
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
|
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>
|
||||||
|
|
|
@ -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.12 Transaltions update, fix for mistakes added
|
||||||
0.7.11 Serbian, Croatian, Bosnian translations added
|
0.7.11 Serbian, Croatian, Bosnian translations added
|
||||||
0.7.9 Translations improved
|
0.7.9 Translations improved
|
||||||
|
|
Loading…
Add table
Reference in a new issue