diff --git a/Redaction/Clean.xba b/Redaction/Clean.xba index 019ce05..0aa7287 100644 --- a/Redaction/Clean.xba +++ b/Redaction/Clean.xba @@ -1,6 +1,6 @@ -Sub mark65 +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 diff --git a/Redaction/Configuration.xba b/Redaction/Configuration.xba index 535b750..4fedf17 100644 --- a/Redaction/Configuration.xba +++ b/Redaction/Configuration.xba @@ -1,7 +1,7 @@ Public Const redactionExtensionName As String = "cleanAndValidate" -Public Const redactionExtensionVersion = "0.9.5" +Public Const redactionExtensionVersion = "0.9.8" Function initRedactionConfiguration() On Error Goto exceptionHandler Dim regFactory As Object diff --git a/build.gradle b/build.gradle index 50a6b65..e2a615e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -def releaseVersion = "0.9.6" +def releaseVersion = "0.9.8" task oxt(type: Zip) { dependsOn = [ 'setVersion','setVersionInBasicCode' ] from './' diff --git a/description.xml b/description.xml index 634911b..2e693ca 100644 --- a/description.xml +++ b/description.xml @@ -1,7 +1,7 @@ - + Cleaning and validation documents for publishing in html and epub with pagination