Version 6.4.0.0.beta1, tag libreoffice-6.4.0.0.beta1
[LibreOffice.git] / cli_ure / qa / climaker / testobjects.cs
blob664b0d0e27814d6df92ae31a3d63118738bf2881
1 /*
2 * This file is part of the LibreOffice project.
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/.
8 * This file incorporates work covered by the following license notice:
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 .
19 using System;
20 using System.Reflection;
21 using System.Diagnostics;
22 using uno;
24 using unoidl.test.cliure.climaker;
25 //using unoidl.com.sun.star.uno;
26 using ucss=unoidl.com.sun.star;
29 /* To create this component, the class context (in this assembly) can be used. When
30 createInstanceWithArgumentsAndContext is called on the service manager
31 then the arguments are passed into the ctor.
33 class Component:uno.util.WeakComponentBase, XTest
35 public Component(ucss.uno.XComponentContext ctx) {
36 m_args = new Any[] {new Any(typeof(ucss.uno.XComponentContext), ctx)};
37 m_A2 = 0;
38 m_A4 = 0;
41 public Component(ucss.uno.XComponentContext ctx, uno.Any[] args) {
42 m_args = new Any[args.Length + 1];
43 m_args[0] = new Any(typeof(ucss.uno.XComponentContext), ctx);
44 for (int i = 0; i < args.Length; i ++) {
45 m_args[i+1] = args[i];
49 public Any[] Args {
50 get
52 return m_args;
56 // XTest
57 public int A1 {
58 get {
59 return m_A1;
61 set {
62 m_A1 = value;
66 public int A2 {
67 get {
68 return m_A2;
72 public int A3 {
73 get {
74 return m_A3;
76 set {
77 m_A3 = value;
81 public int A4 {
82 get {
83 return m_A4;
87 public bool test() {
88 return true;
91 public void testOneway()
95 public void testExceptions()
99 public PolyStruct testPolyStruct(PolyStruct val)
101 return val;
104 public void inParameters(bool aBool, byte aByte,
105 short aShort, ushort aUShort,
106 int aInt, uint aUInt,
107 long aLong, ulong aULong,
108 float aFloat, double aDouble,
109 char aChar, string aString,
110 Type aType, uno.Any aAny,
111 Enum2 aEnum, Struct1 aStruct,
112 object aXInterface,
113 unoidl.com.sun.star.lang.XComponent aXComponent,
114 bool[] seqBool)
116 m_Bool = aBool;
117 m_Byte = aByte;
118 m_Short = aShort;
119 m_UShort = aUShort;
120 m_Int = aInt;
121 m_UInt = aUInt;
122 m_Long = aLong;
123 m_ULong = aULong;
124 m_Float = aFloat;
125 m_Double = aDouble;
126 m_Char = aChar;
127 m_String = aString;
128 m_Type = aType;
129 m_Any = aAny;
130 m_Enum2 = aEnum;
131 m_Struct1 = aStruct;
132 m_XInterface = aXInterface;
133 m_XComponent = aXComponent;
134 m_seqBool = seqBool;
138 public void outParameters(out bool aBool, out byte aByte,
139 out short aShort, out ushort aUShort,
140 out int aInt, out uint aUInt,
141 out long aLong, out ulong aULong,
142 out float aFloat, out double aDouble,
143 out char aChar, out string aString,
144 out Type aType, out uno.Any aAny,
145 out Enum2 aEnum, out Struct1 aStruct,
146 out object aXInterface,
147 out unoidl.com.sun.star.lang.XComponent aXComponent,
148 out bool[] seqBool)
150 aBool = m_Bool;
151 aByte = m_Byte;
152 aShort = m_Short;
153 aUShort = m_UShort;
154 aInt = m_Int;
155 aUInt = m_UInt;
156 aLong = m_Long;
157 aULong = m_ULong;
158 aFloat = m_Float;
159 aDouble = m_Double;
160 aChar = m_Char;
161 aString = m_String;
162 aType = m_Type;
163 aAny = m_Any;
164 aEnum = m_Enum2;
165 aStruct = m_Struct1;
166 aXInterface = m_XInterface;
167 aXComponent = m_XComponent;
168 seqBool = m_seqBool;
172 //returns the values which have been set in a previous call
173 //to this function or inParameters.
174 public void inoutParameters(ref bool aBool, ref byte aByte,
175 ref short aShort, ref ushort aUShort,
176 ref int aInt, ref uint aUInt,
177 ref long aLong, ref ulong aULong,
178 ref float aFloat, ref double aDouble,
179 ref char aChar, ref string aString,
180 ref Type aType, ref uno.Any aAny,
181 ref Enum2 aEnum, ref Struct1 aStruct,
182 ref object aXInterface,
183 ref unoidl.com.sun.star.lang.XComponent aXComponent,
184 ref bool[] seqBool)
186 bool _bool = aBool;
187 aBool = m_Bool;
188 m_Bool = _bool;
190 byte _byte = aByte;
191 aByte = m_Byte;
192 m_Byte = _byte;
194 short _short = aShort;
195 aShort = m_Short;
196 m_Short = _short;
198 ushort _ushort = aUShort;
199 aUShort = m_UShort;
200 m_UShort = _ushort;
202 int _int = aInt;
203 aInt = m_Int;
204 m_Int = _int;
206 uint _uint = aUInt;
207 aUInt = m_UInt;
208 m_UInt = _uint;
210 long _long = aLong;
211 aLong = m_Long;
212 m_Long = _long;
214 ulong _ulong = aULong;
215 aULong = m_ULong;
216 m_ULong = _ulong;
218 float _f = aFloat;
219 aFloat = m_Float;
220 m_Float = _f;
222 double _d = aDouble;
223 aDouble = m_Double;
224 m_Double = _d;
226 char _char = aChar;
227 aChar = m_Char;
228 m_Char = _char;
230 string _string = aString;
231 aString = m_String;
232 m_String = _string;
234 Type _type = aType;
235 aType = m_Type;
236 m_Type = _type;
238 Any _any = aAny;
239 aAny = m_Any;
240 m_Any = _any;
242 Enum2 _enum2 = aEnum;
243 aEnum = m_Enum2;
244 m_Enum2 = _enum2;
246 Struct1 _struct1 = aStruct;
247 aStruct = m_Struct1;
248 m_Struct1 = _struct1;
250 object _obj = aXInterface;
251 aXInterface = m_XInterface;
252 m_XInterface = _obj;
254 ucss.lang.XComponent _xcomp = aXComponent;
255 aXComponent = m_XComponent;
256 m_XComponent = _xcomp;
258 bool[] _seq = seqBool;
259 seqBool = m_seqBool;
260 m_seqBool = _seq;
263 public bool retBoolean()
265 return m_Bool;
268 public byte retByte()
270 return m_Byte;
273 public short retShort()
275 return m_Short;
278 public ushort retUShort()
280 return m_UShort;
283 public int retLong()
285 return m_Int;
288 public uint retULong()
290 return m_UInt;
293 public long retHyper()
295 return m_Long;
298 public ulong retUHyper()
300 return m_ULong;
303 public float retFloat()
305 return m_Float;
308 public double retDouble()
310 return m_Double;
313 public char retChar()
315 return m_Char;
318 public string retString()
320 return m_String;
323 public Type retType()
325 return m_Type;
328 public uno.Any retAny()
330 return m_Any;
333 public Enum2 retEnum()
335 return m_Enum2;
337 public Struct1 retStruct1()
339 return m_Struct1;
342 public object retXInterface()
344 return m_XInterface;
347 public unoidl.com.sun.star.lang.XComponent retXComponent()
349 return m_XComponent;
352 public bool[] retSeqBool()
354 return m_seqBool;
357 public bool attrBoolean
359 get {
360 return m_Bool;
362 set {
363 m_Bool = value;
367 public byte attrByte
369 get {
370 return m_Byte;
372 set {
373 m_Byte = value;
377 public short attrShort
379 get {
380 return m_Short;
382 set {
383 m_Short = value;
387 public ushort attrUShort
389 get {
390 return m_UShort;
392 set {
393 m_UShort = value;
397 public int attrLong
399 get {
400 return m_Int;
402 set {
403 m_Int = value;
407 public uint attrULong
409 get {
410 return m_UInt;
412 set {
413 m_UInt = value;
417 public long attrHyper
419 get {
420 return m_Long;
422 set {
423 m_Long = value;
427 public ulong attrUHyper
429 get {
430 return m_ULong;
432 set {
433 m_ULong = value;
437 public float attrFloat
439 get {
440 return m_Float;
442 set {
443 m_Float = value;
447 public double attrDouble
449 get {
450 return m_Double;
452 set {
453 m_Double = value;
457 public char attrChar
459 get {
460 return m_Char;
462 set {
463 m_Char = value;
467 public string attrString
469 get {
470 return m_String;
472 set {
473 m_String = value;
477 public Type attrType
479 get {
480 return m_Type;
482 set {
483 m_Type = value;
487 public Any attrAny
489 get {
490 return m_Any;
492 set {
493 m_Any = value;
497 public Enum2 attrEnum2
499 get {
500 return m_Enum2;
502 set {
503 m_Enum2 = value;
507 public Struct1 attrStruct1
509 get {
510 return m_Struct1;
512 set {
513 m_Struct1 = value;
517 public object attrXInterface
519 get {
520 return m_XInterface;
522 set {
523 m_XInterface = value;
527 public ucss.lang.XComponent attrXComponent
529 get {
530 return m_XComponent;
532 set {
533 m_XComponent = value;
537 public bool[] attrSeqBoolean
539 get {
540 return m_seqBool;
542 set {
543 m_seqBool = value;
551 Any[] m_args;
552 int m_A1;
553 int m_A2;
554 int m_A3;
555 int m_A4;
557 bool m_Bool;
558 byte m_Byte;
559 short m_Short;
560 ushort m_UShort;
561 int m_Int;
562 uint m_UInt;
563 long m_Long;
564 ulong m_ULong;
565 float m_Float;
566 double m_Double;
567 char m_Char;
568 string m_String;
569 Type m_Type;
570 Any m_Any;
571 Enum2 m_Enum2;
572 Struct1 m_Struct1;
573 object m_XInterface;
574 unoidl.com.sun.star.lang.XComponent m_XComponent;
575 bool[] m_seqBool;