fix: convert mm to long
This commit is contained in:
parent
1f4f9d757d
commit
6843f73923
2 changed files with 6 additions and 5 deletions
|
@ -1,6 +1,7 @@
|
|||
<?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="PageStyles" script:language="StarBasic" script:moduleType="normal"> Dim pDialog As Object
|
||||
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="PageStyles" script:language="StarBasic" script:moduleType="normal">
|
||||
Dim pDialog As Object
|
||||
Sub pageStylesDialog
|
||||
|
||||
Dim listBox As Object
|
||||
|
@ -356,8 +357,8 @@ Function covertMMtoLong(dimension As String) As Long
|
|||
convertMMtoLong = -1
|
||||
Exit Function
|
||||
EndIf
|
||||
dimension = customReplace(dimension, ",", ".")
|
||||
If Not IsNumeric(dimension) Then
|
||||
dimension = customReplace(dimension, ".", ",")
|
||||
If Not IsNumeric( dimension ) Then
|
||||
convertMMtoLong = -1
|
||||
Exit Function
|
||||
EndIf
|
||||
|
@ -377,4 +378,4 @@ Function customReplace(Source As String, Search As String, NewPart As String) As
|
|||
customReplace = Result
|
||||
End Function
|
||||
|
||||
</script:module>
|
||||
</script:module>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue