Added timestamp

This commit is contained in:
Georgy Litvinov 2020-07-01 18:41:01 +02:00
parent adefad19df
commit 665895dd9c
4 changed files with 25 additions and 7 deletions

View file

@ -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 mark56 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Clean" script:language="StarBasic">Sub mark57
End Sub End Sub
@ -172,6 +172,7 @@ Private Sub quietCleaning
statusIndicator.Start(getTranslation(&quot;statusLoadingStylesFromTemplate&quot;),100) statusIndicator.Start(getTranslation(&quot;statusLoadingStylesFromTemplate&quot;),100)
loadArticleStyles loadArticleStyles
removeLibs removeLibs
addTimeStampToProperties
statusIndicator.end() statusIndicator.end()
saveAndreload() saveAndreload()
MsgBox getTranslation(&quot;cleaningFinished&quot;) MsgBox getTranslation(&quot;cleaningFinished&quot;)
@ -1740,5 +1741,18 @@ sub saveAsDocAndBackToODT
If FileExists(tmpName) Then If FileExists(tmpName) Then
Kill(tmpName) Kill(tmpName)
End If End If
end sub end Sub
Sub addTimeStampToProperties
Dim docProps As Object
Dim userProps As Object
Dim curTime As String
On Error Goto exceptionHandlerProps
curTime = Now()
docProps = ThisComponent.getDocumentProperties()
userProps = docProps.UserDefinedProperties()
userProps.addProperty(curTime ,128,&quot;Cleaned &quot; &amp; redactionExtensionVersion)
exceptionHandlerProps:
Resume Next
End Sub
</script:module> </script:module>

View file

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

View file

@ -1,6 +1,6 @@
def releaseVersion = "0.7.14" def releaseVersion = "0.7.15"
task oxt(type: Zip) { task oxt(type: Zip) {
dependsOn = [ 'setVersion' ] dependsOn = [ 'setVersion','setVersionInBasicCode' ]
from './' from './'
include '*' include '*'
include '*/*' include '*/*'
@ -21,4 +21,8 @@ task setVersion(){
replace(path: "//*[local-name()='version']/@value", withText: "${releaseVersion}") replace(path: "//*[local-name()='version']/@value", withText: "${releaseVersion}")
} }
} }
task setVersionInBasicCode {
ant.replaceregexp(match:'redactionExtensionVersion = &quot;.*&quot;', replace:"redactionExtensionVersion = &quot;${releaseVersion}&quot;", flags:'g', byline:true) {
fileset(dir: 'Redaction', includes: 'Configuration.xba')
}
}

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?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"> <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"/> <identifier value="pro.litvinovg.Redaction"/>
<version value="0.7.14"/> <version value="0.7.15"/>
<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>