diff options
Diffstat (limited to 'extensions/test')
-rw-r--r-- | extensions/test/ole/JScriptNewStyle.htm | 43 | ||||
-rw-r--r-- | extensions/test/ole/OleTest.htm | 31 |
2 files changed, 60 insertions, 14 deletions
diff --git a/extensions/test/ole/JScriptNewStyle.htm b/extensions/test/ole/JScriptNewStyle.htm index d2b061d7513e..016119d1908b 100644 --- a/extensions/test/ole/JScriptNewStyle.htm +++ b/extensions/test/ole/JScriptNewStyle.htm @@ -665,12 +665,14 @@ sub callBasic(id) Next Next - + + set outValue= factory.Bridge_GetValueObject() + outValue.InitOutParam + set value= factory.Bridge_GetValueObject() select case id - case 0 - document.writeln "param: " - printArray arrInt - ret= oletest.methodByte(arrInt) + case 0 + value.Set "[]byte", arrInt + ret= oletest.methodByte(value) document.writeln "<br> return value: " printArray ret case 1 @@ -865,6 +867,12 @@ sub callBasic(id) next next +// out params + case 300 + oletest.testout_methodByte( outValue ) + alert("byte: " & outValue.Get() ) + + end select end sub sub printArray( arr) @@ -918,7 +926,7 @@ All methods receive a Sequence as Parameter. The element type of the Sequence is <button onclick='callOleTest( 13)'>XInterface</Button> <p> -<p> + Out Parameter <br> <button onclick='callOleTest( 2000)'>byte </Button> <button onclick='callOleTest( 2001)'>double</Button> @@ -987,14 +995,16 @@ Test of Any parameter in a property. Any contains:<br> <button onclick='callOleTest( 1014)'>object</Button> <p> <p> - +--> <h2> Visual Basic Tests </h2> Test array /Sequence conversion and return value<br> -Template: <b> Sequence < type > method( Sequence< type > ) </b> <br> -<!--<font color= red>Multi dimensional arrays are not processed by VBSript</font> <br> --> -<!-- +Template: <b> Sequence < type > method( Sequence< type > ) </b> +<p> + + <button onclick='callBasic(0)'>byte</button> +<!-- <button onclick='callBasic(1)'>double</button> <button onclick='callBasic(2)'>boolean</button> <button onclick='callBasic(3)'>short</button> @@ -1004,12 +1014,15 @@ Template: <b> Sequence < type > method( Sequence< type > ) </b> <br> <button onclick='callBasic(7)'>string</button> <button onclick='callBasic(8)'>char</button> <button onclick='callBasic(9)'>any</button> <br> -<button onclick='callBasic(10)'>Seq < int ></button> <br> +<button onclick='callBasic(10)'>Seq < int ></button> +--> +<p> Out parameter <br> Template: <b> void method( Sequence < type > ) </b> <br> -<button onclick='callBasic(100)'>byte</button> +<button onclick='callBasic(300)'>byte</button> +<!-- <button onclick='callBasic(101)'>double</button> <button onclick='callBasic(102)'>boolean</button> <button onclick='callBasic(103)'>short</button> @@ -1019,7 +1032,9 @@ Template: <b> void method( Sequence < type > ) </b> <br> <button onclick='callBasic(107)'>string</button> <button onclick='callBasic(108)'>char</button> <button onclick='callBasic(109)'>any</button> <br> - +--> +<p> +<!-- Tests Array/Sequence conversion with <b>Attributes</b>. All params are of type Sequence and the element type of the Sequence is written on the buttons. <br> <button onclick='callBasic( 200)'>byte </Button> @@ -1033,7 +1048,7 @@ Tests Array/Sequence conversion with <b>Attributes</b>. All params are of type S <button onclick='callBasic( 208)'>char</Button> <button onclick='callBasic( 209)'>any</Button> <button onclick='callBasic( 210)'>sequence<long> </Button> - --> + diff --git a/extensions/test/ole/OleTest.htm b/extensions/test/ole/OleTest.htm index 828ef957ed87..343d1b7c9c20 100644 --- a/extensions/test/ole/OleTest.htm +++ b/extensions/test/ole/OleTest.htm @@ -767,8 +767,34 @@ sub callBasic(id) call oletest.testinout_methodByte( aByte) MsgBox aByte + + case 400 + + set struct= oletest.Bridge_GetStruct("com.sun.star.beans.Property") + struct.Attributes= 1 + struct.Handle= 2 + struct.Name= "some Property" + oletest.methodStruct struct + + case 401 + set struct= oletest.retMethodStruct() + alert( "Property::Attributes : " & struct.Attributes & vblf & " Property::Handle : " _ + & struct.Handle & vblf & " Property::Name : " & struct.Name) + + case 402 + set struct= oletest.Bridge_GetStruct("com.sun.star.beans.Property") + struct.Attributes= 1 + struct.Handle= 2 + struct.Name= "some Property" + oletest.AttrStruct= struct + + set struct2= oletest.AttrStruct + alert( "property get: " & vblf & "Property::Attributes : " & struct2.Attributes & _ + vblf & " Property::Handle : " & struct2.Handle & vblf & " Property::Name : " _ + & struct2.Name) end select end sub + sub printArray( arr) document.write "array: " For Each val In arr @@ -964,6 +990,11 @@ Tests Array/Sequence conversion with <b>Attributes</b>. All params are of type S In Out parameter <br> <button onclick='callBasic( 300)'>byte</Button> +<p> +Structs <br> +<button onclick='callBasic(400)'>methodStruct</button> +<button onclick='callBasic(401)'>return Struct</button> +<button onclick='callBasic(402)'>struct attribute</button> |