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

View file

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