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"?>
<!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
Sub openFootNotesDialog
@ -293,11 +293,11 @@ Sub processNumRange(range As String, pageNums() As Integer)
Dim firstNum As Integer
Dim secondNum As Integer
rangeParts = split( range, &quot;-&quot;)
If UBound(rangeParts) = 1 Then
firstValue = trim(rangeParts(0))
secondValue = trim(rangeParts(1))
If ( IsDigit(firstValue) And IsDigit(secondValue)) Then
If ( IsNumeric(firstValue) And IsNumeric(secondValue)) Then
firstNum = CInt(firstValue)
secondNum = CInt(secondValue)
If firstNum &lt;= secondNum Then
@ -311,7 +311,7 @@ Sub processNumRange(range As String, pageNums() As Integer)
EndIf
If UBound(rangeParts) = 0 Then
firstValue = trim(rangeParts(0))
If IsDigit(firstValue) Then
If IsNumeric(firstValue) Then
firstNum = CInt(firstValue)
If (NOT IsInArray(pageNums, firstNum)) Then
addToArray(pageNums, firstNum)