Push new version
This commit is contained in:
parent
6100d5d40e
commit
907c483775
3 changed files with 26 additions and 42 deletions
|
@ -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 <> "" 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 = ""
|
|
||||||
For i = LBound(resultArray) To UBound(resultArray)
|
|
||||||
resultString = resultString & "<a href='https://unicode-table.com/ru/" & resultArray(i) & "'" & ">https://unicode-table.com/ru/" & resultArray(i) & "</a> " & getTranslation("charFirstPage") & " " & pageNums(i) & "<br>" & Chr(10)
|
|
||||||
Next i
|
|
||||||
|
|
||||||
If resultString <> "" Then
|
If resultString <> "" Then
|
||||||
'MsgBox "Символы в шрифте "& fontName &Chr(10)&resultString
|
Dim newDocCursor As Object
|
||||||
Dim FileName As String 'Holds the file name
|
Dim newDoc As Object
|
||||||
Dim n As Integer 'Holds the file number
|
newDoc = starDesktop.loadComponentFromURL("private:factory/swriter", "_blank", 0, Array())
|
||||||
Dim f As Integer 'Index variable
|
newDocCursor = newDoc.getCurrentController().getViewCursor()
|
||||||
Dim s As String 'Temporary string for input
|
newDocCursor.String = getTranslation("symbolsInFontHeading") & " " & fontName
|
||||||
Dim fileaccess As Object
|
newDocCursor.ParaStyleName = "Heading 1"
|
||||||
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 = "Text body"
|
||||||
GlobalScope.BasicLibraries.loadLibrary("Tools")
|
newDocCursor.String = "https://unicode-table.com/ru/" & resultArray(i)
|
||||||
path=DirectoryNameoutofPath(ThisComponent.getURL(),"/")
|
newDocCursor.HyperLinkURL = "https://unicode-table.com/ru/" & resultArray(i)
|
||||||
FileName = path & "/symbolsInFont" & fontName & ".html"
|
newDocCursor.collapseToEnd()
|
||||||
'n = FreeFile() 'Next free file number
|
newDocCursor.String = " " & getTranslation("charFirstPage") & " " & pageNums(i)
|
||||||
'Open FileName For Output Access Read Write As #n 'Open for read/write
|
newDocCursor.collapseToEnd()
|
||||||
fileaccess = createUnoService ("com.sun.star.ucb.SimpleFileAccess")
|
newDocCursor.Text.insertControlCharacter(newDocCursor.End,com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK,False)
|
||||||
outtextstream = createUnoService ("com.sun.star.io.TextOutputStream")
|
Next i
|
||||||
outtextstream.setEncoding( "UTF-8" )
|
Exit Sub
|
||||||
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
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
MsgBox getTranslation("symbolsInFontNotFound1") & " " & fontName & " " & getTranslation("symbolsInFontNotFound2")
|
MsgBox getTranslation("symbolsInFontNotFound1") & " " & fontName & " " & getTranslation("symbolsInFontNotFound2")
|
||||||
getCharsInFont = ""
|
|
||||||
Exit Function
|
|
||||||
EndIf
|
EndIf
|
||||||
End Function
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Function findBadCharacters() As Boolean
|
Function findBadCharacters() As Boolean
|
||||||
|
|
|
@ -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" />
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
version=0.10.6
|
version=0.10.7
|
||||||
|
|
Loading…
Add table
Reference in a new issue