diff --git a/Redaction/Configuration.xba b/Redaction/Configuration.xba index 86f3393..07258ef 100644 --- a/Redaction/Configuration.xba +++ b/Redaction/Configuration.xba @@ -1,7 +1,7 @@ Public Const redactionExtensionName As String = "cleanAndValidate" -Public Const redactionExtensionVersion = "0.9.9" +Public Const redactionExtensionVersion = "0.9.10" Function initRedactionConfiguration() On Error Goto exceptionHandler Dim regFactory As Object diff --git a/Redaction/Validation.xba b/Redaction/Validation.xba index dd05772..ee5219f 100644 --- a/Redaction/Validation.xba +++ b/Redaction/Validation.xba @@ -1,6 +1,6 @@ -Sub markval15 +Sub markval16 End Sub @@ -807,14 +807,23 @@ Function getCharsInFont(fontName As String) As String Dim n As Integer 'Holds the file number Dim f As Integer 'Index variable Dim s As String 'Temporary string for input + Dim fileaccess As Object + Dim outtextstream As Object + Dim out As Object + Dim sTemp$ GlobalScope.BasicLibraries.loadLibrary("Tools") path=DirectoryNameoutofPath(ThisComponent.getURL(),"/") FileName = path & "/symbolsInFont" & fontName & ".html" - n = FreeFile() 'Next free file number - Open FileName For Output Access Read Write As #n 'Open for read/write - Print #n, "<html><head><title>" & getTranslation("symbolsInFontHeading") & " "& fontName & "</title></head><body><h2>" & getTranslation("symbolsInFontHeading") & " "& fontName &":</h2>"&resultString &"</body></html>" - Close #n + 'n = FreeFile() 'Next free file number + 'Open FileName For Output Access Read Write As #n 'Open for read/write + fileaccess = createUnoService ("com.sun.star.ucb.SimpleFileAccess") + outtextstream = createUnoService ("com.sun.star.io.TextOutputStream") + outtextstream.setEncoding( "UTF-8" ) + out = fileaccess.openFileWrite( FileName ) + outtextstream.setOutputStream( out ) + outtextstream.writeString( "<html><head><title>" & getTranslation("symbolsInFontHeading") & " "& fontName & "</title></head><body><h2>" & getTranslation("symbolsInFontHeading") & " "& fontName &":</h2>"&resultString &"</body></html>" ) + outtextstream.closeOutput() getCharsInFont = FileName Exit Function diff --git a/build.gradle b/build.gradle index a45ebf6..3b13339 100644 --- a/build.gradle +++ b/build.gradle @@ -1,4 +1,4 @@ -def releaseVersion = "0.9.9" +def releaseVersion = "0.9.10" task oxt(type: Zip) { dependsOn = [ 'setVersion','setVersionInBasicCode' ] from './' diff --git a/description.xml b/description.xml index d842eea..23ae325 100644 --- a/description.xml +++ b/description.xml @@ -1,7 +1,7 @@ - + Cleaning and validation documents for publishing in html and epub with pagination