| 1 |
<!-- |
| 2 |
* This file is part of the LibreOffice project. |
| 3 |
* |
| 4 |
* This Source Code Form is subject to the terms of the Mozilla Public |
| 5 |
* License, v. 2.0. If a copy of the MPL was not distributed with this |
| 6 |
* file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 7 |
* |
| 8 |
* This file incorporates work covered by the following license notice: |
| 9 |
* |
| 10 |
* Licensed to the Apache Software Foundation (ASF) under one or more |
| 11 |
* contributor license agreements. See the NOTICE file distributed |
| 12 |
* with this work for additional information regarding copyright |
| 13 |
* ownership. The ASF licenses this file to you under the Apache |
| 14 |
* License, Version 2.0 (the "License"); you may not use this file |
| 15 |
* except in compliance with the License. You may obtain a copy of |
| 16 |
* the License at http://www.apache.org/licenses/LICENSE-2.0 . |
| 17 |
--> |
| 18 |
<HTML> |
| 19 |
<HEAD> |
| 20 |
<META NAME="GENERATOR" Content="Microsoft Developer Studio"> |
| 21 |
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1"> |
| 22 |
<TITLE>Document Title</TITLE> |
| 23 |
</HEAD> |
| 24 |
<BODY id=theBody> |
| 25 |
|
| 26 |
<script language="JScript"> |
| 27 |
function callOleTest( id) |
| 28 |
{ |
| 29 |
var factory= new ActiveXObject("com.sun.star.ServiceManager"); |
| 30 |
var oletest= factory.createInstance("oletest.OleTest"); |
| 31 |
// alert(oletest); |
| 32 |
|
| 33 |
var arr= new Array( 1, 2, 3, 4, 0); |
| 34 |
var arrDouble= new Array( 1.2345, 12.345, 123,45, 1234.5, 12345); |
| 35 |
var arrBool= new Array( 1, 0, 2, 0, 3); |
| 36 |
var arrChar= new Array( '1', 'A', "1", "A", ' ', 55, 56); |
| 37 |
var arrString= new Array("hamburger","cheeseburger", "chicken nuggets", "chicken wings" , "pizza"); |
| 38 |
var arrAny= new Array( 100, 100.1235,"hallo"); |
| 39 |
var arrSeq= new Array( arr, arr, arr); |
| 40 |
var arrSeq2= new Array( arrSeq, arrSeq, arrSeq) |
| 41 |
|
| 42 |
// var ob= new Object(); |
| 43 |
// ob.value= "A JScript object"; |
| 44 |
// var arrObject= new Array( ob, ob, ob); |
| 45 |
|
| 46 |
|
| 47 |
var arrout1= new Array(); |
| 48 |
var arrout2= new Array(); |
| 49 |
var arrout3= new Array(); |
| 50 |
|
| 51 |
var ret, i; |
| 52 |
var sfarray, sfarray1, sfarray2, sfarray3; |
| 53 |
var value= oletest._GetValueObject(); |
| 54 |
var outValue= oletest._GetValueObject(); |
| 55 |
outValue.InitOutParam(); |
| 56 |
var outValue2= oletest._GetValueObject(); |
| 57 |
outValue2.InitOutParam(); |
| 58 |
var outValue3= oletest._GetValueObject(); |
| 59 |
outValue3.InitOutParam(); |
| 60 |
|
| 61 |
var inoutValue= oletest._GetValueObject(); |
| 62 |
// inoutValue.InitInOutParam(); |
| 63 |
|
| 64 |
switch( id) |
| 65 |
{ |
| 66 |
// Array in-params |
| 67 |
case 1: |
| 68 |
value.Set("[]byte", arr) |
| 69 |
ret= oletest.methodByte( value); |
| 70 |
sfarray= new VBArray( ret); |
| 71 |
document.writeln( "Param: " + arr.toString() + "<br>"); |
| 72 |
document.writeln( "Returns a Sequence< BYTE > <br>" + sfarray.toArray()) ; break; |
| 73 |
|
| 74 |
case 2: |
| 75 |
value.Set("[]double", arrDouble) |
| 76 |
ret= oletest.methodDouble( value); |
| 77 |
sfarray= new VBArray( ret); |
| 78 |
document.writeln( "Param: " + arrDouble.toString() +"<br>"); |
| 79 |
document.writeln( "Returns a Sequence< double > <br>" + sfarray.toArray()) ; break; |
| 80 |
|
| 81 |
case 3: |
| 82 |
value.Set("[]boolean", arrBool) |
| 83 |
ret= oletest.methodBool( value); |
| 84 |
sfarray= new VBArray( ret); |
| 85 |
document.writeln( "Param: " + arrBool.toString() +"<br>"); |
| 86 |
document.writeln( "Returns a Sequence< BOOL > <br>" + sfarray.toArray()) ; break; |
| 87 |
|
| 88 |
case 4: |
| 89 |
value.Set("[]short", arr) |
| 90 |
ret= oletest.methodShort( value); |
| 91 |
sfarray= new VBArray( ret); |
| 92 |
document.writeln( "Param: " + arr.toString() +"<br>"); |
| 93 |
document.writeln( "Returns a Sequence< SHORT > <br>" + sfarray.toArray()) ; break; |
| 94 |
|
| 95 |
case 5: |
| 96 |
value.Set("[]unsigned short", arr) |
| 97 |
ret= oletest.methodUShort( value); |
| 98 |
sfarray= new VBArray( ret); |
| 99 |
document.writeln( "Param: " + arr.toString() +"<br>"); |
| 100 |
document.writeln( "Returns a Sequence< unsigned SHORT > <br>" + sfarray.toArray()) ; break; |
| 101 |
|
| 102 |
case 6: |
| 103 |
value.Set("[]long", arr) |
| 104 |
ret= oletest.methodLong( value); |
| 105 |
sfarray= new VBArray( ret); |
| 106 |
document.writeln( "Param: " + arr.toString() +"<br>"); |
| 107 |
document.writeln( "Returns a Sequence< LONG > <br>" + sfarray.toArray()) ; break; |
| 108 |
|
| 109 |
case 7: |
| 110 |
value.Set("[]unsigned long", arr) |
| 111 |
ret= oletest.methodULong( value); |
| 112 |
sfarray= new VBArray( ret); |
| 113 |
document.writeln( "Param: " + arr.toString() +"<br>"); |
| 114 |
document.writeln( "Returns a Sequence< unsigned LONG > <br>" + sfarray.toArray()) ; break; |
| 115 |
|
| 116 |
case 8: |
| 117 |
value.Set("[]char", arrChar) |
| 118 |
ret= oletest.methodChar( value); |
| 119 |
sfarray= new VBArray( ret); |
| 120 |
document.writeln( "Param: " + arrChar.toString() +"<br>"); |
| 121 |
document.writeln( "Returns a Sequence< wchar_t > <br>" + sfarray.toArray()) ; break; |
| 122 |
|
| 123 |
case 9: |
| 124 |
value.Set("[]string", arrString) |
| 125 |
ret= oletest.methodString( value); |
| 126 |
sfarray= new VBArray( ret); |
| 127 |
document.writeln( "Param: " + arrString.toString() +"<br>"); |
| 128 |
document.writeln( "Returns a Sequence< UString > <br>" + sfarray.toArray()) ; break; |
| 129 |
|
| 130 |
case 10: |
| 131 |
value.Set("[]any", arrAny) |
| 132 |
ret= oletest.methodAny( value); |
| 133 |
sfarray= new VBArray( ret); |
| 134 |
document.writeln( "Param: " + arrAny.toString() +"<br>"); |
| 135 |
document.writeln( "Returns a Sequence< UsrAny > <br>" + sfarray.toArray() ) ; break; |
| 136 |
|
| 137 |
case 11: |
| 138 |
var allArray= new Array(); |
| 139 |
for(var i= 0; i <3; i++) |
| 140 |
{ |
| 141 |
var value1= oletest._GetValueObject(); |
| 142 |
value1.Set("[]long", arr); |
| 143 |
allArray[i]= value1; |
| 144 |
} |
| 145 |
|
| 146 |
value.Set("[][]long", allArray); |
| 147 |
|
| 148 |
ret= oletest.methodSequence( value); |
| 149 |
sfarray= new VBArray( ret); |
| 150 |
document.writeln( "Param: " + arrSeq.toString() +"<br>"); |
| 151 |
document.writeln("Returns a Sequence< Sequence < long >> <br>") ; |
| 152 |
var arr1= new Array(); |
| 153 |
arr1= sfarray.toArray(); |
| 154 |
for( i=0; i < arr1.length; i++) |
| 155 |
{ |
| 156 |
sfarray2= new VBArray( arr1[i]); |
| 157 |
var arr2= new Array(); |
| 158 |
arr2= sfarray2.toArray(); |
| 159 |
document.writeln( arr2.toString() + "<br>" ); |
| 160 |
} |
| 161 |
break; |
| 162 |
|
| 163 |
case 12: |
| 164 |
var array1= new Array(); |
| 165 |
for(var i= 0; i <3; i++) |
| 166 |
{ |
| 167 |
var array2 = new Array(); |
| 168 |
for( var j= 0; j < 3; j++) |
| 169 |
{ |
| 170 |
var value2= oletest._GetValueObject(); |
| 171 |
value2.Set("[]long", arr); |
| 172 |
array2[j]= value2; |
| 173 |
} |
| 174 |
|
| 175 |
var value1= oletest._GetValueObject(); |
| 176 |
value1.Set("[][]long", array2) |
| 177 |
array1[i]= value1; |
| 178 |
} |
| 179 |
var valueAll= oletest._GetValueObject(); |
| 180 |
valueAll.Set("[][][]long",array1); |
| 181 |
|
| 182 |
ret= oletest.methodSequence2( valueAll); |
| 183 |
document.writeln( "Param: " + arrSeq2.toString() +"<br>"); |
| 184 |
sfarray1= new VBArray( ret); |
| 185 |
arr1= sfarray1.toArray(); |
| 186 |
for( i=0; i < arr1.length; i++) |
| 187 |
{ |
| 188 |
sfarray2= new VBArray( arr1[i]); |
| 189 |
arr2= sfarray2.toArray(); |
| 190 |
|
| 191 |
for ( j=0; j < arr2.length; j++) |
| 192 |
{ |
| 193 |
sfarray3= new VBArray( arr2[j]); |
| 194 |
arr3= sfarray3.toArray(); |
| 195 |
document.write( i+ " "); |
| 196 |
document.writeln(j + ": "+ arr3.toString() + "<br>" ); |
| 197 |
} |
| 198 |
|
| 199 |
} |
| 200 |
break; |
| 201 |
|
| 202 |
case 13: |
| 203 |
|
| 204 |
var ar= new Array(); |
| 205 |
for( i=0; i< 3; i++) |
| 206 |
{ |
| 207 |
var ob= new Object(); |
| 208 |
var valueObject= oletest._GetValueObject(); |
| 209 |
ob.value= "A JScript object!"; |
| 210 |
valueObject.Set("com.sun.star.uno.XInterface", ob); |
| 211 |
// valueObject.Set("long", 5); |
| 212 |
ar[i]= valueObject; |
| 213 |
} |
| 214 |
value.Set("[]com.sun.star.uno.XInterface", ar); |
| 215 |
// value.Set("[]long", ar); |
| 216 |
|
| 217 |
ret = oletest.methodXInterface( value); |
| 218 |
sfarray= new VBArray( ret); |
| 219 |
var arRet= sfarray.toArray(); |
| 220 |
|
| 221 |
document.writeln( "Params : Array containing objects ") |
| 222 |
for( index in ar) |
| 223 |
{ |
| 224 |
document.writeln( "object " + index + ": " + ar[index].Get().value +" "); |
| 225 |
} |
| 226 |
document.writeln( "<br>" ) ; |
| 227 |
document.writeln("Return: <br>"); |
| 228 |
for( index in arRet) |
| 229 |
{ |
| 230 |
document.writeln( "object " + index + ": " + arRet[index].value + " "); |
| 231 |
} |
| 232 |
break; |
| 233 |
|
| 234 |
|
| 235 |
|
| 236 |
|
| 237 |
// Properties: setting and getting values |
| 238 |
case 200: |
| 239 |
value.Set("[]byte", arr) |
| 240 |
oletest.AttrByte = value; |
| 241 |
ret= oletest.AttrByte; |
| 242 |
sfarray= new VBArray( ret); |
| 243 |
document.writeln("Setting AttrByte: " + arr.toString() + "<p>"); |
| 244 |
document.writeln("Getting AttrByte: " + sfarray.toArray()); break; |
| 245 |
|
| 246 |
case 201: |
| 247 |
value.Set("[]double", arrDouble) |
| 248 |
oletest.AttrDouble= value; |
| 249 |
ret= oletest.AttrDouble; |
| 250 |
sfarray= new VBArray( ret); |
| 251 |
document.writeln("Setting AttrDouble: " + arrDouble.toString() + "<p>"); |
| 252 |
document.writeln("Getting AttrDouble: " + sfarray.toArray()); break; |
| 253 |
|
| 254 |
case 202: |
| 255 |
value.Set("[]boolean", arrBool) |
| 256 |
oletest.AttrBool= value; |
| 257 |
ret= oletest.AttrBool; |
| 258 |
sfarray= new VBArray( ret); |
| 259 |
document.writeln("Setting AttrBool: " + arrBool.toString() + "<p>"); |
| 260 |
document.writeln("Getting AttrBool: " + sfarray.toArray()); break; |
| 261 |
|
| 262 |
case 203: |
| 263 |
value.Set("[]short", arr) |
| 264 |
oletest.AttrShort= value; |
| 265 |
ret= oletest.AttrShort; |
| 266 |
sfarray= new VBArray( ret); |
| 267 |
document.writeln("Setting AttrShort: " + arr.toString() + "<p>"); |
| 268 |
document.writeln("Getting AttrShort: " + sfarray.toArray()); break; |
| 269 |
|
| 270 |
case 204: |
| 271 |
value.Set("[]unsigned short", arr) |
| 272 |
oletest.AttrUShort= value; |
| 273 |
ret= oletest.AttrUShort; |
| 274 |
sfarray= new VBArray( ret); |
| 275 |
document.writeln("Setting AttrUShort: " + arr.toString() + "<p>"); |
| 276 |
document.writeln("Getting AttrUShort: " + sfarray.toArray()); break; |
| 277 |
|
| 278 |
case 205: |
| 279 |
value.Set("[]long", arr) |
| 280 |
oletest.AttrLong= value; |
| 281 |
ret= oletest.AttrLong; |
| 282 |
sfarray= new VBArray( ret); |
| 283 |
document.writeln("Setting AttrLong: " + arr.toString() + "<p>"); |
| 284 |
document.writeln("Getting AttrLong: " + sfarray.toArray()); break; |
| 285 |
|
| 286 |
case 206: |
| 287 |
value.Set("[]unsigned long", arr) |
| 288 |
oletest.AttrULong= value; |
| 289 |
ret= oletest.AttrULong; |
| 290 |
sfarray= new VBArray( ret); |
| 291 |
document.writeln("Setting AttrULong: " + arr.toString() + "<p>"); |
| 292 |
document.writeln("Getting AttrULong: " + sfarray.toArray()); break; |
| 293 |
|
| 294 |
case 207: |
| 295 |
value.Set("[]char", arrChar) |
| 296 |
oletest.AttrChar= value; |
| 297 |
ret= oletest.AttrChar; |
| 298 |
sfarray= new VBArray( ret); |
| 299 |
document.writeln("Setting AttrChar: " + arrChar.toString() + "<p>"); |
| 300 |
document.writeln("Getting AttrChar: " + sfarray.toArray()); break; |
| 301 |
|
| 302 |
case 208: |
| 303 |
value.Set("[]string", arrString) |
| 304 |
oletest.AttrString= value; |
| 305 |
ret= oletest.AttrString; |
| 306 |
sfarray= new VBArray( ret); |
| 307 |
document.writeln("Setting AttrString: " + arrString.toString() + "<p>"); |
| 308 |
document.writeln("Getting AttrString: " + sfarray.toArray()); break; |
| 309 |
|
| 310 |
case 209: |
| 311 |
value.Set("[]any", arrAny) |
| 312 |
oletest.AttrAny= value; |
| 313 |
ret= oletest.AttrAny; |
| 314 |
sfarray= new VBArray( ret); |
| 315 |
document.writeln("Setting AttrAny: " + arrAny.toString() + "<p>"); |
| 316 |
document.writeln("Getting AttrAny: " + sfarray.toArray()); break; |
| 317 |
|
| 318 |
case 210: |
| 319 |
var allArray= new Array(); |
| 320 |
for(var i= 0; i <3; i++) |
| 321 |
{ |
| 322 |
var value1= oletest._GetValueObject(); |
| 323 |
value1.Set("[]long", arr); |
| 324 |
allArray[i]= value1; |
| 325 |
} |
| 326 |
|
| 327 |
value.Set("[][]long", allArray); |
| 328 |
|
| 329 |
oletest.AttrSequence= value; |
| 330 |
ret= oletest.AttrSequence; |
| 331 |
sfarray= new VBArray( ret); |
| 332 |
|
| 333 |
document.writeln( "Param: " + arrSeq.toString() +"<br>"); |
| 334 |
document.writeln("Returns a Sequence< Sequence < long >> <br>") ; |
| 335 |
var arr1= new Array(); |
| 336 |
arr1= sfarray.toArray(); |
| 337 |
for( i=0; i < arr1.length; i++) |
| 338 |
{ |
| 339 |
sfarray2= new VBArray( arr1[i]); |
| 340 |
var arr2= new Array(); |
| 341 |
arr2= sfarray2.toArray(); |
| 342 |
document.writeln( arr2.toString() + "<br>" ); |
| 343 |
} |
| 344 |
break; |
| 345 |
|
| 346 |
case 211: |
| 347 |
var array1= new Array(); |
| 348 |
for(var i= 0; i <3; i++) |
| 349 |
{ |
| 350 |
var array2 = new Array(); |
| 351 |
for( var j= 0; j < 3; j++) |
| 352 |
{ |
| 353 |
var value2= oletest._GetValueObject(); |
| 354 |
value2.Set("[]long", arr); |
| 355 |
array2[j]= value2; |
| 356 |
} |
| 357 |
|
| 358 |
var value1= oletest._GetValueObject(); |
| 359 |
value1.Set("[][]long", array2) |
| 360 |
array1[i]= value1; |
| 361 |
} |
| 362 |
var valueAll= oletest._GetValueObject(); |
| 363 |
valueAll.Set("[][][]long",array1); |
| 364 |
|
| 365 |
oletest.AttrSequence2= valueAll; |
| 366 |
ret= oletest.AttrSequence2; |
| 367 |
sfarray1= new VBArray( ret); |
| 368 |
arr1= sfarray1.toArray(); |
| 369 |
for( i=0; i < arr1.length; i++) |
| 370 |
{ |
| 371 |
sfarray2= new VBArray( arr1[i]); |
| 372 |
arr2= sfarray2.toArray(); |
| 373 |
|
| 374 |
for ( j=0; j < arr2.length; j++) |
| 375 |
{ |
| 376 |
sfarray3= new VBArray( arr2[j]); |
| 377 |
arr3= sfarray3.toArray(); |
| 378 |
document.write( i+ " "); |
| 379 |
document.writeln(j + ": "+ arr3.toString() + "<br>" ); |
| 380 |
} |
| 381 |
|
| 382 |
} |
| 383 |
break; |
| 384 |
|
| 385 |
case 212: |
| 386 |
var ar= new Array(); |
| 387 |
for( i=0; i< 3; i++) |
| 388 |
{ |
| 389 |
var ob= new Object(); |
| 390 |
var valueObject= oletest._GetValueObject(); |
| 391 |
ob.value= "A JScript object!"; |
| 392 |
valueObject.Set("com.sun.star.uno.XInterface", ob); |
| 393 |
ar[i]= valueObject; |
| 394 |
} |
| 395 |
value.Set("[]com.sun.star.uno.XInterface", ar); |
| 396 |
|
| 397 |
oletest.AttrXInterface= value; |
| 398 |
ret= oletest.AttrXInterface; |
| 399 |
sfarray= new VBArray( ret); |
| 400 |
var arRet= sfarray.toArray(); |
| 401 |
|
| 402 |
document.writeln( "Params : Array containing objects ") |
| 403 |
for( index in ar) |
| 404 |
{ |
| 405 |
document.writeln( "object " + index + ": " + ar[index].Get().value +" "); |
| 406 |
} |
| 407 |
document.writeln( "<br>" ) ; |
| 408 |
document.writeln("Return: <br>"); |
| 409 |
for( index in arRet) |
| 410 |
{ |
| 411 |
document.writeln( "object " + index + ": " + arRet[index].value + " "); |
| 412 |
} |
| 413 |
|
| 414 |
break; |
| 415 |
|
| 416 |
// Out-parameter ------------------------------------------------------------ |
| 417 |
case (2000): |
| 418 |
|
| 419 |
oletest.testout_methodByte( outValue ); |
| 420 |
alert("byte: " + outValue.Get() ); break; |
| 421 |
case (2001): |
| 422 |
oletest.testout_methodDouble( outValue ); |
| 423 |
alert( "double: " + outValue.Get() ); break; |
| 424 |
case (2002): |
| 425 |
oletest.testout_methodBool( outValue ); |
| 426 |
alert( "boolean: " + outValue.Get() ); break; |
| 427 |
case (2003): |
| 428 |
oletest.testout_methodShort( outValue ); |
| 429 |
alert( "short: " + outValue.Get() ); break; |
| 430 |
case (2004): |
| 431 |
oletest.testout_methodUShort( outValue ); |
| 432 |
alert( "unsigned short: " + outValue.Get() ); break; |
| 433 |
case (2005): |
| 434 |
oletest.testout_methodLong( outValue ); |
| 435 |
alert( "long: " + outValue.Get() ); break; |
| 436 |
case (2006): |
| 437 |
oletest.testout_methodULong( outValue ); |
| 438 |
alert( "unsigned long: " + outValue.Get() ); break; |
| 439 |
case (2007): |
| 440 |
oletest.testout_methodChar( outValue ); |
| 441 |
alert( "char: " + outValue.Get() ); break; |
| 442 |
case (2008): |
| 443 |
oletest.testout_methodString( outValue ); |
| 444 |
alert( "string: " + outValue.Get()); break; |
| 445 |
case (2009): |
| 446 |
oletest.testout_methodAny( outValue ); |
| 447 |
alert( "any: " + outValue.Get() ); break; |
| 448 |
case (2010): |
| 449 |
oletest.testout_methodSequence( outValue ); |
| 450 |
var sfarray= new VBArray( outValue.Get()); |
| 451 |
arr= sfarray.toArray(); |
| 452 |
document.writeln("use the browser's back arrow to go to the previous page <p>"); |
| 453 |
document.writeln( arr.toString()); |
| 454 |
break; |
| 455 |
case (2011): |
| 456 |
oletest.testout_methodSequence2( outValue ); |
| 457 |
var sfarray= new VBArray( outValue.Get()); |
| 458 |
arr= sfarray.toArray(); |
| 459 |
var i; |
| 460 |
for( i=0; i < arr.length; i++) |
| 461 |
{ |
| 462 |
var sfarray= new VBArray( arr[i]); |
| 463 |
var arr2= new Array(); |
| 464 |
arr2= sfarray.toArray(); |
| 465 |
document.writeln( arr2.toString() + "<br>" ); |
| 466 |
} |
| 467 |
break; |
| 468 |
case (2012): |
| 469 |
oletest.testout_methodMulParams1( outValue, outValue2 ); |
| 470 |
document.writeln( "int : " + outValue.Get() + " int :" + outValue2.Get()); break; |
| 471 |
case (2013): |
| 472 |
oletest.testout_methodMulParams2( outValue, outValue2, outValue3 ); |
| 473 |
document.writeln( "int: " + outValue.Get() + " int: " + outValue2.Get() + " string: " + outValue3.Get() ); break; |
| 474 |
case (2014): |
| 475 |
oletest.testout_methodMulParams3( "hallo", outValue ); |
| 476 |
document.writeln( "string: " + outValue.Get() ); break; |
| 477 |
case (2015): |
| 478 |
oletest.testout_methodXInterface( outValue ); |
| 479 |
var out= outValue.Get(); |
| 480 |
document.writeln( "string: " + out.AttrAny2); break; |
| 481 |
|
| 482 |
// INOUT - Parameter ------------------------------------------------------------------------------- |
| 483 |
// The in value has to be placed on index 0 of the passed in array |
| 484 |
case (500): |
| 485 |
inoutValue.InitInOutParam("byte", 100); |
| 486 |
oletest.testinout_methodByte( inoutValue ); |
| 487 |
alert("byte: " + inoutValue.Get() ); break; |
| 488 |
case (501): |
| 489 |
inoutValue.InitInOutParam("double", 3.14); |
| 490 |
oletest.testinout_methodDouble( inoutValue ); |
| 491 |
alert( "double: " + inoutValue.Get() ); break; |
| 492 |
case (502): |
| 493 |
inoutValue.InitInOutParam("boolean", false); |
| 494 |
oletest.testinout_methodBool( inoutValue ); |
| 495 |
alert( "boolean: " + inoutValue.Get() ); break; |
| 496 |
case (503): |
| 497 |
inoutValue.InitInOutParam( "short", 200); |
| 498 |
oletest.testinout_methodShort( inoutValue ); |
| 499 |
alert( "short: " + inoutValue.Get() ); break; |
| 500 |
case (504): |
| 501 |
inoutValue.InitInOutParam("unsigned short", 300); |
| 502 |
oletest.testinout_methodUShort( inoutValue ); |
| 503 |
alert( "unsigned short: " + inoutValue.Get() ); break; |
| 504 |
case (505): |
| 505 |
inoutValue.InitInOutParam("long", 400); |
| 506 |
oletest.testinout_methodLong( inoutValue ); |
| 507 |
alert( "long: " + inoutValue.Get() ); break; |
| 508 |
case (506): |
| 509 |
inoutValue.InitInOutParam( "unsigned long", 500); |
| 510 |
oletest.testinout_methodULong( inoutValue ); |
| 511 |
alert( "unsigned long: " + inoutValue.Get() ); break; |
| 512 |
case (507): |
| 513 |
inoutValue.InitInOutParam( "char", "A"); |
| 514 |
oletest.testinout_methodChar( inoutValue ); |
| 515 |
alert( "char: " + inoutValue.Get() ); break; |
| 516 |
case (508): |
| 517 |
inoutValue.InitInOutParam("string", "I am a string"); |
| 518 |
oletest.testinout_methodString( inoutValue ); |
| 519 |
alert( "string: " + inoutValue.Get() ); break; |
| 520 |
case (509): |
| 521 |
inoutValue.InitInOutParam("[]long", arr); |
| 522 |
oletest.testinout_methodAny( inoutValue ); // the method simply returns the argument |
| 523 |
sfarray= new VBArray( inoutValue.Get()); |
| 524 |
arr= sfarray.toArray(); |
| 525 |
alert( "any: " + arr.toString() ); break; |
| 526 |
case (510): |
| 527 |
inoutValue.InitInOutParam("[]long", arr); |
| 528 |
oletest.testinout_methodSequence( inoutValue ); |
| 529 |
var sfarray= new VBArray( inoutValue.Get()); |
| 530 |
arr= sfarray.toArray(); |
| 531 |
document.writeln("use the browser's back arrow to go to the previous page <p>"); |
| 532 |
document.writeln( arr.toString()); |
| 533 |
break; |
| 534 |
case (511): |
| 535 |
inoutValue.InitInOutParam( "[][]long", arrSeq); |
| 536 |
oletest.testinout_methodSequence2( inoutValue ); |
| 537 |
var sfarray= new VBArray( inoutValue.Get()); |
| 538 |
arr= sfarray.toArray(); |
| 539 |
var i; |
| 540 |
for( i=0; i < arr.length; i++) |
| 541 |
{ |
| 542 |
var sfarray= new VBArray( arr[i]); |
| 543 |
var arr2= new Array(); |
| 544 |
arr2= sfarray.toArray(); |
| 545 |
document.writeln( arr2.toString() + "<br>" ); |
| 546 |
} |
| 547 |
break; |
| 548 |
case 512: |
| 549 |
var ob= new Object(); |
| 550 |
ob.value= "this is a string"; |
| 551 |
inoutValue.InitInOutParam( "com.sun.star.script.XInvocation", ob); |
| 552 |
oletest.testinout_methodXInterface( inoutValue); |
| 553 |
document.write("Out value: " + inoutValue.Get().value ); |
| 554 |
break; |
| 555 |
|
| 556 |
|
| 557 |
|
| 558 |
|
| 559 |
|
| 560 |
// Test ANY |
| 561 |
// Methods |
| 562 |
case 1000: |
| 563 |
i= 100; |
| 564 |
ret= oletest.methodAnyTest1( i); |
| 565 |
document.writeln( "in: " + i + " ret: " + ret); |
| 566 |
break; |
| 567 |
case 1001: |
| 568 |
i= 3.14; |
| 569 |
ret= oletest.methodAnyTest1( i); |
| 570 |
document.writeln( "in: " + i + " ret: " + ret); |
| 571 |
break; |
| 572 |
case 1002: |
| 573 |
i= "Hallo" |
| 574 |
ret= oletest.methodAnyTest1( i); |
| 575 |
document.writeln( "in: " + i + " ret: " + ret); |
| 576 |
break; |
| 577 |
case 1003: |
| 578 |
i= arr; |
| 579 |
ret= oletest.methodAnyTest1( i); |
| 580 |
sfarray= new VBArray( ret); |
| 581 |
document.writeln( "in: " + i + " ret: " + sfarray.toArray()); |
| 582 |
break; |
| 583 |
case 1004: |
| 584 |
var obj= new Object(); |
| 585 |
obj[1]= "This is index 0"; |
| 586 |
ret= oletest.methodAnyTest1( obj); |
| 587 |
document.writeln( "in: " + obj + " ret: " + ret); |
| 588 |
break; |
| 589 |
|
| 590 |
|
| 591 |
// Test ANY property |
| 592 |
case 1010: |
| 593 |
i= 100; |
| 594 |
oletest.AttrAny2= i; |
| 595 |
ret= oletest.AttrAny2; |
| 596 |
document.writeln( "set: " + i + " get: " + ret); |
| 597 |
break; |
| 598 |
case 1011: |
| 599 |
i= 3.14; |
| 600 |
oletest.AttrAny2= i; |
| 601 |
ret= oletest.AttrAny2; |
| 602 |
document.writeln( "set: " + i + " get: " + ret); |
| 603 |
break; |
| 604 |
case 1012: |
| 605 |
i= "Hallo" |
| 606 |
oletest.AttrAny2= i; |
| 607 |
ret= oletest.AttrAny2; |
| 608 |
document.writeln( "set: " + i + " get: " + ret); |
| 609 |
break; |
| 610 |
case 1013: |
| 611 |
i= arr; |
| 612 |
oletest.AttrAny2= i; |
| 613 |
ret= oletest.AttrAny2; |
| 614 |
sfarray= new VBArray( ret); |
| 615 |
document.writeln( "set: " + i + " get: " + sfarray.toArray()); |
| 616 |
break; |
| 617 |
case 1014: |
| 618 |
var obj= new Object(); |
| 619 |
obj[1]= "This is index 0"; |
| 620 |
oletest.AttrAny2= obj; |
| 621 |
ret= oletest.AttrAny2; |
| 622 |
document.writeln( "set: " + obj + " get: " + ret); |
| 623 |
break; |
| 624 |
|
| 625 |
|
| 626 |
case 2100: |
| 627 |
alert("2100"); |
| 628 |
var ret= oletest.retMethodByte(); |
| 629 |
var sfarray= VBArray( ret); |
| 630 |
document.writeln( sfarray.toArray() ); |
| 631 |
break; |
| 632 |
|
| 633 |
|
| 634 |
// case 5000: |
| 635 |
// oletest.other_methodAnyIn("hallo"); |
| 636 |
|
| 637 |
|
| 638 |
|
| 639 |
} |
| 640 |
|
| 641 |
} |
| 642 |
|
| 643 |
function funcOut( out) |
| 644 |
{ |
| 645 |
out["du"]= 0xffff; |
| 646 |
} |
| 647 |
|
| 648 |
</script> |
| 649 |
|
| 650 |
<script language="VBScript"> |
| 651 |
|
| 652 |
sub callBasic(id) |
| 653 |
|
| 654 |
Dim factory |
| 655 |
Set factory= GetObject("", "com.sun.star.ServiceManager") |
| 656 |
|
| 657 |
Set oletest= factory.createInstance("oletest.OleTest") |
| 658 |
|
| 659 |
|
| 660 |
arrInt= Array(1,2,3,4,5) |
| 661 |
arrInt2= Array( -1, -2, 127, 128, 0) |
| 662 |
arrDouble= Array(1.1, 2.2, 3.3, 4.4, 5.5) |
| 663 |
arrBool= Array(0,1,0,2,0) |
| 664 |
arrLong= Array( &Hff, &Hffff, &Hffffff, &Hffffffff) |
| 665 |
arrString= Array("Chicken Wings", "Cheeseburger", "Hamburger") |
| 666 |
arrChar= Array("a",65, "M") |
| 667 |
arrAny= Array("Mickey", 3.14, 100, "A") |
| 668 |
|
| 669 |
Dim arrDim2Int(1,1) |
| 670 |
For i= 0 To 1 |
| 671 |
For j= 0 To 1 |
| 672 |
arrDim2Int(i,j) = i*2 + j |
| 673 |
Next |
| 674 |
Next |
| 675 |
|
| 676 |
Dim arrDim3Int(1,1,1) |
| 677 |
For i= 0 To 1 |
| 678 |
For j= 0 To 1 |
| 679 |
For k=0 To 1 |
| 680 |
arrDim3Int(i,j,k) = i*2 + j*2 + k |
| 681 |
Next |
| 682 |
Next |
| 683 |
Next |
| 684 |
|
| 685 |
|
| 686 |
set outValue= factory.Bridge_GetValueObject() |
| 687 |
outValue.InitOutParam |
| 688 |
set value= factory.Bridge_GetValueObject() |
| 689 |
select case id |
| 690 |
case 0 |
| 691 |
value.Set "[]byte", arrInt |
| 692 |
ret= oletest.methodByte(value) |
| 693 |
document.writeln "<br> return value: " |
| 694 |
printArray ret |
| 695 |
case 1 |
| 696 |
document.writeln "param: " |
| 697 |
printArray arrDouble |
| 698 |
ret= oletest.methodDouble(arrDouble) |
| 699 |
document.writeln "<br> return value: " |
| 700 |
printArray ret |
| 701 |
case 2 |
| 702 |
document.writeln "param: " |
| 703 |
printArray arrBool |
| 704 |
ret= oletest.methodBool(arrBool) |
| 705 |
document.writeln "<br> return value: " |
| 706 |
printArray ret |
| 707 |
case 3 |
| 708 |
document.writeln "param: " |
| 709 |
printArray arrInt2 |
| 710 |
ret= oletest.methodShort(arrInt2) |
| 711 |
document.writeln "<br> return value: " |
| 712 |
printArray ret |
| 713 |
case 4 |
| 714 |
document.writeln "param: " |
| 715 |
printArray arrInt |
| 716 |
ret= oletest.methodUShort(arrInt) |
| 717 |
document.writeln "<br> return value: " |
| 718 |
printArray ret |
| 719 |
case 5 |
| 720 |
document.writeln "param: " |
| 721 |
printArray arrLong |
| 722 |
ret= oletest.methodLong(arrLong) |
| 723 |
document.writeln "<br> return value: " |
| 724 |
printArray ret |
| 725 |
case 6 |
| 726 |
document.writeln "param: " |
| 727 |
printArray arrInt |
| 728 |
ret= oletest.methodULong(arrInt) |
| 729 |
document.writeln "<br> return value: " |
| 730 |
printArray ret |
| 731 |
case 7 |
| 732 |
document.writeln "param: " |
| 733 |
printArray arrString |
| 734 |
ret= oletest.methodString(arrString) |
| 735 |
document.writeln "<br> return value: " |
| 736 |
printArray ret |
| 737 |
case 8 |
| 738 |
document.writeln "param: " |
| 739 |
printArray arrChar |
| 740 |
ret= oletest.methodChar(arrChar) |
| 741 |
document.writeln "<br> return value: " |
| 742 |
printArray ret |
| 743 |
case 9 |
| 744 |
document.writeln "param: " |
| 745 |
printArray arrAny |
| 746 |
ret= oletest.methodAny(arrAny) |
| 747 |
document.writeln "<br> return value: " |
| 748 |
printArray ret |
| 749 |
case 10 |
| 750 |
document.writeln "param: " |
| 751 |
printArray2 arrDim2Int |
| 752 |
ret= oletest.methodSequence(arrDim2Int) |
| 753 |
document.writeln "<br> return value: " |
| 754 |
for each val in ret |
| 755 |
document.write "<br> array: " |
| 756 |
for each val2 in val |
| 757 |
document.write val2 |
| 758 |
next |
| 759 |
next |
| 760 |
|
| 761 |
// In Out Parameter -------------------------------------------------- |
| 762 |
case 100 |
| 763 |
a= 100 |
| 764 |
document.write "param: " & CStr( a) & "<br>" |
| 765 |
oletest.testinout_methodByte a |
| 766 |
document.write a |
| 767 |
case 101 |
| 768 |
a= 1.11 |
| 769 |
document.write "param: " & CStr( a) & "<br>" |
| 770 |
oletest.testinout_methodDouble a |
| 771 |
document.write a |
| 772 |
case 102 |
| 773 |
a= 5 |
| 774 |
document.write "param: "& CStr( a) & "<br>" |
| 775 |
oletest.testinout_methodBool a |
| 776 |
document.write a |
| 777 |
case 103 |
| 778 |
a= -10 |
| 779 |
document.write "param: "& CStr( a) & "<br>" |
| 780 |
oletest.testinout_methodShort a |
| 781 |
document.write a |
| 782 |
case 104 |
| 783 |
a= 128 |
| 784 |
document.write "param: "& CStr( a) & "<br>" |
| 785 |
oletest.testinout_methodUShort a |
| 786 |
document.write a |
| 787 |
case 105 |
| 788 |
a= 65556 |
| 789 |
document.write "param: "& CStr( a) & "<br>" |
| 790 |
oletest.testinout_methodLong a |
| 791 |
document.write a |
| 792 |
case 106 |
| 793 |
a= 65556 |
| 794 |
document.write "param: "& CStr( a) & "<br>" |
| 795 |
oletest.testinout_methodULong a |
| 796 |
document.write a |
| 797 |
case 107 |
| 798 |
a= "ein test string" |
| 799 |
document.write "param: "& CStr( a) & "<br>" |
| 800 |
oletest.testinout_methodString a |
| 801 |
document.write a |
| 802 |
case 108 |
| 803 |
a= "W" |
| 804 |
document.write "param: "& CStr( a) & "<br>" |
| 805 |
oletest.testinout_methodChar a |
| 806 |
document.write a |
| 807 |
case 109 |
| 808 |
a= "Ein String im Any" |
| 809 |
document.write "param: "& CStr( a) & "<br>" |
| 810 |
oletest.other_methodAnyIn a |
| 811 |
document.write a |
| 812 |
// Attributes ----------------------------------------------------------------- |
| 813 |
case 200 |
| 814 |
document.write "set: " |
| 815 |
printArray arrInt |
| 816 |
oletest.AttrByte= arrInt |
| 817 |
b= oletest.AttrByte |
| 818 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 819 |
case 201 |
| 820 |
document.write "set: " |
| 821 |
printArray arrDouble |
| 822 |
oletest.AttrDouble= arrDouble |
| 823 |
b= oletest.AttrDouble |
| 824 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 825 |
case 202 |
| 826 |
document.write "set: " |
| 827 |
printArray arrBool : |
| 828 |
oletest.AttrBool= arrBool |
| 829 |
b= oletest.AttrBool |
| 830 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 831 |
case 203 |
| 832 |
document.write "set: " |
| 833 |
printArray arrInt2 : |
| 834 |
oletest.AttrShort= arrInt2 |
| 835 |
b= oletest.AttrShort |
| 836 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 837 |
case 204 |
| 838 |
document.write "set: " |
| 839 |
printArray arrInt |
| 840 |
oletest.AttrUShort= arrInt |
| 841 |
b= oletest.AttrUShort |
| 842 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 843 |
case 205 |
| 844 |
document.write "set: " |
| 845 |
printArray arrInt2 |
| 846 |
oletest.AttrLong= arrInt2 |
| 847 |
b= oletest.AttrLong |
| 848 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 849 |
case 206 |
| 850 |
document.write "set: " |
| 851 |
printArray arrInt |
| 852 |
oletest.AttrULong= arrInt |
| 853 |
b= oletest.AttrULong |
| 854 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 855 |
case 207 |
| 856 |
document.write "set: " |
| 857 |
printArray arrString |
| 858 |
oletest.AttrString= arrString |
| 859 |
b= oletest.AttrString |
| 860 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 861 |
case 208 |
| 862 |
document.write "set: " |
| 863 |
printArray arrChar |
| 864 |
oletest.AttrChar= arrChar |
| 865 |
b= oletest.AttrChar |
| 866 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 867 |
case 209 |
| 868 |
document.write "set: " |
| 869 |
printArray arrAny |
| 870 |
oletest.AttrAny= arrAny |
| 871 |
b= oletest.AttrAny |
| 872 |
call printArrayEx( "<br> get: ", "<br>", b) |
| 873 |
|
| 874 |
case 210 |
| 875 |
document.write "set: <br>" |
| 876 |
printArray2 arrDim2Int : |
| 877 |
oletest.AttrSequence= arrDim2Int |
| 878 |
ret= oletest.AttrSequence |
| 879 |
document.write "get: " |
| 880 |
for each val in ret |
| 881 |
document.write "<br> array: " |
| 882 |
for each val2 in val |
| 883 |
document.write val2 |
| 884 |
next |
| 885 |
next |
| 886 |
|
| 887 |
// out params |
| 888 |
case 300 |
| 889 |
oletest.testout_methodByte( outValue ) |
| 890 |
alert("byte: " & outValue.Get() ) |
| 891 |
|
| 892 |
|
| 893 |
end select |
| 894 |
end sub |
| 895 |
sub printArray( arr) |
| 896 |
document.write "array: " |
| 897 |
For Each val In arr |
| 898 |
document.write CStr(val) & " " |
| 899 |
Next |
| 900 |
end sub |
| 901 |
|
| 902 |
// print a 2 dimensional Array |
| 903 |
|
| 904 |
sub printArray2( arr) |
| 905 |
elements1= UBound( arr, 1) - LBound( arr, 1) +1 |
| 906 |
elements2= UBound( arr, 2) - LBound( arr, 2) +1 |
| 907 |
|
| 908 |
For i=0 To elements1 -1 |
| 909 |
document.write( "array " & CStr( i) & ": " ) |
| 910 |
For j=0 To elements2 -1 |
| 911 |
document.write CStr( arr(i,j)) |
| 912 |
Next |
| 913 |
document.write( "<br>") |
| 914 |
Next |
| 915 |
end sub |
| 916 |
|
| 917 |
sub printArrayEx( pre, post, array) |
| 918 |
document.write pre |
| 919 |
printArray array |
| 920 |
document.write post |
| 921 |
end sub |
| 922 |
</script> |
| 923 |
|
| 924 |
<div id=out> </div> |
| 925 |
|
| 926 |
<!-- Insert HTML here --> |
| 927 |
|
| 928 |
<h2> JScript with _GetValueObject </h2> |
| 929 |
Tests Array/Sequence conversion.<br> |
| 930 |
All methods receive a Sequence as Parameter. The element type of the Sequence is written on the buttons. |
| 931 |
<br> |
| 932 |
<button onclick='callOleTest( 1)'>byte</Button> |
| 933 |
<button onclick='callOleTest( 2)'>double</Button> |
| 934 |
<button onclick='callOleTest( 3)'>boolean</Button> |
| 935 |
<button onclick='callOleTest( 4)'>short</Button> |
| 936 |
<button onclick='callOleTest( 5)'>unsigned short</Button> |
| 937 |
<button onclick='callOleTest( 6)'>long</Button> |
| 938 |
<button onclick='callOleTest( 7)'>unsigned long</Button> |
| 939 |
<button onclick='callOleTest( 8)'>char</Button> |
| 940 |
<button onclick='callOleTest( 10)'>any</Button> |
| 941 |
<button onclick='callOleTest( 11)'>sequence<long> </Button> |
| 942 |
<button onclick='callOleTest( 12)'>sequence<sequence<long> > </Button> |
| 943 |
<button onclick='callOleTest( 13)'>XInterface</Button> |
| 944 |
<p> |
| 945 |
|
| 946 |
|
| 947 |
Out Parameter <br> |
| 948 |
<button onclick='callOleTest( 2000)'>byte </Button> |
| 949 |
<button onclick='callOleTest( 2001)'>double</Button> |
| 950 |
<button onclick='callOleTest( 2002)'>boolean</Button> |
| 951 |
<button onclick='callOleTest( 2003)'>short</Button> |
| 952 |
<button onclick='callOleTest( 2004)'>unsigned short</Button> |
| 953 |
<button onclick='callOleTest( 2005)'>long</Button> |
| 954 |
<button onclick='callOleTest( 2006)'>unsigned long</Button> |
| 955 |
<button onclick='callOleTest( 2007)'>char</Button> |
| 956 |
<button onclick='callOleTest( 2008)'>string</Button> |
| 957 |
<button onclick='callOleTest( 2009)'>any</Button> |
| 958 |
<button onclick='callOleTest( 2010)'>sequence<long> </Button> |
| 959 |
<button onclick='callOleTest( 2011)'>sequence<sequence<long> > </Button> |
| 960 |
<button onclick='callOleTest( 2012)'>2 out </Button> |
| 961 |
<button onclick='callOleTest( 2013)'>3 out </Button> |
| 962 |
<button onclick='callOleTest( 2014)'>1 in & 1 out </Button> |
| 963 |
<button onclick='callOleTest( 2015)'>XInterface </Button> |
| 964 |
|
| 965 |
<p> |
| 966 |
In Out Parameter <br> |
| 967 |
<button onclick='callOleTest( 500)'>byte </Button> |
| 968 |
<button onclick='callOleTest( 501)'>double</Button> |
| 969 |
<button onclick='callOleTest( 502)'>boolean</Button> |
| 970 |
<button onclick='callOleTest( 503)'>short</Button> |
| 971 |
<button onclick='callOleTest( 504)'>unsigned short</Button> |
| 972 |
<button onclick='callOleTest( 505)'>long</Button> |
| 973 |
<button onclick='callOleTest( 506)'>unsigned long</Button> |
| 974 |
<button onclick='callOleTest( 507)'>char</Button> |
| 975 |
<button onclick='callOleTest( 508)'>string</Button> |
| 976 |
<button onclick='callOleTest( 509)'>any</Button> |
| 977 |
<button onclick='callOleTest( 510)'>sequence<long> </Button> |
| 978 |
<button onclick='callOleTest( 511)'>sequence<sequence<long> > </Button> |
| 979 |
<button onclick='callOleTest( 512)'>XInterface </Button> |
| 980 |
<p> |
| 981 |
|
| 982 |
Tests Array/Sequence conversion with Attributes. All params are of type Sequence and |
| 983 |
the element type of the Sequence is written on the buttons. <br> |
| 984 |
<button onclick='callOleTest( 200)'>byte </Button> |
| 985 |
<button onclick='callOleTest( 201)'>double</Button> |
| 986 |
<button onclick='callOleTest( 202)'>boolean</Button> |
| 987 |
<button onclick='callOleTest( 203)'>short</Button> |
| 988 |
<button onclick='callOleTest( 204)'>unsigned short</Button> |
| 989 |
<button onclick='callOleTest( 205)'>long</Button> |
| 990 |
<button onclick='callOleTest( 206)'>unsigned long</Button> |
| 991 |
<button onclick='callOleTest( 207)'>char</Button> |
| 992 |
<button onclick='callOleTest( 208)'>string</Button> |
| 993 |
<button onclick='callOleTest( 209)'>any</Button> |
| 994 |
<button onclick='callOleTest( 210)'>sequence<long> </Button> |
| 995 |
<button onclick='callOleTest( 211)'>sequence<sequence<long> > </Button> |
| 996 |
<button onclick='callOleTest( 212)'>XInterface </Button> |
| 997 |
<p> |
| 998 |
|
| 999 |
<!-- |
| 1000 |
Test of Any parameter in a method. Any contains:<br> |
| 1001 |
<button onclick='callOleTest( 1000)'>integer </Button> |
| 1002 |
<button onclick='callOleTest( 1001)'>double </Button> |
| 1003 |
<button onclick='callOleTest( 1002)'>string</Button> |
| 1004 |
<button onclick='callOleTest( 1003)'>array</Button> |
| 1005 |
<button onclick='callOleTest( 1004)'>object</Button> |
| 1006 |
<p> |
| 1007 |
Test of Any parameter in a property. Any contains:<br> |
| 1008 |
<button onclick='callOleTest( 1010)'>integer </Button> |
| 1009 |
<button onclick='callOleTest( 1011)'>double </Button> |
| 1010 |
<button onclick='callOleTest( 1012)'>string</Button> |
| 1011 |
<button onclick='callOleTest( 1013)'>array</Button> |
| 1012 |
<button onclick='callOleTest( 1014)'>object</Button> |
| 1013 |
<p> |
| 1014 |
<p> |
| 1015 |
--> |
| 1016 |
|
| 1017 |
<h2> Visual Basic Tests </h2> |
| 1018 |
Test array /Sequence conversion and return value<br> |
| 1019 |
Template: <b> Sequence < type > method( Sequence< type > ) </b> |
| 1020 |
<p> |
| 1021 |
|
| 1022 |
|
| 1023 |
<button onclick='callBasic(0)'>byte</button> |
| 1024 |
<!-- |
| 1025 |
<button onclick='callBasic(1)'>double</button> |
| 1026 |
<button onclick='callBasic(2)'>boolean</button> |
| 1027 |
<button onclick='callBasic(3)'>short</button> |
| 1028 |
<button onclick='callBasic(4)'>u short</button> |
| 1029 |
<button onclick='callBasic(5)'>long</button> |
| 1030 |
<button onclick='callBasic(6)'>u long</button> |
| 1031 |
<button onclick='callBasic(7)'>string</button> |
| 1032 |
<button onclick='callBasic(8)'>char</button> |
| 1033 |
<button onclick='callBasic(9)'>any</button> <br> |
| 1034 |
<button onclick='callBasic(10)'>Seq < int ></button> |
| 1035 |
--> |
| 1036 |
<p> |
| 1037 |
|
| 1038 |
|
| 1039 |
Out parameter <br> |
| 1040 |
Template: <b> void method( Sequence < type > ) </b> <br> |
| 1041 |
<button onclick='callBasic(300)'>byte</button> |
| 1042 |
<!-- |
| 1043 |
<button onclick='callBasic(101)'>double</button> |
| 1044 |
<button onclick='callBasic(102)'>boolean</button> |
| 1045 |
<button onclick='callBasic(103)'>short</button> |
| 1046 |
<button onclick='callBasic(104)'>u short</button> |
| 1047 |
<button onclick='callBasic(105)'>long</button> |
| 1048 |
<button onclick='callBasic(106)'>u long</button> |
| 1049 |
<button onclick='callBasic(107)'>string</button> |
| 1050 |
<button onclick='callBasic(108)'>char</button> |
| 1051 |
<button onclick='callBasic(109)'>any</button> <br> |
| 1052 |
--> |
| 1053 |
<p> |
| 1054 |
<!-- |
| 1055 |
Tests Array/Sequence conversion with <b>Attributes</b>. All params are of type Sequence and |
| 1056 |
the element type of the Sequence is written on the buttons. <br> |
| 1057 |
<button onclick='callBasic( 200)'>byte </Button> |
| 1058 |
<button onclick='callBasic( 201)'>double</Button> |
| 1059 |
<button onclick='callBasic( 202)'>boolean</Button> |
| 1060 |
<button onclick='callBasic( 203)'>short</Button> |
| 1061 |
<button onclick='callBasic( 204)'>unsigned short</Button> |
| 1062 |
<button onclick='callBasic( 205)'>long</Button> |
| 1063 |
<button onclick='callBasic( 206)'>unsigned long</Button> |
| 1064 |
<button onclick='callBasic( 207)'>string</Button> |
| 1065 |
<button onclick='callBasic( 208)'>char</Button> |
| 1066 |
<button onclick='callBasic( 209)'>any</Button> |
| 1067 |
<button onclick='callBasic( 210)'>sequence<long> </Button> |
| 1068 |
--> |
| 1069 |
|
| 1070 |
|
| 1071 |
|