Updated the XBA file of the previous 2 commits.
This commit is contained in:
parent
b8570253de
commit
c503a08cb8
@ -47,11 +47,48 @@ Sub subReadDataSheets
|
||||
sOutput = sOutput & Chr (10) & Chr (10) & fnReadBaseStatsSheet
|
||||
sOutput = sOutput & Chr (10) & Chr (10) & fnReadCPMSheet
|
||||
sOutput = sOutput & Chr (10) & Chr (10) & fnReadStardustSheet
|
||||
subShowBasicData (sOutput)
|
||||
subShowText (sOutput)
|
||||
End Sub
|
||||
|
||||
' subShowBasicData: Shows the data table as Basic arrays
|
||||
Sub subShowBasicData (sContent As String)
|
||||
' subShowChinesePokemonNames: Shows the Chinese names of Pokémons as
|
||||
' resource properties.
|
||||
Sub subShowChinesePokemonNames
|
||||
Dim oSheet As Object, oRange As Object
|
||||
Dim mData As Variant, nI As Integer
|
||||
Dim sNo As String, sName As String, sNewName As String
|
||||
Dim nJ As Integer, sChar As String, nCharCode As Long
|
||||
Dim sResult As String
|
||||
|
||||
oSheet = ThisComponent.getSheets.getByName ("basestat")
|
||||
oRange = oSheet.getCellRangeByName ("BaseStats")
|
||||
mData = oRange.getDataArray
|
||||
sResult = ""
|
||||
For nI = 1 To UBound (mData)
|
||||
sNo = mData (nI) (1)
|
||||
sName = mData (nI) (2)
|
||||
If sName = "" Then
|
||||
sName = mData (nI) (0)
|
||||
Else
|
||||
sNewName = ""
|
||||
For nJ = 1 To Len (sName)
|
||||
sChar = Mid (sName, nJ, 1)
|
||||
nCharCode = Asc (sChar)
|
||||
If nCharCode > 255 Then
|
||||
sNewName = sNewName & "\u" & LCase (Hex (nCharCode))
|
||||
Else
|
||||
sNewName = sNewName & sChar
|
||||
End If
|
||||
Next nJ
|
||||
sName = sNewName
|
||||
End If
|
||||
sResult = sResult & "1" & sNo & ".lstPokemon.StringItemList=" _
|
||||
& sName & Chr (10)
|
||||
Next nI
|
||||
subShowText (sResult)
|
||||
End Sub
|
||||
|
||||
' subShowText: Shows the text in a text box for copy and paste.
|
||||
Sub subShowText (sContent As String)
|
||||
Dim oDialog As Object, oDialogModel As Object
|
||||
Dim oEditModel As Object, oButtonModel As Object
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user