3 <META NAME=
"GENERATOR" Content=
"Microsoft Developer Studio">
4 <META HTTP-EQUIV=
"Content-Type" content=
"text/html; charset=iso-8859-1">
5 <TITLE>Document Title
</TITLE>
9 <script language=
"JScript">
11 function runJScriptTest( Log)
13 document.writeln(
"================================================================================<br>");
14 document.writeln(
"JScript<br>");
15 document.writeln(
"================================================================================<p>");
17 //var name : String =
"Fred";
19 var arr= new Array(
1,
2,
3,
4,
0);
20 var arrInt= new Array(
1,
2,
3,
4,
5);
21 var arrDouble= new Array(
1.2345,
12.345,
123.45,
1234.5,
12345);
22 var arrBool= new Array( true, false, true, false, true);
23 var arrChar= new Array( '
1', 'A',
" ",
55);
25 var arrString= new Array(
"hamburger",
"cheeseburger",
"chicken nuggets",
"chicken wings" ,
"pizza");
26 var arrAny= new Array(
100,
100.1235,
"hallo");
27 var arrSeq= new Array( arr, arr, arr);
28 var arrSeq2= new Array( );
30 var arEventListener= new Array( new XEventListener_Impl(), new XEventListener_Impl(),
31 new XEventListener_Impl());
32 var arEventListener2= new Array( new XEventListener_Impl(), new XEventListener_Impl(),
33 new XEventListener_Impl());
34 var arArEventListener= new Array( arEventListener, arEventListener2);
36 var arObj= new Array();
39 arObj[i]= new Object();
41 var outVal= new Array();
42 var outVal2= new Array();
43 var outVal3= new Array();
47 arrSeq2[i]= new Array();
48 for( j=
0; j <
3; j++)
50 arrSeq2[i][j]= new Array();
51 for( k=
0; k <
5; k++)
53 arrSeq2[i][j][k]= (i *
3 *
5) + (j *
5) + k;
54 // document.write(arrSeq2[i][j][k] +
" ");
56 // document.write(
"<br>");
61 ret= oletest.methodByte( arr);
62 _ret= new VBArray( ret).toArray();
63 Log.print( isEqualAr( arr, _ret),
"methodByte");
65 ret= oletest.methodFloat( arrDouble);
66 _ret= new VBArray( ret).toArray();
68 if( (arrDouble.length == _ret.length)
69 && (_ret[
0]
> 1.2344 && _ret[
0] <
1.2346)
70 && (_ret[
1]
> 12.344 && _ret[
1] <
12.346)
71 && (_ret[
2]
> 123.44 && _ret[
2] <
123.46)
72 && (_ret[
3]
> 1234.4 && _ret[
3] <
1234.6)
73 && (_ret[
4]
> 12344 && _ret[
4] <
12346))
75 Log.print( bOk,
"methodFloat");
77 ret= oletest.methodDouble( arrDouble);
78 _ret= new VBArray( ret).toArray();
79 Log.print( isEqualAr( arrDouble, _ret),
"methodDouble");
81 ret= oletest.methodBool( arrBool);
82 _ret= new VBArray( ret).toArray();
83 Log.print( isEqualAr( arrBool, _ret),
"methodBool");
85 ret= oletest.methodShort( arr);
86 _ret= new VBArray( ret).toArray();
87 Log.print( isEqualAr( arr, _ret),
"methodShort");
89 ret= oletest.methodUShort( arr);
90 _ret= new VBArray( ret).toArray();
91 Log.print( isEqualAr( arr, _ret),
"methodUShort");
93 ret= oletest.methodLong( arr);
94 _ret= new VBArray( ret).toArray();
95 Log.print( isEqualAr( arr, _ret),
"methodLong");
97 ret= oletest.methodULong( arr);
98 _ret= new VBArray( ret).toArray();
99 Log.print( isEqualAr( arr, _ret),
"methodULong");
101 ret= oletest.methodChar( arrChar);
102 _ret= new VBArray( ret).toArray();
104 if( _ret.length == arrChar.length && _ret[
0] ==
49 && _ret[
1] ==
65 && _ret[
2] ==
32 && _ret[
3] ==
55)
106 Log.print( bOk,
"methodChar");
108 ret= oletest.methodString( arrString);
109 _ret= new VBArray( ret).toArray();
110 Log.print( isEqualAr( arrString, _ret),
"methodString");
112 ret= oletest.methodAny( arrAny);
113 _ret= new VBArray( ret).toArray();
114 Log.print( isEqualAr( arrAny, _ret),
"methodAny");
116 ret= oletest.methodSequence( arrSeq);
117 _ret= new VBArray( ret).toArray();
118 for( i=
0; i < _ret.length; i++)
120 sfarray2= new VBArray( _ret[i]);
121 var arr2= sfarray2.toArray();
122 if( ! isEqualAr(arrSeq[i], arr2))
128 Log.print( bOk,
"methodSequence");
130 ret= oletest.methodSequence2( arrSeq2);
131 arr1= new VBArray( ret).toArray();
132 for( i=
0; i < arr1.length; i++)
134 var ar2Dim= arrSeq2[i];
135 sfarray2= new VBArray( arr1[i]);
136 arr2= sfarray2.toArray();
137 for ( j=
0; j < arr2.length; j++)
139 var ar1Dim= ar2Dim[j];
140 sfarray3= new VBArray( arr2[j]);
141 arr3= sfarray3.toArray();
142 // document.write(arr3[j].toString());
143 if( ! isEqualAr( arrSeq2[i][j], arr3))
150 Log.print( bOk,
"methodSequence2");
152 ret= oletest.methodXInterface( arObj);
153 _ret= new VBArray( ret).toArray();
157 if( _ret[i] !== arObj[i])
163 Log.print( bOk,
"methodXInterface");
166 ret= oletest.methodXEventListeners( arEventListener);
167 _ret= new VBArray(ret).toArray();
171 if( ! _ret[key].disposingCalled())
177 Log.print( bOk,
"methodXEventListeners");
179 ret= oletest.methodXEventListenersMul( arArEventListener);
180 _ret= new VBArray(ret).toArray();
184 _ret2= new VBArray(_ret[key]).toArray();
187 if( ! _ret2[key2].disposingCalled())
194 Log.print( bOk,
"methodXEventListenersMul");
196 document.writeln(
"<br>");
197 oletest.AttrByte = arr;
198 ret= oletest.AttrByte;
199 _ret= new VBArray( ret).toArray();
200 Log.print( isEqualAr( arr, _ret),
"AttrByte");
202 oletest.AttrFloat= arrDouble;
203 ret= oletest.AttrFloat;
204 _ret= new VBArray( ret).toArray();
206 if( (arrDouble.length == _ret.length)
207 && (_ret[
0]
> 1.2344 && _ret[
0] <
1.2346)
208 && (_ret[
1]
> 12.344 && _ret[
1] <
12.346)
209 && (_ret[
2]
> 123.44 && _ret[
2] <
123.46)
210 && (_ret[
3]
> 1234.4 && _ret[
3] <
1234.6)
211 && (_ret[
4]
> 12344 && _ret[
4] <
12346))
213 Log.print( bOk,
"AttrFloat");
215 oletest.AttrDouble= arrDouble;
216 ret= oletest.AttrDouble;
217 _ret= new VBArray( ret).toArray();
218 Log.print( isEqualAr( arrDouble, _ret),
"AttrDouble");
220 oletest.AttrBool= arrBool;
221 ret= oletest.AttrBool;
222 _ret= new VBArray( ret).toArray();
223 Log.print( isEqualAr( arrBool, _ret),
"AttrBool");
225 oletest.AttrShort= arr;
226 ret= oletest.AttrShort;
227 _ret= new VBArray( ret).toArray();
228 Log.print( isEqualAr( arr, _ret),
"AttrShort");
230 oletest.AttrUShort= arr;
231 ret= oletest.AttrUShort;
232 _ret= new VBArray( ret).toArray();
233 Log.print( isEqualAr( arr, _ret),
"AttrUShort");
235 oletest.AttrLong= arr;
236 ret= oletest.AttrLong;
237 _ret= new VBArray( ret).toArray();
238 Log.print( isEqualAr( arr, _ret),
"AttrLong");
240 oletest.AttrULong= arr;
241 ret= oletest.AttrULong;
242 _ret= new VBArray( ret).toArray();
243 Log.print( isEqualAr( arr, _ret),
"AttrULong");
245 oletest.AttrChar= arrChar;
246 ret= oletest.AttrChar;
247 _ret= new VBArray(ret).toArray();
249 if( _ret.length == arrChar.length && _ret[
0] ==
49 && _ret[
1] ==
65 && _ret[
2] ==
32 && _ret[
3] ==
55)
251 Log.print( bOk,
"AttrChar");
253 oletest.AttrString= arrString;
254 ret= oletest.AttrString;
255 _ret= new VBArray( ret).toArray();
256 Log.print( isEqualAr( arrString, _ret),
"AttrString");
258 oletest.AttrAny= arrAny;
259 ret= oletest.AttrAny;
260 _ret= new VBArray( ret).toArray();
261 Log.print( isEqualAr( arrAny, _ret),
"AttrAny");
263 oletest.AttrSequence= arrSeq;
264 ret= oletest.AttrSequence;
265 _ret= new VBArray( ret).toArray();
266 for( i=
0; i < _ret.length; i++)
268 sfarray2= new VBArray( _ret[i]);
269 var arr2= sfarray2.toArray();
270 if( ! isEqualAr(arrSeq[i], arr2))
276 Log.print( bOk,
"AttrSequence");
278 oletest.AttrSequence2= arrSeq2;
279 ret= oletest.AttrSequence2;
280 arr1= new VBArray( ret).toArray();
281 for( i=
0; i < arr1.length; i++)
283 var ar2Dim= arrSeq2[i];
284 sfarray2= new VBArray( arr1[i]);
285 arr2= sfarray2.toArray();
286 for ( j=
0; j < arr2.length; j++)
288 var ar1Dim= ar2Dim[j];
289 sfarray3= new VBArray( arr2[j]);
290 arr3= sfarray3.toArray();
291 if( ! isEqualAr( arrSeq2[i][j], arr3))
298 Log.print( bOk,
"AttrSequence2");
300 oletest.AttrXInterface= arObj;
301 ret= oletest.AttrXInterface;
302 _ret= new VBArray( ret).toArray();
306 if( _ret[i] !== arObj[i])
312 Log.print( bOk,
"AttrXInterface");
314 ret= oletest.methodXInterface( arObj);
315 _ret= new VBArray( ret);
316 _ret= _ret.toArray();
320 if( _ret[i] !== arObj[i])
326 Log.print( bOk,
"methodXInterface");
327 //======================================================================================
328 document.writeln(
"<br>");
329 var inVal, outVal, retVal;
330 outVal = new Array();
333 retVal = oletest.in_methodByte(inVal)
334 oletest.testout_methodByte( outVal );
335 Log.print( retVal == inVal,
"in_methodByte");
336 Log.print( outVal[
0] == inVal,
"testout_methodByte");
339 retVal = oletest.in_methodFloat(inVal);
340 oletest.testout_methodFloat( outVal );
341 Log.print( retVal
> 3.14 && retVal <
3.15,
"in_methodFloat");
342 Log.print( outVal[
0]
> 3.13 && outVal[
0] <
3.15,
"testout_methodFloat");
343 //Log.print( outVal[
0] == inVal,
"testout_methodFloat");
345 retVal = oletest.in_methodDouble(inVal)
346 oletest.testout_methodDouble( outVal );
347 Log.print( retVal == inVal,
"in_methodDouble");
348 Log.print( outVal[
0] ==
3.14,
"testout_methodDouble" );
351 retVal = oletest.in_methodBool(inVal);
352 oletest.testout_methodBool( outVal );
353 Log.print(retVal == inVal,
"in_methodBool");
354 Log.print( outVal[
0] == true,
"testout_methodBool");
357 retVal = oletest.in_methodShort(inVal);
358 oletest.testout_methodShort( outVal );
359 Log.print(retVal == inVal,
"in_methodShort");
360 Log.print( outVal[
0] == inVal,
"testout_methodShort");
362 retVal = oletest.in_methodUShort(inVal);
363 oletest.testout_methodUShort( outVal );
364 Log.print(retVal == inVal,
"in_methodUShort");
365 Log.print( outVal[
0] == inVal,
"testout_methodUShort");
367 retVal = oletest.in_methodLong(inVal);
368 oletest.testout_methodLong( outVal );
369 Log.print(retVal == inVal,
"in_methodLong");
370 Log.print( outVal[
0] == inVal,
"testout_methodLong");
372 retVal = oletest.in_methodULong(inVal);
373 oletest.testout_methodULong( outVal );
374 Log.print(retVal == inVal,
"in_methodULong");
375 Log.print( outVal[
0] == inVal,
"testout_methodULong");
377 retVal = oletest.in_methodChar(inVal);
378 oletest.testout_methodChar( outVal );
379 Log.print(retVal == inVal,
"in_methodChar");
380 Log.print( outVal[
0] == inVal,
"testout_methodChar");
382 inVal =
"Hello World";
383 retVal = oletest.in_methodString(inVal);
384 oletest.testout_methodString( outVal );
385 Log.print(retVal == inVal,
"in_methodString");
386 Log.print( outVal[
0] == inVal,
"testout_methodString");
388 retVal = oletest.in_methodAny(inVal);
389 oletest.testout_methodAny( outVal );
390 Log.print(retVal == inVal,
"in_methodAny");
391 Log.print( outVal[
0] == inVal,
"testout_methodAny");
393 inVal = new Object();
394 retVal = oletest.in_methodXInterface(inVal);
395 oletest.testout_methodXInterface(outVal);
396 Log.print(retVal === inVal,
"in_methodXInterface");
397 Log.print(outVal[
0] === inVal,
"testout_methodXInterface");
400 retVal = oletest.in_methodXInterface(inVal);
401 oletest.testout_methodXInterface(outVal);
402 Log.print(retVal === inVal,
"in_methodXInterface");
403 Log.print(outVal[
0] === inVal,
"testout_methodXInterface");
406 oletest.testout_methodSequence( outVal );
407 var arr= new VBArray( outVal[
0]).toArray();
408 Log.print( isEqualAr(arr, new Array(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9)),
"testout_methodSequence");
410 oletest.testout_methodSequence2( outVal );
411 var arr= new VBArray( outVal[
0]).toArray();
415 for( i=
0; i < arr.length; i++)
417 var arr2= new VBArray( arr[i]).toArray();
418 if( ! isEqualAr( arr2, new Array(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9)))
425 Log.print( bOk,
"testout_methodSequence2");
427 oletest.testout_methodMulParams1( outVal, outVal2 );
428 Log.print( outVal[
0] ==
999 && outVal2[
0] ==
1111,
"testout_methodMulParams1");
430 oletest.testout_methodMulParams2( outVal, outVal2, outVal3 );
431 Log.print( outVal[
0] ==
1111 && outVal2[
0] ==
1222 && outVal3[
0] ==
" another string",
432 "testout_methodMulParams2");
434 oletest.testout_methodMulParams3(
"hallo", outVal );
435 Log.print( outVal[
0] ==
"Out Hallo!",
"testout_methodMulParams3");
440 oletest.testout_methodMulParams4( in1, outVal, in2, outVal2, in3 );
441 Log.print( (outVal[
0]
> 4.13 && outVal[
0] <
4.15) && (outVal2[
0] ==
1112),
"testout_methodMulParams4");
443 document.writeln(
"<p>");
447 oletest.testinout_methodByte( outVal );
448 oletest.testinout_methodByte( outVal );
449 Log.print( outVal[
0] == inVal,
"testinout_methodByte");
453 oletest.testinout_methodFloat( outVal );
454 oletest.testinout_methodFloat( outVal );
455 Log.print( outVal[
0]
> 3.13 && outVal[
0] <
3.15,
"testinout_methodFloat");
459 oletest.testinout_methodDouble( outVal );
460 oletest.testinout_methodDouble( outVal );
461 Log.print( outVal[
0] == inVal,
"testinout_methodDouble");
465 oletest.testinout_methodBool( outVal );
466 oletest.testinout_methodBool( outVal );
467 Log.print( outVal[
0] == inVal,
"testinout_methodBool");
471 oletest.testinout_methodShort( outVal );
472 oletest.testinout_methodShort( outVal );
473 Log.print( outVal[
0] == inVal,
"testinout_methodShort");
477 oletest.testinout_methodUShort( outVal );
478 oletest.testinout_methodUShort( outVal );
479 Log.print( outVal[
0] == inVal,
"testinout_methodUShort");
483 oletest.testinout_methodLong( outVal );
484 oletest.testinout_methodLong( outVal );
485 Log.print( outVal[
0] == inVal,
"testinout_methodLong");
489 oletest.testinout_methodULong( outVal );
490 oletest.testinout_methodULong( outVal );
491 Log.print( outVal[
0] == inVal,
"testinout_methodULong");
495 oletest.testinout_methodChar( outVal );
496 oletest.testinout_methodChar( outVal );
498 Log.print( outVal[
0] ==
66,
"testinout_methodChar");
500 inVal =
"Hello World 2!";
502 oletest.testinout_methodString( outVal );
503 oletest.testinout_methodString( outVal );
504 Log.print( outVal[
0] == inVal,
"testinout_methodString");
506 inVal = new Object();
508 oletest.testinout_methodAny( outVal );
509 oletest.testinout_methodAny( outVal );
510 Log.print( outVal[
0] === inVal,
"testinout_methodAny");
514 oletest.testinout_methodSequence( outVal );
515 oletest.testinout_methodSequence( outVal );
516 retVal = new VBArray(outVal[
0]).toArray();
518 Log.print( isEqualAr(retVal, new Array(
3,
4,
5,
6,
7)),
"testinout_methodSequence");
522 oletest.testinout_methodSequence2( outVal );
523 var arr= new VBArray( outVal[
0]).toArray();
528 var tmpArr= new Array(
2,
4,
6,
8,
0);
529 for( i=
0; i < arr.length; i++)
531 var arr2= new VBArray( arr[i]).toArray();
532 if( ! isEqualAr( arr2, tmpArr))
539 Log.print( bOk,
"testinout_methodSequence2");
542 var ob= new Object();
543 var sInVal=
"this is a string"
546 oletest.testinout_methodXInterface( outVal);
547 Log.print( outVal[
0].value ==
"out",
"testinout_methodXInterface");
548 document.writeln(
"<p>");
551 ret= oletest.methodAnyTest1( i);
552 Log.print( i == ret,
"methodAnyTest1");
555 ret= oletest.methodAnyTest1( i);
556 Log.print( i == ret,
"methodAnyTest1");
559 ret= oletest.methodAnyTest1( i);
560 Log.print( i == ret,
"methodAnyTest1");
563 ret= oletest.methodAnyTest1( i);
564 var arr= new VBArray( ret).toArray();
565 Log.print( isEqualAr(arr, arrInt),
"methodAnyTest1");
567 var obj= new Object();
568 ret= oletest.methodAnyTest1( obj);
569 Log.print( obj == ret,
"methodAnyTest1");
572 document.writeln(
"<p>");
576 ret= oletest.AttrAny2;
577 Log.print( i == ret,
"AttrAny2");
581 ret= oletest.AttrAny2;
582 Log.print( i == ret,
"AttrAny2");
586 ret= oletest.AttrAny2;
587 Log.print( i == ret,
"AttrAny2");
591 ret= oletest.AttrAny2;
592 var arr= new VBArray( ret).toArray();
593 Log.print( isEqualAr(arr, arrInt),
"AttrAny2");
595 var obj= new Object();
596 oletest.AttrAny2= obj;
597 ret= oletest.AttrAny2;
598 Log.print( obj == ret,
"AttrAny2");
601 document.writeln(
"<p>");
602 // Structs ----------------------------------------------
604 /* var struct= oletest._GetStruct(
"com.sun.star.beans.Property"); */
605 /* struct.Attributes=
1; */
606 /* struct.Handle=
2; */
607 /* struct.Name=
"some Property" */
608 /* oletest.methodStruct( struct); */
610 var ret= oletest.retMethodStruct();
611 Log.print( ret.Attributes ==
127 && ret.Handle ==
255 && ret.Name ==
"OleTest_Property",
"retMethodStruct");
613 var astruct= oletest._GetStruct(
"com.sun.star.beans.Property");
614 astruct.Attributes=
1;
616 astruct.Name=
"some Property"
617 oletest.AttrStruct= astruct;
619 var ret= oletest.AttrStruct;
620 Log.print( ret.Attributes ==
127 && ret.Handle ==
255 && ret.Name ==
"OleTest_Property",
"AttrStruct");
622 // The function returns the struct. Since structs are passed by value the returned struct
623 // will be wrapped in another IDispatch object
624 astruct.Attributes=
1;
626 astruct.Name=
"Property";
627 ret= oletest.methodStruct2( astruct);
628 Log.print( ret.Attributes ==
1 && ret.Handle ==
2 && ret.Name ==
"Property",
"methodStruct2");
631 document.writeln(
"<p>");
632 // Test Identity from COM objects in UNO
633 var listener1= new XEventListener_Impl();
634 oletest.setObject(listener1);
635 ret= oletest.isSame(listener1);
636 Log.print2( ret,
"Ok Testing identity of COM objects<br>",
"Failed Testing identity of COM objects<br>");
638 var oletest2= oletest.getThis();
639 ret= oletest === oletest2;
640 Log.print2(ret,
"Ok Testing identity of UNO objects<br>",
"Failed Testing identity of UNO objects<br>");
646 function isEqualAr( ar1, ar2)
649 if( ar1.length == ar2.length)
654 // document.writeln( ar1[x] +
" ");
655 // document.writeln( ar2[x] +
" ");
656 if( ar1[x] != ar2[x])
666 /* function isEqualAr2( ar1, ar2) */
669 /* var bOk= false; */
670 /* if( ar1.length == ar2.length) */
675 /* document.write( ar1[x]); */
676 /* document.write( ar2[x]); */
677 /* if( ! isEqualAr( ar1[x], ar2[x])) */
688 function XEventListener_Impl()
690 this._environment=
"JScript";
691 this._implementedInterfaces= new Array(
"com.sun.star.lang.XEventListener");
694 this.disposing= XEventListener_disposing;
696 this.bdisposingCalled= false;
698 this.resetDisposing= XEventListener_resetDisposing;
699 this.disposingCalled= XEventListener_disposingCalled;
702 function XEventListener_disposing( source)
705 alert(
"JScript Event Listener \n disposing is being called");
706 this.bdisposingCalled= true;
709 function XEventListener_resetDisposing()
711 this.bdisposingCalled= false;
714 function XEventListener_disposingCalled()
716 return this.bdisposingCalled;
720 <script language=
"VBScript">
721 Function runVBTest( Log)
722 document.writeln(
"================================================================================<br>")
723 document.writeln(
"VB Script<br>")
724 document.writeln(
"================================================================================<p>")
727 arrInt= Array(
1,
2,
3,-
4,-
5,
0)
728 arrUInt= Array(
1,
2,
3,
4,
5)
729 arrDouble= Array(
1.2345,
12.345,
123.45,
1234.5,
12345)
730 arrBool= Array( true, false, true, false, true)
731 arrChar= Array(
"A",
"B",
67)
732 arrString= Array(
"hamburger",
"cheeseburger",
"chicken nuggets",
"chicken wings" ,
"pizza")
733 arrAny= Array(
100,
100.1235,
"hallo")
740 arrDim2Int(j,i) = i*
3 + j
745 Dim arrDim3Int(
3,
2,
1)
749 arrDim3Int(k,j,i)= i*
3 + j*
4 + k
756 Set arrXEvent(i)= new VBEventListener
762 Set arrXEvent2(j,i)= new VBEventListener
768 ret= oletest.methodByte( arrUInt)
769 Log.print isEqualVBAr( ret, arrUInt),
"methodByte"
771 ret= oletest.methodFloat( arrDouble)
772 Log.print isEqualVBAr( ret, arrDouble),
"methodFloat"
774 ret= oletest.methodDouble( arrDouble)
775 Log.print isEqualVBAr( ret, arrDouble),
"methodDouble"
777 ret= oletest.methodBool( arrBool)
778 Log.print isEqualVBAr( ret, arrBool),
"methodBool"
780 ret= oletest.methodShort( arrInt)
781 Log.print isEqualVBAr( ret, arrInt),
"methodShort"
783 ret= oletest.methodUShort( arrUInt)
784 Log.print isEqualVBAr( ret, arrUInt),
"methodUShort"
786 ret= oletest.methodLong( arrInt)
787 Log.print isEqualVBAr( ret, arrInt),
"methodLong"
789 ret= oletest.methodULong( arrUInt)
790 Log.print isEqualVBAr( ret, arrUInt),
"methodULong"
792 ret= oletest.methodChar( arrChar)
794 if ret(
0) =
65 AND ret(
1) =
66 AND ret(
2) =
67 then
797 Log.print bOk,
"methodChar"
799 ret= oletest.methodString( arrString)
800 Log.print isEqualVBAr( ret, arrString),
"methodString"
802 ret= oletest.methodAny( arrAny)
803 Log.print isEqualVBAr( ret, arrAny),
"methodAny"
806 ret= oletest.methodSequence( arrDim2Int)
813 if arr1(j) <
> arrDim2Int(j,i) then
819 Log.print bOk,
"methodSequence"
821 ret= oletest.methodSequence2( arrDim3Int)
829 If arr2(k) <
> arrDim3Int(k,j,i) then
836 Log.print bOk,
"methodSequence2"
838 ret= oletest.methodXInterface(arrXEvent)
840 numArg= UBound( arrXEvent) - LBound( arrXEvent) +
1
841 numRet= UBound( ret) - LBound( ret) +
1
842 If numArg = numRet then
843 For i=
0 To numArg -
1
844 If NOT (arrXEvent(i) Is ret(i)) then
850 Log.print bOk,
"methodXInterface"
852 ret= oletest.methodXEventListeners( arrXEvent)
855 If arrXEvent(i).disposingCalled = false then
860 Log.print bOk,
"methodXEventListeners"
862 ret= oletest.methodXEventListenersMul(arrXEvent2)
866 If arrXEvent2(j,i).disposingCalled = false then
872 Log.print bOk,
"methodXEventListenersMul"
874 ' Attributes ------------------------------------------------------
875 document.writeln(
"<br>" )
876 oletest.AttrByte= arrUInt
877 ret= oletest.AttrByte
878 Log.print isEqualVBAr( arrUInt, ret),
"AttrByte"
880 oletest.AttrFloat= arrDouble
881 ret= oletest.AttrFloat
882 Log.print isEqualVBAr( arrDouble, ret),
"AttrFloat"
884 oletest.AttrDouble= arrDouble
885 ret= oletest.AttrDouble
886 Log.print isEqualVBAr( arrDouble, ret),
"AttrDouble"
888 oletest.AttrBool= arrBool
889 ret= oletest.AttrBool
890 Log.print isEqualVBAr( arrBool, ret),
"AttrBool"
892 oletest.AttrShort= arrInt
893 ret= oletest.AttrShort
894 Log.print isEqualVBAr( arrInt, ret),
"AttrShort"
896 oletest.AttrUShort= arrUInt
897 ret= oletest.AttrUShort
898 Log.print isEqualVBAr( arrUInt, ret),
"AttrUShort"
900 oletest.AttrLong= arrInt
901 ret= oletest.AttrLong
902 Log.print isEqualVBAr( arrInt, ret),
"AttrLong"
904 oletest.AttrULong= arrUInt
905 ret= oletest.AttrULong
906 Log.print isEqualVBAr( arrUInt, ret),
"AttrULong"
908 oletest.AttrChar= arrChar
909 ret= oletest.AttrChar
911 if ret(
0) =
65 AND ret(
1) =
66 AND ret(
2) =
67 then
914 Log.print bOk,
"AttrChar"
916 oletest.AttrString= arrString
917 ret= oletest.AttrString
918 Log.print isEqualVBAr( arrString, ret),
"AttrString"
920 oletest.AttrSequence= arrDim2Int
921 ret= oletest.AttrSequence
926 if arr1(j) <
> arrDim2Int(j,i) then
932 Log.print bOk,
"AttrSequence"
934 oletest.AttrSequence2= arrDim3Int
935 ret= oletest.AttrSequence2
943 If arr2(k) <
> arrDim3Int(k,j,i) then
950 Log.print bOk,
"AttrSequence2"
952 oletest.AttrXInterface= arrXEvent
953 ret= oletest.AttrXInterface
955 numArg= UBound( arrXEvent) - LBound( arrXEvent) +
1
956 numRet= UBound( ret) - LBound( ret) +
1
957 If numArg = numRet then
958 For i=
0 To numArg -
1
959 If NOT (arrXEvent(i) Is ret(i)) then
965 Log.print bOk,
"AttrXInterface"
967 'out params ================================================================================
968 document.writeln(
"<p>")
969 Dim inVal, outVal, retVal
972 retVal = oletest.in_methodByte(inVal)
973 oletest.testout_methodByte outVal
974 Log.print inVal = retVal,
"in_methodByte"
975 Log.print outVal = inVal,
"testout_methodByte"
978 retVal = oletest.in_methodFloat(inVal)
979 oletest.testout_methodFloat outVal
980 Log.print inVal = retVal,
"in_methodFloat"
981 Log.print outVal
> 3.13 AND outVal <
3.15,
"testout_methodFloat"
984 retVal = oletest.in_methodDouble(inVal)
985 oletest.testout_methodDouble outVal
986 Log.print inVal = retVal,
"in_methodDouble"
987 Log.print outVal =
3.14,
"testout_methodDouble"
990 retVal = oletest.in_methodBool(inVal)
991 oletest.testout_methodBool outVal
992 Log.print inVal = retVal,
"in_methodBool"
993 Log.print outVal = inVal,
"testout_methodBool"
996 retVal = oletest.in_methodShort(inVal)
997 oletest.testout_methodShort outVal
998 Log.print inVal = retVal,
"in_methodShort"
999 Log.print outVal = inVAl,
"testout_methodShort"
1002 retVal = oletest.in_methodUShort(inVal)
1003 oletest.testout_methodUShort outVal
1004 Log.print inVal = retVal,
"in_methodUShort"
1005 Log.print outVal = inVal,
"testout_methodUShort"
1008 retVal = oletest.in_methodLong(inVal)
1009 oletest.testout_methodLong outVal
1010 Log.print inVal = retVal,
"in_methodLong"
1011 Log.print outVal = inVal,
"testout_methodLong"
1014 retVal = oletest.in_methodULong(inVal)
1015 oletest.testout_methodULong outVal
1016 Log.print inVal = retVal,
"in_methodULong"
1017 Log.print outVal = inVal,
"testout_methodULong"
1020 retVal = oletest.in_methodChar(inVal)
1021 oletest.testout_methodChar outVal
1022 Log.print inVal = retVal,
"in_methodChar"
1023 Log.print outVal =
65,
"testout_methodChar"
1025 inVal =
"Hello World 3!"
1026 retVal = oletest.in_methodString(inVal)
1027 oletest.testout_methodString outVal
1028 Log.print inVal = retVal,
"in_methodString"
1029 Log.print outVal = inVal,
"testout_methodString"
1031 inVal =
"Hello World 4!"
1032 retVal = oletest.in_methodAny(inVal)
1033 oletest.testout_methodAny outVal
1034 Log.print outVal = inVal,
"testout_methodAny"
1036 oletest.testout_methodSequence outVal
1037 Log.print isEqualVBAr(outVal, Array(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9)),
"testout_methodSequence"
1039 oletest.testout_methodSequence2 outVal
1040 count= UBound( outVal) - LBound( outVal) +
1
1043 For Each ar In outVal
1044 ret= isEqualVBAr(ar, Array(
0,
1,
2,
3,
4,
5,
6,
7,
8,
9))
1050 Log.print ret,
"testout_methodSequence2"
1054 oletest.testout_methodMulParams1 outVal, outVal2
1056 If outVal =
999 AND outVal2 =
1111 Then
1059 Log.print ret,
"testout_methodMulParams1"
1064 oletest.testout_methodMulParams2 outVal, outVal2, outVal3
1066 If outVal =
1111 AND outVal2 =
1222 AND outVal3 =
" another string" Then
1069 Log.print ret,
"testout_methodMulParams2"
1071 document.writeln(
"missing: testout_methodMulParams3 <br>")
1072 document.writeln(
"missing: testout_methodMulParams4 <br>")
1075 oletest.testout_methodXInterface outVal
1077 If outVal Is oletest Then
1080 Log.print ret,
"testout_methodXInterface"
1083 document.writeln(
"missing: testout_methodXInterface <br>")
1087 oletest.testinout_methodByte outVal
1088 oletest.testinout_methodByte outVal
1089 Log.print inVal = outVal,
"testinout_methodByte"
1092 document.writeln(
"missing: testinout_methodFloat <br>")
1093 document.writeln(
"missing: testinout_methodDouble <br>")
1094 document.writeln(
"missing: testinout_methodBool <br>")
1095 document.writeln(
"missing: testinout_methodShort <br>")
1096 document.writeln(
"missing: testinout_methodUShort <br>")
1097 document.writeln(
"missing: testinout_methodLong <br>")
1098 document.writeln(
"missing: testinout_methodULong <br>")
1099 document.writeln(
"missing: testinout_methodChar <br>")
1100 document.writeln(
"missing: testinout_methodString <br>")
1101 document.writeln(
"missing: testinout_methodAny <br>")
1102 document.writeln(
"missing: testinout_methodSequence <br>")
1103 document.writeln(
"missing: testinout_methodSequence2 <br>")
1104 document.writeln(
"missing: testinout_methodXInterface <br>")
1105 document.writeln(
"missing: methodAnyTest1 <br>")
1106 document.writeln(
"missing: methodAnyTest1 <br>")
1107 document.writeln(
"missing: methodAnyTest1 <br>")
1108 document.writeln(
"missing: methodAnyTest1 <br>")
1109 document.writeln(
"missing: methodAnyTest1 <br>")
1110 document.writeln(
"missing: AttrAny2 <br>")
1111 document.writeln(
"missing: methodAnyTest1 <br>")
1112 document.writeln(
"missing: methodAnyTest1 <br>")
1113 document.writeln(
"missing: methodAnyTest1 <br>")
1114 document.writeln(
"missing: methodAnyTest1 <br>")
1115 document.writeln(
"missing: methodAnyTest1 <br>")
1116 document.writeln(
"missing: retMethodStruct <br>")
1117 document.writeln(
"missing: AttrStruct <br>")
1118 document.writeln(
"missing: methodStruct2 <br>")
1120 ' Test Identity from COM objects in UNO
1122 Set listener1= new VBEventListener
1123 call oletest.setObject( listener1)
1124 ret= oletest.isSame(listener1)
1125 Log.print2 ret,
"Ok Testing identity of COM objects <br>",
"Failed Testing identity of COM objects<br>"
1126 ' Test identity of UNO objects
1128 set oletest2= oletest.getThis()
1129 ret= oletest Is oletest2
1130 Log.print2 ret,
"Ok Testing identity of UNO objects<br>",
"Failed Testing identity of UNO objects<br>"
1135 Function isEqualVBAr( arr1, arr2)
1137 s1= UBound( arr1) - LBound( arr1) +
1
1138 s2= UBound( arr2) - LBound( arr2) +
1
1144 if arr1(i) <
> arr2(i) then
1154 'The listener object
1156 Class VBEventListener
1157 Dim Bridge_ImplementedInterfaces(
0)
1158 Dim bDisposingCalled
1160 'XEventListener::disposing
1161 Function disposing( source)
1162 bDisposingCalled= true
1165 Sub Class_Initialize()
1166 bDisposingCalled= false
1167 Bridge_ImplementedInterfaces(
0)=
"com.sun.star.lang.XEventListener"
1170 Function resetDisposing()
1171 bDisposingCalled= false
1174 Function disposingCalled()
1175 disposingCalled= bDisposingCalled
1183 Set factory= GetObject(
"",
"com.sun.star.ServiceManager")
1185 Set oletest= factory.createInstance(
"oletest.OleTest")
1188 arrInt= Array(
1,
2,
3,
4,
5)
1189 arrInt2= Array( -
1, -
2,
127,
128,
0)
1190 arrDouble= Array(
1.1,
2.2,
3.3,
4.4,
5.5)
1191 arrBool= Array(
0,
1,
0,
2,
0)
1192 arrLong= Array( &Hff, &Hffff, &Hffffff, &Hffffffff)
1193 arrString= Array(
"Chicken Wings",
"Cheeseburger",
"Hamburger")
1194 arrChar= Array(
"a",
65,
"M")
1195 arrAny= Array(
"Mickey",
3.14,
100,
"A")
1200 arrDim2Int(i,j) = i*
2 + j
1204 Dim arrDim3Int(
1,
1,
1)
1208 arrDim3Int(i,j,k) = i*
2 + j*
2 + k
1220 // In Out Parameter --------------------------------------------------
1223 document.write
"param: " & CStr( a) &
"<br>"
1224 oletest.testinout_methodByte a
1228 document.write
"param: " & CStr( a) &
"<br>"
1229 oletest.testinout_methodDouble a
1233 document.write
"param: "& CStr( a) &
"<br>"
1234 oletest.testinout_methodBool a
1238 document.write
"param: "& CStr( a) &
"<br>"
1239 oletest.testinout_methodShort a
1243 document.write
"param: "& CStr( a) &
"<br>"
1244 oletest.testinout_methodUShort a
1248 document.write
"param: "& CStr( a) &
"<br>"
1249 oletest.testinout_methodLong a
1253 document.write
"param: "& CStr( a) &
"<br>"
1254 oletest.testinout_methodULong a
1257 a=
"ein test string"
1258 document.write
"param: "& CStr( a) &
"<br>"
1259 oletest.testinout_methodString a
1263 document.write
"param: "& CStr( a) &
"<br>"
1264 oletest.testinout_methodChar a
1267 a=
"Ein String im Any"
1268 document.write
"param: "& CStr( a) &
"<br>"
1269 oletest.other_methodAnyIn a
1274 document.write
"param: "& CStr( a) &
"<br>"
1275 oletest.testout_methodByte( a)
1277 // Attributes -----------------------------------------------------------------
1279 document.write
"set: "
1281 oletest.AttrByte= arrInt
1283 call printArrayEx(
"<br> get: ",
"<br>", b)
1285 document.write
"set: "
1286 printArray arrDouble
1287 oletest.AttrDouble= arrDouble
1288 b= oletest.AttrDouble
1289 call printArrayEx(
"<br> get: ",
"<br>", b)
1291 document.write
"set: "
1292 printArray arrBool :
1293 oletest.AttrBool= arrBool
1295 call printArrayEx(
"<br> get: ",
"<br>", b)
1297 document.write
"set: "
1298 printArray arrInt2 :
1299 oletest.AttrShort= arrInt2
1300 b= oletest.AttrShort
1301 call printArrayEx(
"<br> get: ",
"<br>", b)
1303 document.write
"set: "
1305 oletest.AttrUShort= arrInt
1306 b= oletest.AttrUShort
1307 call printArrayEx(
"<br> get: ",
"<br>", b)
1309 document.write
"set: "
1311 oletest.AttrLong= arrInt2
1313 call printArrayEx(
"<br> get: ",
"<br>", b)
1315 document.write
"set: "
1317 oletest.AttrULong= arrInt
1318 b= oletest.AttrULong
1319 call printArrayEx(
"<br> get: ",
"<br>", b)
1321 document.write
"set: "
1322 printArray arrString
1323 oletest.AttrString= arrString
1324 b= oletest.AttrString
1325 call printArrayEx(
"<br> get: ",
"<br>", b)
1327 document.write
"set: "
1329 oletest.AttrChar= arrChar
1331 call printArrayEx(
"<br> get: ",
"<br>", b)
1333 document.write
"set: "
1335 oletest.AttrAny= arrAny
1337 call printArrayEx(
"<br> get: ",
"<br>", b)
1340 document.write
"set: <br>"
1341 printArray2 arrDim2Int :
1342 oletest.AttrSequence= arrDim2Int
1343 ret= oletest.AttrSequence
1344 document.write
"get: "
1346 document.write
"<br> array: "
1347 for each val2 in val
1355 call oletest.testinout_methodByte( aByte)
1361 set struct= oletest.Bridge_GetStruct(
"com.sun.star.beans.Property")
1362 struct.Attributes=
1
1364 struct.Name=
"some Property"
1365 oletest.methodStruct struct
1368 set struct= oletest.retMethodStruct()
1369 alert(
"Property::Attributes : " & struct.Attributes & vblf &
" Property::Handle : " _
1370 & struct.Handle & vblf &
" Property::Name : " & struct.Name)
1373 set struct= oletest.Bridge_GetStruct(
"com.sun.star.beans.Property")
1374 struct.Attributes=
1
1376 struct.Name=
"some Property"
1377 oletest.AttrStruct= struct
1379 set struct2= oletest.AttrStruct
1380 alert(
"property get: " & vblf &
"Property::Attributes : " & struct2.Attributes & _
1381 vblf &
" Property::Handle : " & struct2.Handle & vblf &
" Property::Name : " _
1386 sub printArray( arr)
1387 document.write
"array: "
1389 document.write CStr(val) &
" "
1393 // print a
2 dimensional Array
1395 sub printArray2( arr)
1396 elements1= UBound( arr,
1) - LBound( arr,
1) +
1
1397 elements2= UBound( arr,
2) - LBound( arr,
2) +
1
1399 For i=
0 To elements1 -
1
1400 document.write(
"array " & CStr( i) &
": " )
1401 For j=
0 To elements2 -
1
1402 document.write CStr( arr(i,j))
1404 document.write(
"<br>")
1408 sub printArrayEx( pre, post, array)
1415 <script language=
"JScript">
1416 var arFunctions= new Array();
1417 arFunctions[
"methodByte"]=
"sequence<byte> methodByte( [in] sequence<byte> aSeq )";
1418 arFunctions[
"methodFloat"]=
"sequence<float> methodFloat( [in] sequence<float> aSeq)";
1419 arFunctions[
"methodDouble"]=
"sequence<double> methodDouble( [in] sequence<double> aSeq)";
1420 arFunctions[
"methodBool"]=
"sequence<boolean> methodBool( [in] sequence<boolean> aSeq)";
1421 arFunctions[
"methodShort"]=
"sequence<short> methodShort( [in] sequence<short> aSeq)";
1422 arFunctions[
"methodUShort"]=
"sequence<unsigned short> methodUShort( [in] sequence<unsigned short> aSeq)";
1423 arFunctions[
"methodLong"]=
"sequence<long> methodLong( [in] sequence<long> aSeq)";
1424 arFunctions[
"methodULong"]=
"sequence<unsigned long> methodULong( [in] sequence<unsigned long> aSeq)";
1425 arFunctions[
"methodString"]=
"sequence<string> methodString( [in] sequence<string> aSeq)";
1426 arFunctions[
"methodChar"]=
"sequence<char> methodChar( [in] sequence<char> aSeq)";
1427 arFunctions[
"methodAny"]=
"sequence<any> methodAny ( [in] sequence<any> aSeq)";
1428 arFunctions[
"methodXInterface"]=
"sequence<XInterface> methodXInterface ( [in] sequence<XInterface> aSeq)";
1429 arFunctions[
"methodSequence"]=
"sequence< sequence <long> > methodSequence( [in] sequence< sequence< long > > aSeq)";
1430 arFunctions[
"methodSequence2"]=
"sequence< sequence <sequence <long> > > methodSequence2( [in] sequence< sequence< sequence<long> > > aSeq)";
1431 arFunctions[
"methodXEventListeners"]=
"sequence< com::sun::star::lang::XEventListener > methodXEventListeners( [in] sequence<com::sun::star::lang::XEventListener> aSeq)";
1432 arFunctions[
"methodXEventListenersMul"]=
"sequence< sequence< com::sun::star::lang::XEventListener > > methodXEventListenersMul( [in] sequence< sequence< com::sun::star::lang::XEventListener> > aSeq)";
1433 arFunctions[
"AttrByte"]=
"[attribute] sequence<byte> AttrByte";
1434 arFunctions[
"AttrFloat"]=
"[attribute] sequence<float> AttrFloat";
1435 arFunctions[
"AttrDouble"]=
"[attribute] sequence<double> AttrDouble";
1436 arFunctions[
"AttrBool"]=
"[attribute] sequence<boolean> AttrBool";
1437 arFunctions[
"AttrShort"]=
"[attribute] sequence<short> AttrShort";
1438 arFunctions[
"AttrUShort"]=
"[attribute] sequence<unsigned short> AttrUShort";
1439 arFunctions[
"AttrLong"]=
"[attribute] sequence<long> AttrLong";
1440 arFunctions[
"AttrULong"]=
"[attribute] sequence<unsigned long> AttrULong";
1441 arFunctions[
"AttrString"]=
"[attribute] sequence<string> AttrString";
1442 arFunctions[
"AttrChar"]=
"[attribute] sequence<char> AttrChar";
1443 arFunctions[
"AttrAny"]=
"[attribute] sequence<any> AttrAny";
1444 arFunctions[
"AttrSequence"]=
"[attribute] sequence< sequence<long> > AttrSequence";
1445 arFunctions[
"AttrSequence2"]=
"[attribute] sequence< sequence< sequence <long> > > AttrSequence2";
1446 arFunctions[
"AttrXInterface"]=
"[attribute] sequence< com::sun::star::uno::XInterface > AttrXInterface";
1448 arFunctions[
"testout_methodByte"]=
" void testout_methodByte( [out] byte rOut )";
1449 arFunctions[
"testout_methodFloat"]=
"void testout_methodFloat( [out] float rOut)";
1450 arFunctions[
"testout_methodDouble"]=
"void testout_methodDouble( [out] double rOut)";
1451 arFunctions[
"testout_methodBool"]=
"void testout_methodBool( [out] boolean rOut)";
1452 arFunctions[
"testout_methodShort"]=
"void testout_methodShort( [out] short rOut)";
1453 arFunctions[
"testout_methodUShort"]=
"void testout_methodUShort( [out] unsigned short rOut)";
1454 arFunctions[
"testout_methodLong"]=
"void testout_methodLong( [out] long rOut)";
1455 arFunctions[
"testout_methodULong"]=
"void testout_methodULong( [out] unsigned long rOut)";
1456 arFunctions[
"testout_methodString"]=
"void testout_methodString( [out] string rOut)";
1457 arFunctions[
"testout_methodChar"]=
"void testout_methodChar( [out] char rOut)";
1458 arFunctions[
"testout_methodAny"]=
"void testout_methodAny( [out] any rOut)";
1459 arFunctions[
"testout_methodSequence"]=
"void testout_methodSequence( [out] sequence< long > rOut)";
1460 arFunctions[
"testout_methodSequence2"]=
"void testout_methodSequence2( [out] sequence < sequence< long > > rOut)";
1461 arFunctions[
"testout_methodXInterface"]=
"void testout_methodXInterface( [out] com::sun::star::uno::XInterface rOut)";
1462 arFunctions[
"testout_methodMulParams1"]=
"void testout_methodMulParams1( [out] long rout1, [out] long rout2)";
1463 arFunctions[
"testout_methodMulParams2"]=
"void testout_methodMulParams2( [out] long rout1, [out] long rout2, [out] string rout3)";
1464 arFunctions[
"testout_methodMulParams3"]=
"void testout_methodMulParams3( [in] string sin, [out] string sout)";
1465 arFunctions[
"testout_methodMulParams4"]=
"void testout_methodMulParams4( [in] float in1, [out] float out1, [in] long in2, [out] long out2, [in] long in3)";
1466 arFunctions[
"testinout_methodByte"]=
"void testinout_methodByte( [inout] byte rOut )";
1467 arFunctions[
"testinout_methodFloat"]=
"void testinout_methodFloat( [inout] float rOut)";
1468 arFunctions[
"testinout_methodDouble"]=
"void testinout_methodDouble( [inout] double rOut)";
1469 arFunctions[
"testinout_methodBool"]=
"void testinout_methodBool( [inout] boolean rOut)";
1470 arFunctions[
"testinout_methodShort"]=
"void testinout_methodShort( [inout] short rOut)";
1471 arFunctions[
"testinout_methodUShort"]=
"void testinout_methodUShort( [inout] unsigned short rOut)";
1472 arFunctions[
"testinout_methodLong"]=
"void testinout_methodLong( [inout] long rOut)";
1473 arFunctions[
"testinout_methodULong"]=
"void testinout_methodULong( [inout] unsigned long rOut)";
1474 arFunctions[
"testinout_methodString"]=
"void testinout_methodString( [inout] string rOut)";
1475 arFunctions[
"testinout_methodChar"]=
"void testinout_methodChar( [inout] char rOut)";
1476 arFunctions[
"testinout_methodAny"]=
"void testinout_methodAny( [inout] any rOut)";
1477 arFunctions[
"testinout_methodSequence"]=
"void testinout_methodSequence( [inout] sequence< long > rOut)";
1478 arFunctions[
"testinout_methodSequence2"]=
"void testinout_methodSequence2( [inout] sequence < sequence< long > > rOut)";
1479 arFunctions[
"testinout_methodXInterface"]=
"void testinout_methodXInterface( [inout] com::sun::star::script::XInvocation rOut)";
1480 arFunctions[
"testinout_methodXInterface2"]=
"void testinout_methodXInterface2( [inout] com::sun::star::uno::XInterface rOut)";
1482 arFunctions[
"in_methodByte"]=
"byte in_methodByte( [in] byte rIn )";
1483 arFunctions[
"in_methodFloat"]=
"float in_methodFloat( [in] float rIn);"
1484 arFunctions[
"in_methodDouble"]=
"double in_methodDouble( [in] double rIn)";
1485 arFunctions[
"in_methodBool"]=
"boolean in_methodBool( [in] boolean rIn)";
1486 arFunctions[
"in_methodShort"]=
"short in_methodShort( [in] short rIn)";
1487 arFunctions[
"in_methodUShort"]=
"unsigned short in_methodUShort( [in] unsigned short rIn)";
1488 arFunctions[
"in_methodLong"]=
"long in_methodLong( [in] long rIn)";
1489 arFunctions[
"in_methodULong"]=
"unsigned long in_methodULong( [in] unsigned long rIn)";
1490 arFunctions[
"in_methodHyper"]=
"hyper in_methodHyper( [in] hyper rIn)";
1491 arFunctions[
"in_methodUHyper"]=
"unsigned hyper in_methodHyper( [in] unsigned hyper rIn)";
1492 arFunctions[
"in_methodString"]=
"string in_methodString( [in] string rIn)";
1493 arFunctions[
"in_methodChar"]=
"char in_methodChar( [in] char rIn)";
1494 arFunctions[
"in_methodAny"]=
"any in_methodAny ( [in] any rIn)";
1495 arFunctions[
"in_methodXInterface"]=
"XInterface in_methodXInterface([in] XInterface rIn)";
1498 arFunctions[
"methodAnyTest1"]=
"any methodAnyTest1( [in] any rIn)";
1499 arFunctions[
"AttrAny2"]=
"[attribute] any AttrAny2";
1500 arFunctions[
"retMethodStruct"]=
"com::sun::star::beans::Property retMethodStruct()";
1501 arFunctions[
"AttrStruct"]=
"[attribute] com::sun::star::beans::Property AttrStruct";
1502 arFunctions[
"methodStruct2"]=
"com::sun::star::beans::Property methodStruct2( [in] com::sun::star::beans::Property aProp)";
1505 var factory= new ActiveXObject(
"com.sun.star.ServiceManager");
1506 var oletest= factory.createInstance(
"oletest.OleTest");
1511 runJScriptTest(Log);
1518 this.print= logger_print;
1519 this.print2= logger_print2;
1520 this.summarize= logger_summarize;
1523 function logger_print( bool, method)
1525 this.print2(bool,
"Ok " + arFunctions[method] +
"<br>",
1526 "Failed " + arFunctions[method] +
"<br>");
1529 function logger_print2( bool, okString, failedString)
1532 document.writeln( okString);
1535 document.writeln( failedString);
1536 this.bAllOk= this.bAllOk && false;
1540 function logger_summarize()
1542 document.writeln(
"<p> ==============================================================================<br>");
1544 document.writeln(
"No errors <br>");
1546 document.writeln(
"Error ! The test failed! <br>");