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