Use IsNumeric instead of IsDigit

This commit is contained in:
Georgy Litvinov 2021-05-19 20:19:47 +02:00
parent 995d7801a5
commit 4d687b4923

View file

@ -1,6 +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="Footnotes" script:language="StarBasic" script:moduleType="normal">sub footMark3 <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Footnotes" script:language="StarBasic" script:moduleType="normal">sub footMark4
End Sub End Sub
Sub openFootNotesDialog Sub openFootNotesDialog
@ -297,7 +297,7 @@ Sub processNumRange(range As String, pageNums() As Integer)
If UBound(rangeParts) = 1 Then If UBound(rangeParts) = 1 Then
firstValue = trim(rangeParts(0)) firstValue = trim(rangeParts(0))
secondValue = trim(rangeParts(1)) secondValue = trim(rangeParts(1))
If ( IsDigit(firstValue) And IsDigit(secondValue)) Then If ( IsNumeric(firstValue) And IsNumeric(secondValue)) Then
firstNum = CInt(firstValue) firstNum = CInt(firstValue)
secondNum = CInt(secondValue) secondNum = CInt(secondValue)
If firstNum &lt;= secondNum Then If firstNum &lt;= secondNum Then
@ -311,7 +311,7 @@ Sub processNumRange(range As String, pageNums() As Integer)
EndIf EndIf
If UBound(rangeParts) = 0 Then If UBound(rangeParts) = 0 Then
firstValue = trim(rangeParts(0)) firstValue = trim(rangeParts(0))
If IsDigit(firstValue) Then If IsNumeric(firstValue) Then
firstNum = CInt(firstValue) firstNum = CInt(firstValue)
If (NOT IsInArray(pageNums, firstNum)) Then If (NOT IsInArray(pageNums, firstNum)) Then
addToArray(pageNums, firstNum) addToArray(pageNums, firstNum)