diff options
Diffstat (limited to 'extensions/test/ole/StarBasic_OleClient/oleclient.bas')
-rw-r--r-- | extensions/test/ole/StarBasic_OleClient/oleclient.bas | 55 |
1 files changed, 34 insertions, 21 deletions
diff --git a/extensions/test/ole/StarBasic_OleClient/oleclient.bas b/extensions/test/ole/StarBasic_OleClient/oleclient.bas index 7ba324660dfe..23a8929c81a4 100644 --- a/extensions/test/ole/StarBasic_OleClient/oleclient.bas +++ b/extensions/test/ole/StarBasic_OleClient/oleclient.bas @@ -1,26 +1,41 @@ -REM ***** BASIC ***** - +rem +rem This file is part of the LibreOffice project. +rem +rem This Source Code Form is subject to the terms of the Mozilla Public +rem License, v. 2.0. If a copy of the MPL was not distributed with this +rem file, You can obtain one at http://mozilla.org/MPL/2.0/. +rem +rem This file incorporates work covered by the following license notice: +rem +rem Licensed to the Apache Software Foundation (ASF) under one or more +rem contributor license agreements. See the NOTICE file distributed +rem with this work for additional information regarding copyright +rem ownership. The ASF licenses this file to you under the Apache +rem License, Version 2.0 (the "License"); you may not use this file +rem except in compliance with the License. You may obtain a copy of +rem the License at http://www.apache.org/licenses/LICENSE-2.0 . +rem OPTION EXPLICIT OPTION COMPATIBLE Sub Main -COMPATIBILITYMODE(true) +COMPATIBILITYMODE(true) If runtest = -1 Then MsgBox "Test Failed!!!" -Else +Else MsgBox "Test Succeeded" End If End Sub Function runtest() As Integer -Dim inBool As Boolean, inBool2 As Boolean, outBool As Boolean +Dim inBool As Boolean, inBool2 As Boolean, outBool As Boolean Dim inByte As Integer, inByte2 As Integer Dim inShort As Integer, inShort2 As Integer Dim inLong As Long, inLong2 As Long, inLong3 As Long, inLong4 As Long -Dim inString As String, inString2 As String +Dim inString As String, inString2 As String Dim inFloat As Single, inFloat2 As Single Dim inDouble As Double, inDouble2 As Double Dim inVariant, inVariant2 @@ -123,7 +138,7 @@ If inBool <> outBool Or inByte <> outByte Or inShort <> outShort Or inLong <> ou inVariant <> outVariant Or NOT equalUnoObjects(obj, outObject) Or NOT _ equalArrays(arString(), outArray()) Or inDate <> outDate Or inCurrency <> outCurrency Or _ inSCode.Value <> outSCode.Value Or Not equalUnoObjects(objFoo, outUnknown) Or _ - inDecimal <> outDecimal Then + inDecimal <> outDecimal Then runtest = -1 exit Function End If @@ -219,7 +234,7 @@ End If 'properties ------------------------------------------------------------------------- inBool = false -outBool = true +outBool = true obj.prpBool = inBool outBool = obj.prpBool inByte = 11 @@ -287,7 +302,7 @@ If inBool <> outBool Or inByte <> outByte Or inShort <> outShort Or inLong <> ou inDecimal <> outDecimal Then runtest = -1 Exit Function -End If +End If ' ref parameter ------------------------------------------------------------------------ obj.inLong(0) @@ -303,7 +318,7 @@ obj.inrefVariant(inVariant) obj.outVariant(outVariant) If inLong <> outLong Or inVariant <> outVariant Then runtest = -1 - Exit Function + Exit Function End If outLong = 0 @@ -314,7 +329,7 @@ obj.prprefVariant = inVariant outVariant = obj.prprefVariant If inLong <> outLong Or inVariant <> outVariant Then runtest = -1 - Exit Function + Exit Function End If @@ -443,8 +458,8 @@ If inLong2 <> outLong Then End If 'named arguments------------------------------------------------------------------------- -'all args As named args, different order -obj.optional6(0, 0, 0, 0) +'all args As named args, different order +obj.optional6(0, 0, 0, 0) inLong = 1 inLong2 = 2 inLong3 = 3 @@ -461,22 +476,22 @@ If inLong <> outLong Or inLong2 <> outLong2 _ Or inLong3 <> outLong3 Or inLong4 <> outLong4 Then runtest = -1 Exit Function -End If +End If 'mixed positional and named args with omitted args Dim scode_paramNotFound As New com.sun.star.bridge.oleautomation.SCode scode_paramNotFound.Value = &h80020004 obj.optional6(0, 0, 0, 0) -'val1 and val3 will be DISP_E_PARAMNOTFOUND +'val1 and val3 will be DISP_E_PARAMNOTFOUND obj.optional6(, inLong2, val4:=inLong4) -Dim outSCode1, outSCode2 +Dim outSCode1, outSCode2 obj.optional7(outSCode, outLong2, outSCode2, outLong4) If outSCode.Value <> scode_paramNotFound.Value Or inLong2 <> outLong2 _ Or outSCode2.Value <> scode_paramNotFound.Value Or inLong4 <> outLong4 Then runtest = -1 Exit Function -End If +End If 'mixed positional and named args with ommitted args as out -args inLong = 1 @@ -579,7 +594,7 @@ If Not IsNull(oExplorer) Then oExplorer.visible = true oExplorer.Navigate2("http://www.openoffice.org") Else - MsgBox("Could not perform test with Internet Explorer!") + MsgBox("Could not perform test with Internet Explorer!") End If @@ -602,8 +617,6 @@ FOr counter = 0 To len1 - 1 equalArrays = false Exit Function End If -Next +Next equalArrays = true End Function - - |