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