Added more info about cleaning environment
This commit is contained in:
parent
876008a5c5
commit
90352a2110
4 changed files with 22 additions and 6 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 mark65
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark66
|
||||
|
||||
End Sub
|
||||
|
||||
|
@ -1413,6 +1413,13 @@ Function getVersion As String
|
|||
getVersion=oProduct.getByName("ooSetupVersion")
|
||||
End Function
|
||||
|
||||
Function getFullVersion As String
|
||||
GlobalScope.BasicLibraries.LoadLibrary("Tools")
|
||||
Dim oProduct As Object
|
||||
oProduct=GetRegistryKeyContent("org.openoffice.Setup/Product")
|
||||
getFullVersion=oProduct.getByName("ooSetupVersionAboutBox")
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Private Sub convertFormatToUserFields(identifier As String, styleNames, styleValues)
|
||||
|
@ -1801,12 +1808,21 @@ Sub addTimeStampToProperties
|
|||
curTime = Now()
|
||||
docProps = ThisComponent.getDocumentProperties()
|
||||
userProps = docProps.UserDefinedProperties()
|
||||
userProps.addProperty(curTime ,128,"Cleaned " & redactionExtensionVersion)
|
||||
userProps.addProperty(curTime ,128,"Cleaned by " & getUserName() & " with " & redactionExtensionVersion & " LO" & getFullVersion() )
|
||||
exceptionHandlerProps:
|
||||
Resume Next
|
||||
End Sub
|
||||
|
||||
|
||||
Function getUserName() As String
|
||||
Dim oCP As Object
|
||||
Dim oCUA As Object
|
||||
Dim aProps(0) As New com.sun.star.beans.PropertyValue
|
||||
oCP = GetProcessServiceManager().createInstance( "com.sun.star.configuration.ConfigurationProvider" )
|
||||
aProps(0).Name = "nodepath"
|
||||
aProps(0).Value = "/org.openoffice.UserProfile/Data"
|
||||
oCUA = oCP.createInstanceWithArguments( "com.sun.star.configuration.ConfigurationUpdateAccess", aProps )
|
||||
getUserName = " " & oCUA.getByName("givenname") & " " & oCUA.getByName("sn")
|
||||
End Function
|
||||
|
||||
sub saveCleanedVersion(comment)
|
||||
dim document as object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue