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