Added more info about cleaning environment

This commit is contained in:
Georgy Litvinov 2020-11-07 21:20:08 +01:00
parent 876008a5c5
commit 90352a2110
4 changed files with 22 additions and 6 deletions

View file

@ -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(&quot;ooSetupVersion&quot;)
End Function
Function getFullVersion As String
GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
Dim oProduct As Object
oProduct=GetRegistryKeyContent(&quot;org.openoffice.Setup/Product&quot;)
getFullVersion=oProduct.getByName(&quot;ooSetupVersionAboutBox&quot;)
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,&quot;Cleaned &quot; &amp; redactionExtensionVersion)
userProps.addProperty(curTime ,128,&quot;Cleaned by &quot; &amp; getUserName() &amp; &quot; with &quot; &amp; redactionExtensionVersion &amp; &quot; LO&quot; &amp; 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( &quot;com.sun.star.configuration.ConfigurationProvider&quot; )
aProps(0).Name = &quot;nodepath&quot;
aProps(0).Value = &quot;/org.openoffice.UserProfile/Data&quot;
oCUA = oCP.createInstanceWithArguments( &quot;com.sun.star.configuration.ConfigurationUpdateAccess&quot;, aProps )
getUserName = &quot; &quot; &amp; oCUA.getByName(&quot;givenname&quot;) &amp; &quot; &quot; &amp; oCUA.getByName(&quot;sn&quot;)
End Function
sub saveCleanedVersion(comment)
dim document as object

View file

@ -1,7 +1,7 @@
<?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="Configuration" script:language="StarBasic" script:moduleType="normal">Public Const redactionExtensionName As String = &quot;cleanAndValidate&quot;
Public Const redactionExtensionVersion = &quot;0.9.5&quot;
Public Const redactionExtensionVersion = &quot;0.9.8&quot;
Function initRedactionConfiguration()
On Error Goto exceptionHandler
Dim regFactory As Object

View file

@ -1,4 +1,4 @@
def releaseVersion = "0.9.6"
def releaseVersion = "0.9.8"
task oxt(type: Zip) {
dependsOn = [ 'setVersion','setVersionInBasicCode' ]
from './'

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<description xmlns="http://openoffice.org/extensions/description/2006" xmlns:dep="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.Redaction"/>
<version value="0.9.5"/>
<version value="0.9.8"/>
<platform value="all"/>
<display-name>
<name lang="en">Cleaning and validation documents for publishing in html and epub with pagination</name>