Save cleaned version

This commit is contained in:
Georgy Litvinov 2020-07-12 14:54:28 +02:00
parent 120328a506
commit 82e7e7df9a

View file

@ -177,6 +177,7 @@ Private Sub quietCleaning
loadArticleStyles
removeLibs
addTimeStampToProperties
saveCleanedVersion("Standard cleaning")
statusIndicator.end()
saveAndreload()
MsgBox getTranslation("cleaningFinished")
@ -1761,4 +1762,17 @@ Sub addTimeStampToProperties
exceptionHandlerProps:
Resume Next
End Sub
sub saveCleanedVersion(comment)
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "VersionComment"
args1(0).Value = comment
dispatcher.executeDispatch(document, ".uno:Save", "", 0, args1())
end sub
</script:module>