Push new version

This commit is contained in:
Georgy Litvinov 2021-10-25 21:08:07 +02:00
parent 6100d5d40e
commit 907c483775
3 changed files with 26 additions and 42 deletions

View file

@ -1,7 +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="Validation" script:language="StarBasic">Sub markval30
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Validation" script:language="StarBasic">Sub markval31
End Sub
@ -770,11 +769,9 @@ Sub fontReportButton
Exit sub
EndIf
Dim FileName As String
FileName = getCharsInFont(targetFontName)
getCharsInFont(targetFontName)
statusIndicator.end()
If FileName &lt;&gt; &quot;&quot; Then
openReport(FileName)
EndIf
End Sub
Sub onSelectFont(oEvent)
@ -914,7 +911,7 @@ Sub addToArray(xArray(),vNextElement)
xArray(iUB) = vNextElement
End Sub
Function getCharsInFont(fontName As String) As String
Sub getCharsInFont(fontName As String)
Dim resultArray() As String
Dim pageNums() As Long
Dim firstPages() As Long
@ -1000,43 +997,30 @@ Function getCharsInFont(fontName As String) As String
EndIf
Next j
Next i
resultString = &quot;&quot;
For i = LBound(resultArray) To UBound(resultArray)
resultString = resultString &amp; &quot;&lt;a href=&apos;https://unicode-table.com/ru/&quot; &amp; resultArray(i) &amp; &quot;&apos;&quot; &amp; &quot;&gt;https://unicode-table.com/ru/&quot; &amp; resultArray(i) &amp; &quot;&lt;/a&gt; &quot; &amp; getTranslation(&quot;charFirstPage&quot;) &amp; &quot; &quot; &amp; pageNums(i) &amp; &quot;&lt;br&gt;&quot; &amp; Chr(10)
Next i
If resultString &lt;&gt; &quot;&quot; Then
&apos;MsgBox &quot;Символы в шрифте &quot;&amp; fontName &amp;Chr(10)&amp;resultString
Dim FileName As String &apos;Holds the file name
Dim n As Integer &apos;Holds the file number
Dim f As Integer &apos;Index variable
Dim s As String &apos;Temporary string for input
Dim fileaccess As Object
Dim outtextstream As Object
Dim out As Object
Dim sTemp$
GlobalScope.BasicLibraries.loadLibrary(&quot;Tools&quot;)
path=DirectoryNameoutofPath(ThisComponent.getURL(),&quot;/&quot;)
FileName = path &amp; &quot;/symbolsInFont&quot; &amp; fontName &amp; &quot;.html&quot;
&apos;n = FreeFile() &apos;Next free file number
&apos;Open FileName For Output Access Read Write As #n &apos;Open for read/write
fileaccess = createUnoService (&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
outtextstream = createUnoService (&quot;com.sun.star.io.TextOutputStream&quot;)
outtextstream.setEncoding( &quot;UTF-8&quot; )
out = fileaccess.openFileWrite( FileName )
outtextstream.setOutputStream( out )
outtextstream.writeString( &quot;&lt;html&gt;&lt;head&gt;&lt;title&gt;&quot; &amp; getTranslation(&quot;symbolsInFontHeading&quot;) &amp; &quot; &quot;&amp; fontName &amp; &quot;&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;h2&gt;&quot; &amp; getTranslation(&quot;symbolsInFontHeading&quot;) &amp; &quot; &quot;&amp; fontName &amp;&quot;:&lt;/h2&gt;&quot;&amp;resultString &amp;&quot;&lt;/body&gt;&lt;/html&gt;&quot; )
outtextstream.closeOutput()
getCharsInFont = FileName
Exit Function
Dim newDocCursor As Object
Dim newDoc As Object
newDoc = starDesktop.loadComponentFromURL(&quot;private:factory/swriter&quot;, &quot;_blank&quot;, 0, Array())
newDocCursor = newDoc.getCurrentController().getViewCursor()
newDocCursor.String = getTranslation(&quot;symbolsInFontHeading&quot;) &amp; &quot; &quot; &amp; fontName
newDocCursor.ParaStyleName = &quot;Heading 1&quot;
newDocCursor.collapseToEnd()
newDocCursor.Text.insertControlCharacter(newDocCursor.End,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
For i = LBound(resultArray) To UBound(resultArray)
newDocCursor.ParaStyleName = &quot;Text body&quot;
newDocCursor.String = &quot;https://unicode-table.com/ru/&quot; &amp; resultArray(i)
newDocCursor.HyperLinkURL = &quot;https://unicode-table.com/ru/&quot; &amp; resultArray(i)
newDocCursor.collapseToEnd()
newDocCursor.String = &quot; &quot; &amp; getTranslation(&quot;charFirstPage&quot;) &amp; &quot; &quot; &amp; pageNums(i)
newDocCursor.collapseToEnd()
newDocCursor.Text.insertControlCharacter(newDocCursor.End,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
Next i
Exit Sub
Else
MsgBox getTranslation(&quot;symbolsInFontNotFound1&quot;) &amp; &quot; &quot; &amp; fontName &amp; &quot; &quot; &amp; getTranslation(&quot;symbolsInFontNotFound2&quot;)
getCharsInFont = &quot;&quot;
Exit Function
EndIf
End Function
End Sub
Function findBadCharacters() As Boolean

View file

@ -2,9 +2,9 @@
<description xmlns="http://openoffice.org/extensions/update/2006"
xmlns:xlink="http://www.w3.org/1999/xlink">
<identifier value="pro.litvinovg.Redaction"/>
<version value="0.10.6" />
<version value="0.10.7" />
<update-download>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/uploads/2b71def6e0a91a02dbee2b8c73fda880/cleanAndValidate.oxt" />
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/uploads/0545689ae686a087e51c90d0d0d15043/cleanAndValidate.oxt" />
</update-download>
<release-notes>
<src xlink:href="https://dev.litvinovg.pro/litvinovg/cleanandvalidate/-/raw/master/releasenotes.txt" lang="en" />

View file

@ -1 +1 @@
version=0.10.6
version=0.10.7