merge the formfield patch from ooo-build
[ooovba.git] / testtools / source / bridgetest / constructors.cxx
blobae27834f74c2653692432a1c5a7ad38b2af661ee
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: constructors.cxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_testtools.hxx"
34 #include "sal/config.h"
36 #include "com/sun/star/lang/XInitialization.hpp"
37 #include "com/sun/star/lang/XComponent.hpp"
38 #include "com/sun/star/uno/Any.hxx"
39 #include "com/sun/star/uno/Exception.hpp"
40 #include "com/sun/star/uno/Reference.hxx"
41 #include "com/sun/star/uno/Sequence.hxx"
42 #include "com/sun/star/uno/Type.hxx"
43 #include "com/sun/star/uno/XComponentContext.hpp"
44 #include "com/sun/star/uno/XInterface.hpp"
45 #include "cppu/unotype.hxx"
46 #include "cppuhelper/factory.hxx"
47 #include "cppuhelper/implbase1.hxx"
48 #include "cppuhelper/implbase2.hxx"
49 #include "cppuhelper/implementationentry.hxx"
50 #include "cppuhelper/weak.hxx"
51 #include "rtl/string.h"
52 #include "rtl/ustring.h"
53 #include "rtl/ustring.hxx"
54 #include "sal/types.h"
55 #include "test/testtools/bridgetest/BadConstructorArguments.hpp"
56 #include "test/testtools/bridgetest/TestEnum.hpp"
57 #include "test/testtools/bridgetest/TestStruct.hpp"
58 #include "test/testtools/bridgetest/TestPolyStruct.hpp"
59 #include "test/testtools/bridgetest/TestPolyStruct2.hpp"
60 #include "test/testtools/bridgetest/XMultiBase1.hpp"
61 #include "uno/lbnames.h"
63 namespace {
65 namespace css = ::com::sun::star;
66 namespace ttb = ::test::testtools::bridgetest;
67 class Impl: public ::cppu::WeakImplHelper1< css::lang::XInitialization > {
68 public:
69 Impl() {}
71 private:
72 Impl(Impl &); // not defined
73 void operator =(Impl &); // not defined
75 virtual ~Impl() {}
77 virtual void SAL_CALL initialize(
78 css::uno::Sequence< css::uno::Any > const & arguments)
79 throw (css::uno::Exception);
82 void Impl::initialize(css::uno::Sequence< css::uno::Any > const & arguments)
83 throw (css::uno::Exception)
85 ::sal_Bool arg0 = sal_Bool();
86 ::sal_Int8 arg1 = sal_Int8();
87 ::sal_Int16 arg2 = sal_Int16();
88 ::sal_uInt16 arg3 = sal_uInt16();
89 ::sal_Int32 arg4 = sal_Int32();
90 ::sal_uInt32 arg5 = sal_uInt32();
91 ::sal_Int64 arg6 = sal_Int64();
92 ::sal_uInt64 arg7 = sal_uInt64();
93 float arg8 = float();
94 double arg9 = double();
95 ::rtl::OUString arg11;
96 css::uno::Type arg12;
97 ::sal_Bool arg13 = sal_Bool();
98 css::uno::Sequence< ::sal_Bool > arg14;
99 css::uno::Sequence< ::sal_Int8 > arg15;
100 css::uno::Sequence< ::sal_Int16 > arg16;
101 css::uno::Sequence< ::sal_uInt16 > arg17;
102 css::uno::Sequence< ::sal_Int32 > arg18;
103 css::uno::Sequence< ::sal_uInt32 > arg19;
104 css::uno::Sequence< ::sal_Int64 > arg20;
105 css::uno::Sequence< ::sal_uInt64 > arg21;
106 css::uno::Sequence< float > arg22;
107 css::uno::Sequence< double > arg23;
108 css::uno::Sequence< ::rtl::OUString > arg25;
109 css::uno::Sequence< css::uno::Type > arg26;
110 css::uno::Sequence< css::uno::Any > arg27;
111 ::sal_Bool arg27b = sal_Bool();
112 css::uno::Sequence< css::uno::Sequence< ::sal_Bool > > arg28;
113 css::uno::Sequence< css::uno::Sequence< css::uno::Any > > arg29;
114 ::sal_Bool arg29b = sal_Bool();
115 css::uno::Sequence< ::test::testtools::bridgetest::TestEnum > arg30;
116 css::uno::Sequence< ::test::testtools::bridgetest::TestStruct > arg31;
117 css::uno::Sequence<
118 ::test::testtools::bridgetest::TestPolyStruct< sal_Bool > > arg32;
119 css::uno::Sequence<
120 ::test::testtools::bridgetest::TestPolyStruct< css::uno::Any > > arg33;
121 ::sal_Bool arg33b = sal_Bool();
122 css::uno::Sequence< css::uno::Reference< css::uno::XInterface > > arg34;
123 ::test::testtools::bridgetest::TestEnum arg35;
124 ::test::testtools::bridgetest::TestStruct arg36;
125 ::test::testtools::bridgetest::TestPolyStruct< ::sal_Bool > arg37;
126 ::test::testtools::bridgetest::TestPolyStruct< css::uno::Any > arg38;
127 ::sal_Bool arg38b = sal_Bool();
128 css::uno::Reference< css::uno::XInterface > arg39;
129 if (!(arguments.getLength() == 40
130 && (arguments[0] >>= arg0) && arg0
131 && (arguments[1] >>= arg1) && arg1 == SAL_MIN_INT8
132 && (arguments[2] >>= arg2) && arg2 == SAL_MIN_INT16
133 && (arguments[3].getValueType()
134 == ::cppu::UnoType< ::cppu::UnoUnsignedShortType >::get())
135 && (arguments[3] >>= arg3) && arg3 == SAL_MAX_UINT16
136 && (arguments[4] >>= arg4) && arg4 == SAL_MIN_INT32
137 && (arguments[5] >>= arg5) && arg5 == SAL_MAX_UINT32
138 && (arguments[6] >>= arg6) && arg6 == SAL_MIN_INT64
139 && (arguments[7] >>= arg7) && arg7 == SAL_MAX_UINT64
140 && (arguments[8] >>= arg8) && arg8 == 0.123f
141 && (arguments[9] >>= arg9) && arg9 == 0.456
142 && (arguments[10].getValueType()
143 == ::cppu::UnoType< ::cppu::UnoCharType >::get())
144 && (*static_cast< ::sal_Unicode const * >(arguments[10].getValue())
145 == 'X')
146 && (arguments[11] >>= arg11)
147 && arg11.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
148 && (arguments[12] >>= arg12)
149 && arg12 == ::cppu::UnoType< css::uno::Any >::get()
150 && (arguments[13] >>= arg13) && arg13
151 && (arguments[14] >>= arg14) && arg14.getLength() == 1 && arg14[0]
152 && (arguments[15] >>= arg15) && arg15.getLength() == 1
153 && arg15[0] == SAL_MIN_INT8
154 && (arguments[16] >>= arg16) && arg16.getLength() == 1
155 && arg16[0] == SAL_MIN_INT16
156 && (arguments[17].getValueType()
157 == ::cppu::UnoType<
158 ::cppu::UnoSequenceType <
159 ::cppu::UnoUnsignedShortType > >::get())
160 && (arguments[17] >>= arg17) && arg17.getLength() == 1
161 && arg17[0] == SAL_MAX_UINT16
162 && (arguments[18] >>= arg18) && arg18.getLength() == 1
163 && arg18[0] == SAL_MIN_INT32
164 && (arguments[19] >>= arg19) && arg19.getLength() == 1
165 && arg19[0] == SAL_MAX_UINT32
166 && (arguments[20] >>= arg20) && arg20.getLength() == 1
167 && arg20[0] == SAL_MIN_INT64
168 && (arguments[21] >>= arg21) && arg21.getLength() == 1
169 && arg21[0] == SAL_MAX_UINT64
170 && (arguments[22] >>= arg22) && arg22.getLength() == 1
171 && arg22[0] == 0.123f
172 && (arguments[23] >>= arg23) && arg23.getLength() == 1
173 && arg23[0] == 0.456
174 && (arguments[24].getValueType()
175 == ::cppu::UnoType<
176 ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get())
177 && (static_cast< css::uno::Sequence< ::sal_Unicode > const * >(
178 arguments[24].getValue())->getLength()
179 == 1)
180 && ((*static_cast< css::uno::Sequence< ::sal_Unicode > const * >(
181 arguments[24].getValue()))[0]
182 == 'X')
183 && (arguments[25] >>= arg25) && arg25.getLength() == 1
184 && arg25[0].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
185 && (arguments[26] >>= arg26) && arg26.getLength() == 1
186 && arg26[0] == ::cppu::UnoType< css::uno::Any >::get()
187 && (arguments[27] >>= arg27) && arg27.getLength() == 1
188 && (arg27[0] >>= arg27b) && arg27b
189 && (arguments[28] >>= arg28) && arg28.getLength() == 1
190 && arg28[0].getLength() == 1 && arg28[0][0]
191 && (arguments[29] >>= arg29) && arg29.getLength() == 1
192 && arg29[0].getLength() == 1 && (arg29[0][0] >>= arg29b) && arg29b
193 && (arguments[30] >>= arg30) && arg30.getLength() == 1
194 && arg30[0] == ::test::testtools::bridgetest::TestEnum_TWO
195 && (arguments[31] >>= arg31) && arg31.getLength() == 1
196 && arg31[0].member == 10
197 && (arguments[32] >>= arg32) && arg32.getLength() == 1
198 && arg32[0].member
199 && (arguments[33] >>= arg33) && arg33.getLength() == 1
200 && (arg33[0].member >>= arg33b) && arg33b
201 && (arguments[34] >>= arg34) && arg34.getLength() == 1
202 && !arg34[0].is()
203 && (arguments[35] >>= arg35)
204 && arg35 == ::test::testtools::bridgetest::TestEnum_TWO
205 && (arguments[36] >>= arg36) && arg36.member == 10
206 && (arguments[37] >>= arg37) && arg37.member
207 && (arguments[38] >>= arg38) && (arg38.member >>= arg38b) && arg38b
208 && (arguments[39] >>= arg39) && !arg39.is()))
210 throw ::test::testtools::bridgetest::BadConstructorArguments();
215 class Impl2: public ::cppu::WeakImplHelper2<
216 css::lang::XInitialization, ttb::XMultiBase1 >
218 public:
219 Impl2(): m_attr1(0.0) {}
221 private:
222 Impl2(Impl &); // not defined
223 void operator =(Impl &); // not defined
225 virtual ~Impl2() {}
227 virtual void SAL_CALL initialize(
228 css::uno::Sequence< css::uno::Any > const & arguments)
229 throw (css::uno::Exception);
231 //XMultiBase1
232 virtual double SAL_CALL getatt1()
233 throw (::com::sun::star::uno::RuntimeException);
234 virtual void SAL_CALL setatt1( double _att1 )
235 throw (::com::sun::star::uno::RuntimeException);
236 virtual ::sal_Int32 SAL_CALL fn11( ::sal_Int32 arg )
237 throw (::com::sun::star::uno::RuntimeException);
238 virtual ::rtl::OUString SAL_CALL fn12( const ::rtl::OUString& arg )
239 throw (::com::sun::star::uno::RuntimeException);
242 double m_attr1;
245 void Impl2::initialize(css::uno::Sequence< css::uno::Any > const & arguments)
246 throw (css::uno::Exception)
248 ttb::TestPolyStruct< css::uno::Type > arg0;
249 ttb::TestPolyStruct< css::uno::Any > arg1;
250 css::uno::Any arg1b(sal_True);
251 ttb::TestPolyStruct< ::sal_Bool > arg2;
252 ttb::TestPolyStruct< ::sal_Int8 > arg3;
253 ttb::TestPolyStruct< ::sal_Int16 > arg4;
254 ttb::TestPolyStruct< ::sal_Int32 > arg5;
255 ttb::TestPolyStruct< ::sal_Int64 > arg6;
256 ttb::TestPolyStruct< ::sal_Unicode > arg7;
257 ttb::TestPolyStruct< ::rtl::OUString > arg8;
258 ttb::TestPolyStruct< float > arg9;
259 ttb::TestPolyStruct< double > arg10;
260 ttb::TestPolyStruct<css::uno::Reference<css::uno::XInterface> > arg11;
261 ttb::TestPolyStruct<css::uno::Reference< css::lang::XComponent> > arg12;
262 ttb::TestPolyStruct<ttb::TestEnum> arg13;
263 ttb::TestPolyStruct<
264 ttb::TestPolyStruct2<sal_Unicode, css::uno::Any> > arg14;
265 ttb::TestPolyStruct< ttb::TestPolyStruct2 <
266 ttb::TestPolyStruct2< sal_Unicode, css::uno::Any >,
267 ::rtl::OUString > > arg15;
268 ttb::TestPolyStruct2< ::rtl::OUString,ttb::TestPolyStruct2 <
269 ::sal_Unicode, ttb::TestPolyStruct < css::uno::Any > > > arg16;
270 ttb::TestPolyStruct2< ttb::TestPolyStruct2<sal_Unicode, css::uno::Any >,
271 ttb::TestPolyStruct<sal_Unicode> > arg17;
272 ttb::TestPolyStruct<css::uno::Sequence< css::uno::Type > > arg18;
273 ttb::TestPolyStruct<css::uno::Sequence<css::uno::Any> > arg19;
274 ttb::TestPolyStruct<css::uno::Sequence< ::sal_Bool > > arg20;
275 ttb::TestPolyStruct<css::uno::Sequence< ::sal_Int8 > > arg21;
276 ttb::TestPolyStruct<css::uno::Sequence< ::sal_Int16 > > arg22;
277 ttb::TestPolyStruct<css::uno::Sequence< ::sal_Int32 > > arg23;
278 ttb::TestPolyStruct<css::uno::Sequence< ::sal_Int64 > > arg24;
279 // ttb::TestPolyStruct<css::uno::Sequence<::sal_Unicode> > arg25;
280 ttb::TestPolyStruct<css::uno::Sequence< ::rtl::OUString > > arg26;
281 ttb::TestPolyStruct<css::uno::Sequence<float> > arg27;
282 ttb::TestPolyStruct<css::uno::Sequence<double> > arg28;
283 ttb::TestPolyStruct<css::uno::Sequence<css::uno::Reference<css::uno::XInterface> > > arg29;
284 ttb::TestPolyStruct<css::uno::Sequence<css::uno::Reference<css::lang::XComponent> > > arg30;
285 ttb::TestPolyStruct<css::uno::Sequence<ttb::TestEnum> > arg31;
286 ttb::TestPolyStruct<css::uno::Sequence<ttb::TestPolyStruct2<
287 ::sal_Unicode, css::uno::Sequence<css::uno::Any> > > > arg32;
288 bool arg32a = false;
289 ttb::TestPolyStruct<css::uno::Sequence<ttb::TestPolyStruct2<
290 ttb::TestPolyStruct< ::sal_Unicode>, css::uno::Sequence<css::uno::Any> > > > arg33;
291 ttb::TestPolyStruct<css::uno::Sequence<css::uno::Sequence< ::sal_Int32> > > arg34;
292 css::uno::Sequence<ttb::TestPolyStruct< ::sal_Int32> > arg35;
293 css::uno::Sequence<ttb::TestPolyStruct<ttb::TestPolyStruct2< ::sal_Unicode, css::uno::Any> > > arg36;
294 css::uno::Sequence<ttb::TestPolyStruct<ttb::TestPolyStruct2<
295 ttb::TestPolyStruct2< ::sal_Unicode,css::uno::Any >, ::rtl::OUString> > > arg37;
296 css::uno::Sequence<ttb::TestPolyStruct2< ::rtl::OUString, ttb::TestPolyStruct2<
297 ::sal_Unicode, ttb::TestPolyStruct<css::uno::Any> > > > arg38;
298 css::uno::Sequence<ttb::TestPolyStruct2<ttb::TestPolyStruct2<
299 ::sal_Unicode, css::uno::Any>, ttb::TestPolyStruct< ::sal_Unicode> > > arg39;
300 css::uno::Sequence<css::uno::Sequence<ttb::TestPolyStruct< ::sal_Unicode> > > arg40;
301 css::uno::Sequence<css::uno::Sequence<ttb::TestPolyStruct<ttb::TestPolyStruct2< ::sal_Unicode, css::uno::Any> > > >arg41;
302 css::uno::Sequence<css::uno::Sequence<ttb::TestPolyStruct<
303 ttb::TestPolyStruct2<ttb::TestPolyStruct2<sal_Unicode, css::uno::Any>, ::rtl::OUString> > > > arg42;
304 css::uno::Sequence<css::uno::Sequence<ttb::TestPolyStruct2<
305 ::rtl::OUString, ttb::TestPolyStruct2< ::sal_Unicode, ttb::TestPolyStruct<css::uno::Any> > > > > arg43;
306 css::uno::Sequence<css::uno::Sequence<ttb::TestPolyStruct2<
307 ttb::TestPolyStruct2< ::sal_Unicode, css::uno::Any>, ttb::TestPolyStruct<
308 ::sal_Unicode> > > > arg44;
310 if (!(arguments.getLength() == 45
311 && (arguments[0] >>= arg0) && arg0.member == cppu::UnoType<sal_Int32>::get()
312 && (arguments[1] >>= arg1) && arg1.member == arg1b
313 && (arguments[2] >>= arg2) && arg2.member == sal_True
314 && (arguments[3] >>= arg3) && arg3.member == SAL_MIN_INT8
315 && (arguments[4] >>= arg4) && arg4.member == SAL_MIN_INT16
316 && (arguments[5] >>= arg5) && arg5.member == SAL_MIN_INT32
317 && (arguments[6] >>= arg6) && arg6.member == SAL_MIN_INT64
318 && (arguments[7] >>= arg7) && arg7.member == 'X'
319 && (arguments[8] >>= arg8) && arg8.member.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
320 && (arguments[9] >>= arg9) && arg9.member == 0.123f
321 && (arguments[10] >>= arg10) && arg10.member == 0.456
322 && (arguments[11] >>= arg11)
323 && (arguments[12] >>= arg12)
324 && (arguments[13] >>= arg13) && arg13.member == ttb::TestEnum_TWO
325 && (arguments[14] >>= arg14) && arg14.member.member1 == 'X' && arg14.member.member2 == arg1b
326 && (arguments[15] >>= arg15) && arg15.member.member1.member1 == 'X'
327 && arg15.member.member1.member2 == arg1b
328 && arg15.member.member2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
329 && (arguments[16] >>= arg16) && arg16.member1.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
330 && arg16.member2.member1 == 'X'
331 && arg16.member2.member2.member == arg1b
332 && (arguments[17] >>= arg17) && arg17.member1.member1 == 'X'
333 && arg17.member1.member2 == arg1b
334 && arg17.member2.member == 'X'
335 && (arguments[18] >>= arg18) && arg18.member.getLength() == 1
336 && arg18.member[0] == ::cppu::UnoType<sal_Int32>::get()
337 && (arguments[19] >>= arg19) && arg19.member.getLength() == 1
338 && arg19.member[0] == arg1b
339 && (arguments[20] >>= arg20) && arg20.member.getLength() == 1
340 && arg20.member[0] == sal_True
341 && (arguments[21] >>= arg21) && arg21.member.getLength() == 1
342 && arg21.member[0] == SAL_MIN_INT8
343 && (arguments[22] >>= arg22) && arg22.member.getLength() == 1
344 && arg22.member[0] == SAL_MIN_INT16
345 && (arguments[23] >>= arg23) && arg23.member.getLength() == 1
346 && arg23.member[0] == SAL_MIN_INT32
347 && (arguments[24] >>= arg24) && arg24.member.getLength() == 1
348 && arg24.member[0] == SAL_MIN_INT64
349 && (arguments[25].getValueType()
350 == ::cppu::UnoType< ttb::TestPolyStruct< ::cppu::UnoSequenceType<
351 ::cppu::UnoCharType> > >::get())
352 && (static_cast< ttb::TestPolyStruct<css::uno::Sequence<
353 ::sal_Unicode> > const *>(arguments[25].getValue())->member[0]) == 'X'
354 && (arguments[26] >>= arg26) && arg26.member.getLength() == 1
355 && arg26.member[0].equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
356 && (arguments[27] >>= arg27) && arg27.member.getLength() == 1
357 && arg27.member[0] == 0.123f
358 && (arguments[28] >>= arg28) && arg28.member.getLength() == 1
359 && arg28.member[0] == 0.456
360 && (arguments[29] >>= arg29) && arg29.member.getLength() == 1
361 && arg29.member[0] != NULL
362 && (arguments[30] >>= arg30) && arg30.member.getLength() == 1
363 && arg30.member[0] != NULL
364 && (arguments[31] >>= arg31) && arg31.member.getLength() == 1
365 && arg31.member[0] == ttb::TestEnum_TWO
366 && (arguments[32] >>= arg32) && arg32.member.getLength() == 1
367 && arg32.member[0].member1 == 'X'
368 && arg32.member[0].member2.getLength() == 1
369 && (arg32.member[0].member2[0] >>= arg32a) && arg32a == true
370 && (arguments[33] >>= arg33) && arg33.member.getLength() == 1
371 && arg33.member[0].member1.member == 'X'
372 && arg33.member[0].member2.getLength() == 1
373 && arg33.member[0].member2[0] == arg1b
374 && (arguments[34] >>= arg34) && arg34.member.getLength() == 1
375 && arg34.member[0].getLength() == 1 && arg34.member[0][0] == SAL_MIN_INT32
376 && (arguments[35] >>= arg35) && arg35.getLength() == 1
377 && arg35[0].member == SAL_MIN_INT32
378 && (arguments[36] >>= arg36) && arg36.getLength() == 1
379 && arg36[0].member.member1 == 'X'
380 && arg36[0].member.member2 == arg1b
381 && (arguments[37] >>= arg37) && arg37.getLength() == 1
382 && arg37[0].member.member1.member1 == 'X'
383 && arg37[0].member.member1.member2 == arg1b
384 && arg37[0].member.member2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
385 && (arguments[38] >>= arg38) && arg38.getLength() == 1
386 && arg38[0].member1.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
387 && arg38[0].member2.member1 == 'X'
388 && arg38[0].member2.member2.member == arg1b
389 && (arguments[39] >>= arg39) && arg39.getLength() == 1
390 && arg39[0].member1.member1 == 'X'
391 && arg39[0].member1.member2 == arg1b
392 && arg39[0].member2.member == 'X'
393 && (arguments[40] >>= arg40) && arg40.getLength() == 1
394 && arg40[0].getLength() == 1
395 && arg40[0][0].member == 'X'
396 && (arguments[41] >>= arg41) && arg41.getLength() == 1
397 && arg41[0].getLength() == 1
398 && arg41[0][0].member.member1 == 'X'
399 && arg41[0][0].member.member2 == arg1b
400 && (arguments[42] >>= arg42) && arg42.getLength() == 1
401 && arg42[0].getLength() == 1
402 && arg42[0][0].member.member1.member1 == 'X'
403 && arg42[0][0].member.member1.member2 == arg1b
404 && arg42[0][0].member.member2.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
405 && (arguments[43] >>= arg43) && arg43.getLength() == 1
406 && arg43[0].getLength() == 1
407 && arg43[0][0].member1.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("test"))
408 && arg43[0][0].member2.member1 == 'X'
409 && arg43[0][0].member2.member2.member == arg1b
410 && (arguments[44] >>= arg44) && arg44.getLength() == 1
411 && arg44[0].getLength() == 1
412 && arg44[0][0].member1.member1 == 'X'
413 && arg44[0][0].member1.member2 == arg1b
414 && arg44[0][0].member2.member == 'X'
417 throw ::test::testtools::bridgetest::BadConstructorArguments();
420 //check if interfaces work
421 arg11.member->acquire();
422 arg11.member->release();
423 arg12.member->acquire();
424 arg12.member->release();
425 arg29.member[0]->acquire();
426 arg29.member[0]->release();
430 //XMultiBase1
431 double Impl2::getatt1()
432 throw (::com::sun::star::uno::RuntimeException)
434 return m_attr1;
437 void Impl2::setatt1( double _att1 )throw (::com::sun::star::uno::RuntimeException)
439 m_attr1 = _att1;
442 ::sal_Int32 Impl2::fn11( ::sal_Int32 arg )
443 throw (::com::sun::star::uno::RuntimeException)
445 return 11 * arg;
448 ::rtl::OUString Impl2::fn12( const ::rtl::OUString& arg )
449 throw (::com::sun::star::uno::RuntimeException)
451 return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("12")) + arg;
454 css::uno::Reference< css::uno::XInterface > SAL_CALL create(
455 css::uno::Reference< css::uno::XComponentContext > const &)
456 SAL_THROW((css::uno::Exception))
458 return static_cast< ::cppu::OWeakObject * >(new Impl);
461 ::rtl::OUString SAL_CALL getImplementationName() {
462 return ::rtl::OUString(
463 RTL_CONSTASCII_USTRINGPARAM(
464 "comp.test.testtools.bridgetest.Constructors"));
467 css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() {
468 css::uno::Sequence< ::rtl::OUString > s(1);
469 s[0] = ::rtl::OUString(
470 RTL_CONSTASCII_USTRINGPARAM("test.testtools.bridgetest.Constructors"));
471 return s;
474 css::uno::Reference< css::uno::XInterface > SAL_CALL create2(
475 css::uno::Reference< css::uno::XComponentContext > const &)
476 SAL_THROW((css::uno::Exception))
478 return static_cast< ::cppu::OWeakObject * >(new Impl2);
481 ::rtl::OUString SAL_CALL getImplementationName2() {
482 return ::rtl::OUString(
483 RTL_CONSTASCII_USTRINGPARAM(
484 "comp.test.testtools.bridgetest.Constructors2"));
487 css::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames2() {
488 css::uno::Sequence< ::rtl::OUString > s(1);
489 s[0] = ::rtl::OUString(
490 RTL_CONSTASCII_USTRINGPARAM("test.testtools.bridgetest.Constructors2"));
491 return s;
494 ::cppu::ImplementationEntry entries[] = {
495 { &create, &getImplementationName, &getSupportedServiceNames,
496 &::cppu::createSingleComponentFactory, 0, 0 },
497 { &create2, &getImplementationName2, &getSupportedServiceNames2,
498 &::cppu::createSingleComponentFactory, 0, 0 },
499 { 0, 0, 0, 0, 0, 0 } };
502 extern "C" void * SAL_CALL component_getFactory(
503 char const * implName, void * serviceManager, void * registryKey)
505 return ::cppu::component_getFactoryHelper(
506 implName, serviceManager, registryKey, entries);
509 extern "C" void SAL_CALL component_getImplementationEnvironment(
510 char const ** envTypeName, uno_Environment **)
512 *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
515 extern "C" ::sal_Bool SAL_CALL component_writeInfo(
516 void * serviceManager, void * registryKey)
518 return ::cppu::component_writeInfoHelper(
519 serviceManager, registryKey, entries);