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 .
20 using System
.Reflection
;
21 using System
.Diagnostics
;
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)}
;
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
];
91 public void testOneway()
95 public void testExceptions()
99 public PolyStruct
testPolyStruct(PolyStruct 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
,
113 unoidl
.com
.sun
.star
.lang
.XComponent aXComponent
,
132 m_XInterface
= aXInterface
;
133 m_XComponent
= aXComponent
;
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
,
166 aXInterface
= m_XInterface
;
167 aXComponent
= m_XComponent
;
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
,
194 short _short
= aShort
;
198 ushort _ushort
= aUShort
;
214 ulong _ulong
= aULong
;
230 string _string
= aString
;
242 Enum2 _enum2
= aEnum
;
246 Struct1 _struct1
= aStruct
;
248 m_Struct1
= _struct1
;
250 object _obj
= aXInterface
;
251 aXInterface
= m_XInterface
;
254 ucss
.lang
.XComponent _xcomp
= aXComponent
;
255 aXComponent
= m_XComponent
;
256 m_XComponent
= _xcomp
;
258 bool[] _seq
= seqBool
;
263 public bool retBoolean()
268 public byte retByte()
273 public short retShort()
278 public ushort retUShort()
288 public uint retULong()
293 public long retHyper()
298 public ulong retUHyper()
303 public float retFloat()
308 public double retDouble()
313 public char retChar()
318 public string retString()
323 public Type
retType()
328 public uno
.Any
retAny()
333 public Enum2
retEnum()
337 public Struct1
retStruct1()
342 public object retXInterface()
347 public unoidl
.com
.sun
.star
.lang
.XComponent
retXComponent()
352 public bool[] retSeqBool()
357 public bool attrBoolean
377 public short attrShort
387 public ushort attrUShort
407 public uint attrULong
417 public long attrHyper
427 public ulong attrUHyper
437 public float attrFloat
447 public double attrDouble
467 public string attrString
497 public Enum2 attrEnum2
507 public Struct1 attrStruct1
517 public object attrXInterface
523 m_XInterface
= value;
527 public ucss
.lang
.XComponent attrXComponent
533 m_XComponent
= value;
537 public bool[] attrSeqBoolean
574 unoidl
.com
.sun
.star
.lang
.XComponent m_XComponent
;