1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <cppu/unotype.hxx>
23 #include <osl/diagnose.h>
24 #include <osl/diagnose.hxx>
25 #include <osl/thread.hxx>
26 #include <osl/mutex.hxx>
29 #include <cppuhelper/implbase.hxx>
30 #include <cppuhelper/factory.hxx>
31 #include <cppuhelper/exc_hlp.hxx>
32 #include <cppuhelper/compbase_ex.hxx>
33 #include <cppuhelper/supportsservice.hxx>
34 #include <com/sun/star/lang/IllegalArgumentException.hpp>
35 #include <com/sun/star/lang/XServiceInfo.hpp>
36 #include <com/sun/star/lang/XComponent.hpp>
37 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
38 #include <com/sun/star/uno/Any.hxx>
39 #include <com/sun/star/uno/RuntimeException.hpp>
40 #include <com/sun/star/uno/Sequence.hxx>
42 #include <test/testtools/bridgetest/Constructors.hpp>
43 #include <test/testtools/bridgetest/Constructors2.hpp>
44 #include <test/testtools/bridgetest/TestPolyStruct.hpp>
45 #include <test/testtools/bridgetest/TestPolyStruct2.hpp>
46 #include <test/testtools/bridgetest/XBridgeTest2.hpp>
47 #include <test/testtools/bridgetest/XMulti.hpp>
49 #include "currentcontextchecker.hxx"
54 using namespace com::sun::star::uno
;
55 using namespace com::sun::star::lang
;
56 using namespace com::sun::star::registry
;
57 using namespace test::testtools::bridgetest
;
60 #pragma warning (disable : 4503) // irrelevant for test code
63 #define SERVICENAME "com.sun.star.test.bridge.CppTestObject"
64 #define IMPLNAME "com.sun.star.comp.bridge.CppTestObject"
66 namespace bridge_object
70 static Sequence
< OUString
> getSupportedServiceNames()
72 return { SERVICENAME
};
76 static void assign( TestElement
& rData
,
77 bool bBool
, sal_Unicode cChar
, sal_Int8 nByte
,
78 sal_Int16 nShort
, sal_uInt16 nUShort
,
79 sal_Int32 nLong
, sal_uInt32 nULong
,
80 sal_Int64 nHyper
, sal_uInt64 nUHyper
,
81 float fFloat
, double fDouble
,
82 TestEnum eEnum
, const OUString
& rStr
,
83 const css::uno::Reference
< css::uno::XInterface
>& xTest
,
84 const css::uno::Any
& rAny
)
90 rData
.UShort
= nUShort
;
94 rData
.UHyper
= nUHyper
;
96 rData
.Double
= fDouble
;
99 rData
.Interface
= xTest
;
103 static void assign( TestData
& rData
,
104 bool bBool
, sal_Unicode cChar
, sal_Int8 nByte
,
105 sal_Int16 nShort
, sal_uInt16 nUShort
,
106 sal_Int32 nLong
, sal_uInt32 nULong
,
107 sal_Int64 nHyper
, sal_uInt64 nUHyper
,
108 float fFloat
, double fDouble
,
109 TestEnum eEnum
, const OUString
& rStr
,
110 const css::uno::Reference
< css::uno::XInterface
>& xTest
,
111 const css::uno::Any
& rAny
,
112 const css::uno::Sequence
< TestElement
>& rSequence
)
114 assign( static_cast<TestElement
&>(rData
),
115 bBool
, cChar
, nByte
, nShort
, nUShort
, nLong
, nULong
, nHyper
, nUHyper
, fFloat
, fDouble
,
116 eEnum
, rStr
, xTest
, rAny
);
117 rData
.Sequence
= rSequence
;
122 public osl::DebugBase
<Test_Impl
>,
123 public WeakImplHelper
< XBridgeTest2
, XServiceInfo
, XRecursiveCall
>
125 TestData _aData
, _aStructData
;
126 sal_Int32 m_nLastCallId
;
128 bool m_bSequenceOfCallTestPassed
;
131 Sequence
<sal_Bool
> _arBool
;
132 Sequence
<sal_Unicode
> _arChar
;
133 Sequence
<sal_Int8
> _arByte
;
134 Sequence
<sal_Int16
> _arShort
;
135 Sequence
<sal_uInt16
> _arUShort
;
136 Sequence
<sal_Int32
> _arLong
;
137 Sequence
<sal_uInt32
> _arULong
;
138 Sequence
<sal_Int64
> _arHyper
;
139 Sequence
<sal_uInt64
> _arUHyper
;
140 Sequence
<OUString
> _arString
;
141 Sequence
<float> _arFloat
;
142 Sequence
<double> _arDouble
;
143 Sequence
<TestEnum
> _arEnum
;
144 Sequence
<Reference
<XInterface
> > _arObject
;
145 Sequence
<Sequence
<sal_Int32
> > _arLong2
;
146 Sequence
<Sequence
<Sequence
<sal_Int32
> > > _arLong3
;
147 Sequence
<Any
> _arAny
;
148 Sequence
<TestElement
> _arStruct
;
151 Test_Impl() : m_nLastCallId( 0 ),
152 m_bFirstCall( true ),
153 m_bSequenceOfCallTestPassed( true )
156 void SAL_CALL
acquire() throw () override
158 OWeakObject::acquire();
160 void SAL_CALL
release() throw () override
162 OWeakObject::release();
166 virtual OUString SAL_CALL
getImplementationName() override
;
167 virtual sal_Bool SAL_CALL
supportsService( const OUString
& rServiceName
) override
;
168 virtual Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
171 virtual void SAL_CALL
setValues( sal_Bool bBool
, sal_Unicode cChar
, sal_Int8 nByte
,
172 sal_Int16 nShort
, sal_uInt16 nUShort
,
173 sal_Int32 nLong
, sal_uInt32 nULong
,
174 sal_Int64 nHyper
, sal_uInt64 nUHyper
,
175 float fFloat
, double fDouble
,
176 TestEnum eEnum
, const OUString
& rStr
,
177 const css::uno::Reference
< css::uno::XInterface
>& xTest
,
178 const css::uno::Any
& rAny
,
179 const css::uno::Sequence
<TestElement
>& rSequence
,
180 const ::test::testtools::bridgetest::TestDataElements
& rStruct
) override
;
182 virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL
setValues2( sal_Bool
& bBool
, sal_Unicode
& cChar
, sal_Int8
& nByte
,
183 sal_Int16
& nShort
, sal_uInt16
& nUShort
,
184 sal_Int32
& nLong
, sal_uInt32
& nULong
,
185 sal_Int64
& nHyper
, sal_uInt64
& nUHyper
,
186 float& fFloat
, double& fDouble
,
187 TestEnum
& eEnum
, OUString
& rStr
,
188 css::uno::Reference
< css::uno::XInterface
>& xTest
,
190 css::uno::Sequence
<TestElement
>& rSequence
,
191 ::test::testtools::bridgetest::TestDataElements
& rStruct
) override
;
193 virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL
getValues( sal_Bool
& bBool
, sal_Unicode
& cChar
, sal_Int8
& nByte
,
194 sal_Int16
& nShort
, sal_uInt16
& nUShort
,
195 sal_Int32
& nLong
, sal_uInt32
& nULong
,
196 sal_Int64
& nHyper
, sal_uInt64
& nUHyper
,
197 float& fFloat
, double& fDouble
,
198 TestEnum
& eEnum
, OUString
& rStr
,
199 css::uno::Reference
< css::uno::XInterface
>& xTest
,
201 css::uno::Sequence
< TestElement
>& rSequence
,
202 ::test::testtools::bridgetest::TestDataElements
& rStruct
) override
;
204 virtual SmallStruct SAL_CALL
echoSmallStruct(const SmallStruct
& rStruct
) override
206 virtual MediumStruct SAL_CALL
echoMediumStruct(const MediumStruct
& rStruct
) override
208 virtual BigStruct SAL_CALL
echoBigStruct(const BigStruct
& rStruct
) override
210 virtual TwoFloats SAL_CALL
echoTwoFloats(const TwoFloats
& rStruct
) override
212 virtual FourFloats SAL_CALL
echoFourFloats(const FourFloats
& rStruct
) override
214 virtual MixedFloatAndInteger SAL_CALL
echoMixedFloatAndInteger(const MixedFloatAndInteger
& rStruct
) override
216 virtual ThreeByteStruct SAL_CALL
echoThreeByteStruct(const ThreeByteStruct
& rStruct
) override
218 virtual sal_Int32 SAL_CALL
testPPCAlignment( sal_Int64
, sal_Int64
, sal_Int32
, sal_Int64
, sal_Int32 i2
) override
220 virtual sal_Int32 SAL_CALL
testPPC64Alignment( double , double , double , sal_Int32 i1
) override
222 virtual double SAL_CALL
testTenDoubles( double d1
, double d2
, double d3
, double d4
, double d5
, double d6
, double d7
, double d8
, double d9
, double d10
) override
223 { return d1
+ d2
+ d3
+ d4
+ d5
+ d6
+ d7
+ d8
+ d9
+ d10
; }
224 virtual sal_Bool SAL_CALL
getBool() override
225 { return _aData
.Bool
; }
226 virtual sal_Int8 SAL_CALL
getByte() override
227 { return _aData
.Byte
; }
228 virtual sal_Unicode SAL_CALL
getChar() override
229 { return _aData
.Char
; }
230 virtual sal_Int16 SAL_CALL
getShort() override
231 { return _aData
.Short
; }
232 virtual sal_uInt16 SAL_CALL
getUShort() override
233 { return _aData
.UShort
; }
234 virtual sal_Int32 SAL_CALL
getLong() override
235 { return _aData
.Long
; }
236 virtual sal_uInt32 SAL_CALL
getULong() override
237 { return _aData
.ULong
; }
238 virtual sal_Int64 SAL_CALL
getHyper() override
239 { return _aData
.Hyper
; }
240 virtual sal_uInt64 SAL_CALL
getUHyper() override
241 { return _aData
.UHyper
; }
242 virtual float SAL_CALL
getFloat() override
243 { return _aData
.Float
; }
244 virtual double SAL_CALL
getDouble() override
245 { return _aData
.Double
; }
246 virtual TestEnum SAL_CALL
getEnum() override
247 { return _aData
.Enum
; }
248 virtual OUString SAL_CALL
getString() override
249 { return _aData
.String
; }
250 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
getInterface( ) override
251 { return _aData
.Interface
; }
252 virtual css::uno::Any SAL_CALL
getAny() override
253 { return _aData
.Any
; }
254 virtual css::uno::Sequence
< TestElement
> SAL_CALL
getSequence() override
255 { return _aData
.Sequence
; }
256 virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL
getStruct() override
257 { return _aStructData
; }
259 virtual void SAL_CALL
setBool( sal_Bool _bool
) override
260 { _aData
.Bool
= _bool
; }
261 virtual void SAL_CALL
setByte( sal_Int8 _byte
) override
262 { _aData
.Byte
= _byte
; }
263 virtual void SAL_CALL
setChar( sal_Unicode _char
) override
264 { _aData
.Char
= _char
; }
265 virtual void SAL_CALL
setShort( sal_Int16 _short
) override
266 { _aData
.Short
= _short
; }
267 virtual void SAL_CALL
setUShort( sal_uInt16 _ushort
) override
268 { _aData
.UShort
= _ushort
; }
269 virtual void SAL_CALL
setLong( sal_Int32 _long
) override
270 { _aData
.Long
= _long
; }
271 virtual void SAL_CALL
setULong( sal_uInt32 _ulong
) override
272 { _aData
.ULong
= _ulong
; }
273 virtual void SAL_CALL
setHyper( sal_Int64 _hyper
) override
274 { _aData
.Hyper
= _hyper
; }
275 virtual void SAL_CALL
setUHyper( sal_uInt64 _uhyper
) override
276 { _aData
.UHyper
= _uhyper
; }
277 virtual void SAL_CALL
setFloat( float _float
) override
278 { _aData
.Float
= _float
; }
279 virtual void SAL_CALL
setDouble( double _double
) override
280 { _aData
.Double
= _double
; }
281 virtual void SAL_CALL
setEnum( TestEnum _enum
) override
282 { _aData
.Enum
= _enum
; }
283 virtual void SAL_CALL
setString( const OUString
& _string
) override
284 { _aData
.String
= _string
; }
285 virtual void SAL_CALL
setInterface( const css::uno::Reference
< css::uno::XInterface
>& _interface
) override
286 { _aData
.Interface
= _interface
; }
287 virtual void SAL_CALL
setAny( const css::uno::Any
& _any
) override
288 { _aData
.Any
= _any
; }
289 virtual void SAL_CALL
setSequence( const css::uno::Sequence
<TestElement
>& _sequence
) override
290 { _aData
.Sequence
= _sequence
; }
291 virtual void SAL_CALL
setStruct( const ::test::testtools::bridgetest::TestDataElements
& _struct
) override
292 { _aStructData
= _struct
; }
294 virtual sal_Int32 SAL_CALL
getRaiseAttr1() override
295 { throw RuntimeException(); }
297 virtual void SAL_CALL
setRaiseAttr1(sal_Int32
) override
298 { throw IllegalArgumentException(); }
300 virtual sal_Int32 SAL_CALL
getRaiseAttr2() override
301 { throw IllegalArgumentException(); }
303 virtual TestPolyStruct
< sal_Bool
> SAL_CALL
transportPolyBoolean(
304 TestPolyStruct
< sal_Bool
> const & arg
) override
307 virtual void SAL_CALL
transportPolyHyper(TestPolyStruct
< sal_Int64
> &) override
{}
309 virtual void SAL_CALL
transportPolySequence(
310 TestPolyStruct
< Sequence
< Any
> > const & arg1
,
311 TestPolyStruct
< Sequence
< Any
> > & arg2
) override
314 virtual TestPolyStruct
< sal_Int32
> SAL_CALL
getNullPolyLong() override
315 { return TestPolyStruct
< sal_Int32
>(0); /* work around MS compiler bug */ }
317 virtual TestPolyStruct
< OUString
> SAL_CALL
getNullPolyString() override
318 { return TestPolyStruct
< OUString
>(); }
320 virtual TestPolyStruct
< Type
> SAL_CALL
getNullPolyType() override
321 { return TestPolyStruct
< Type
>(); }
323 virtual TestPolyStruct
< Any
> SAL_CALL
getNullPolyAny() override
324 { return TestPolyStruct
< Any
>(); }
326 virtual TestPolyStruct
< Sequence
< sal_Bool
> > SAL_CALL
327 getNullPolySequence() override
328 { return TestPolyStruct
< Sequence
< sal_Bool
> >(); }
330 virtual TestPolyStruct
< TestEnum
> SAL_CALL
getNullPolyEnum() override
331 { return TestPolyStruct
< TestEnum
>(
332 test::testtools::bridgetest::TestEnum_TEST
);
333 /* work around MS compiler bug */ }
335 virtual TestPolyStruct
< TestBadEnum
> SAL_CALL
getNullPolyBadEnum() override
336 { return TestPolyStruct
< TestBadEnum
>(
337 test::testtools::bridgetest::TestBadEnum_M
);
338 /* explicitly instantiate with default enumerator */ }
340 virtual TestPolyStruct
< TestStruct
> SAL_CALL
getNullPolyStruct() override
341 { return TestPolyStruct
< TestStruct
>(); }
343 virtual TestPolyStruct
< Reference
< XBridgeTestBase
> > SAL_CALL
344 getNullPolyInterface() override
345 { return TestPolyStruct
< Reference
< XBridgeTestBase
> >(); }
347 virtual css::uno::Any SAL_CALL
transportAny(
348 const css::uno::Any
& value
) override
;
350 virtual void SAL_CALL
call( sal_Int32 nCallId
, sal_Int32 nWaitMUSEC
) override
;
351 virtual void SAL_CALL
callOneway( sal_Int32 nCallId
, sal_Int32 nWaitMUSEC
) override
;
352 virtual sal_Bool SAL_CALL
sequenceOfCallTestPassed( ) override
;
353 virtual void SAL_CALL
startRecursiveCall(
354 const css::uno::Reference
< XRecursiveCall
>& xCall
, sal_Int32 nToCall
) override
;
356 virtual Reference
< XMulti
> SAL_CALL
getMulti() override
;
358 virtual OUString SAL_CALL
testMulti(Reference
< XMulti
> const & multi
) override
;
360 public: // XBridgeTest
361 virtual ::test::testtools::bridgetest::TestDataElements SAL_CALL
raiseException( sal_Int16 nArgumentPos
, const OUString
& rMsg
, const Reference
< XInterface
> & xCOntext
) override
;
363 virtual void SAL_CALL
raiseRuntimeExceptionOneway(
364 const OUString
& Message
, const css::uno::Reference
< css::uno::XInterface
>& Context
) override
;
366 virtual sal_Int32 SAL_CALL
getRuntimeException() override
;
367 virtual void SAL_CALL
setRuntimeException( sal_Int32 _runtimeexception
) override
;
370 virtual Sequence
< sal_Bool
> SAL_CALL
setSequenceBool(
371 const Sequence
< sal_Bool
>& aSeq
) override
;
372 virtual Sequence
< sal_Unicode
> SAL_CALL
setSequenceChar(
373 const Sequence
< sal_Unicode
>& aSeq
) override
;
374 virtual Sequence
< sal_Int8
> SAL_CALL
setSequenceByte(
375 const Sequence
< sal_Int8
>& aSeq
) override
;
376 virtual Sequence
< sal_Int16
> SAL_CALL
setSequenceShort(
377 const Sequence
< sal_Int16
>& aSeq
) override
;
378 virtual Sequence
< sal_uInt16
> SAL_CALL
setSequenceUShort(
379 const Sequence
< sal_uInt16
>& aSeq
) override
;
380 virtual Sequence
< sal_Int32
> SAL_CALL
setSequenceLong(
381 const Sequence
< sal_Int32
>& aSeq
) override
;
382 virtual Sequence
< sal_uInt32
> SAL_CALL
setSequenceULong(
383 const Sequence
< sal_uInt32
>& aSeq
) override
;
384 virtual Sequence
< sal_Int64
> SAL_CALL
setSequenceHyper(
385 const Sequence
< sal_Int64
>& aSeq
) override
;
386 virtual Sequence
< sal_uInt64
> SAL_CALL
setSequenceUHyper(
387 const Sequence
< sal_uInt64
>& aSeq
) override
;
388 virtual Sequence
< float > SAL_CALL
setSequenceFloat(
389 const Sequence
< float >& aSeq
) override
;
390 virtual Sequence
< double > SAL_CALL
setSequenceDouble(
391 const Sequence
< double >& aSeq
) override
;
392 virtual Sequence
< TestEnum
> SAL_CALL
setSequenceEnum(
393 const Sequence
< TestEnum
>& aSeq
) override
;
394 virtual Sequence
< OUString
> SAL_CALL
setSequenceString(
395 const Sequence
< OUString
>& aString
) override
;
396 virtual Sequence
< Reference
< XInterface
> > SAL_CALL
setSequenceXInterface(
397 const Sequence
< Reference
< XInterface
> >& aSeq
) override
;
398 virtual Sequence
<Any
> SAL_CALL
setSequenceAny(
399 const Sequence
<Any
>& aSeq
) override
;
400 virtual Sequence
<TestElement
> SAL_CALL
setSequenceStruct(
401 const Sequence
< TestElement
>& aSeq
) override
;
402 virtual Sequence
< Sequence
< sal_Int32
> > SAL_CALL
setDim2(
403 const Sequence
<Sequence
< sal_Int32
> >& aSeq
) override
;
404 virtual Sequence
< Sequence
< Sequence
< sal_Int32
> > > SAL_CALL
setDim3(
405 const Sequence
< Sequence
< Sequence
< sal_Int32
> > >& aSeq
) override
;
406 virtual void SAL_CALL
setSequencesInOut(Sequence
< sal_Bool
>& aSeqBoolean
,
407 Sequence
< sal_Unicode
>& aSeqChar
,
408 Sequence
< sal_Int8
>& aSeqByte
,
409 Sequence
< sal_Int16
>& aSeqShort
,
410 Sequence
< sal_uInt16
>& aSeqUShort
,
411 Sequence
< sal_Int32
>& aSeqLong
,
412 Sequence
< sal_uInt32
>& aSeqULong
,
413 Sequence
< sal_Int64
>& aSeqHyper
,
414 Sequence
< sal_uInt64
>& aSeqUHyper
,
415 Sequence
< float >& aSeqFloat
,
416 Sequence
< double >& aSeqDouble
,
417 Sequence
< TestEnum
>& aSeqTestEnum
,
418 Sequence
< OUString
>& aSeqString
,
419 Sequence
<Reference
<XInterface
> >& aSeqXInterface
,
420 Sequence
< Any
>& aSeqAny
,
421 Sequence
< Sequence
< sal_Int32
> >& aSeqDim2
,
422 Sequence
< Sequence
< Sequence
< sal_Int32
> > >& aSeqDim3
) override
;
423 virtual void SAL_CALL
setSequencesOut( Sequence
< sal_Bool
>& aSeqBoolean
,
424 Sequence
< sal_Unicode
>& aSeqChar
,
425 Sequence
< sal_Int8
>& aSeqByte
,
426 Sequence
< sal_Int16
>& aSeqShort
,
427 Sequence
< sal_uInt16
>& aSeqUShort
,
428 Sequence
< sal_Int32
>& aSeqLong
,
429 Sequence
< sal_uInt32
>& aSeqULong
,
430 Sequence
< sal_Int64
>& aSeqHyper
,
431 Sequence
< sal_uInt64
>& aSeqUHyper
,
432 Sequence
< float >& aSeqFloat
,
433 Sequence
< double >& aSeqDouble
,
434 Sequence
< TestEnum
>& aSeqEnum
,
435 Sequence
< OUString
>& aSeqString
,
436 Sequence
< Reference
< XInterface
> >& aSeqXInterface
,
437 Sequence
< Any
>& aSeqAny
,
438 Sequence
< Sequence
< sal_Int32
> >& aSeqDim2
,
439 Sequence
< Sequence
< Sequence
< sal_Int32
> > >& aSeqDim3
) override
;
440 virtual void SAL_CALL
testConstructorsService(
441 Reference
< XComponentContext
> const & context
) override
;
442 virtual Reference
< XCurrentContextChecker
> SAL_CALL
443 getCurrentContextChecker() override
;
446 virtual void SAL_CALL
callRecursivly( const css::uno::Reference
< XRecursiveCall
>& xCall
, sal_Int32 nToCall
) override
;
449 //Dummy class for XComponent implementation
450 class Dummy
: public osl::DebugBase
<Dummy
>,
451 public WeakComponentImplHelperBase
454 Dummy(): WeakComponentImplHelperBase(*Mutex::getGlobalMutex()){}
458 Any
Test_Impl::transportAny( const Any
& value
)
466 void wait(sal_Int32 microSeconds
) {
467 OSL_ASSERT(microSeconds
>= 0 && microSeconds
<= SAL_MAX_INT32
/ 1000);
468 osl::Thread::wait(std::chrono::microseconds(microSeconds
));
473 void Test_Impl::call( sal_Int32 nCallId
, sal_Int32 nWaitMUSEC
)
478 m_bFirstCall
= false;
482 m_bSequenceOfCallTestPassed
= m_bSequenceOfCallTestPassed
&& (nCallId
> m_nLastCallId
);
484 m_nLastCallId
= nCallId
;
488 void Test_Impl::callOneway( sal_Int32 nCallId
, sal_Int32 nWaitMUSEC
)
491 m_bSequenceOfCallTestPassed
= m_bSequenceOfCallTestPassed
&& (nCallId
> m_nLastCallId
);
492 m_nLastCallId
= nCallId
;
496 sal_Bool
Test_Impl::sequenceOfCallTestPassed()
498 return m_bSequenceOfCallTestPassed
;
502 void SAL_CALL
Test_Impl::startRecursiveCall(
503 const css::uno::Reference
< XRecursiveCall
>& xCall
, sal_Int32 nToCall
)
505 MutexGuard
guard( m_mutex
);
509 xCall
->callRecursivly( this , nToCall
);
514 void SAL_CALL
Test_Impl::callRecursivly(
515 const css::uno::Reference
< XRecursiveCall
>& xCall
,
518 MutexGuard
guard( m_mutex
);
522 xCall
->callRecursivly( this , nToCall
);
526 Reference
< XMulti
> Test_Impl::getMulti() {
527 return new testtools::bridgetest::Multi
;
530 OUString
Test_Impl::testMulti(Reference
< XMulti
> const & multi
)
532 return testtools::bridgetest::testMulti(multi
);
536 void Test_Impl::setValues( sal_Bool bBool
, sal_Unicode cChar
, sal_Int8 nByte
,
537 sal_Int16 nShort
, sal_uInt16 nUShort
,
538 sal_Int32 nLong
, sal_uInt32 nULong
,
539 sal_Int64 nHyper
, sal_uInt64 nUHyper
,
540 float fFloat
, double fDouble
,
541 TestEnum eEnum
, const OUString
& rStr
,
542 const css::uno::Reference
< css::uno::XInterface
>& xTest
,
543 const css::uno::Any
& rAny
,
544 const css::uno::Sequence
<TestElement
>& rSequence
,
545 const ::test::testtools::bridgetest::TestDataElements
& rStruct
)
548 bBool
, cChar
, nByte
, nShort
, nUShort
, nLong
, nULong
, nHyper
, nUHyper
, fFloat
, fDouble
,
549 eEnum
, rStr
, xTest
, rAny
, rSequence
);
550 _aStructData
= rStruct
;
553 ::test::testtools::bridgetest::TestDataElements
Test_Impl::setValues2( sal_Bool
& bBool
, sal_Unicode
& cChar
, sal_Int8
& nByte
,
554 sal_Int16
& nShort
, sal_uInt16
& nUShort
,
555 sal_Int32
& nLong
, sal_uInt32
& nULong
,
556 sal_Int64
& nHyper
, sal_uInt64
& nUHyper
,
557 float& fFloat
, double& fDouble
,
558 TestEnum
& eEnum
, OUString
& rStr
,
559 css::uno::Reference
< css::uno::XInterface
>& xTest
,
561 css::uno::Sequence
<TestElement
>& rSequence
,
562 ::test::testtools::bridgetest::TestDataElements
& rStruct
)
565 bBool
, cChar
, nByte
, nShort
, nUShort
, nLong
, nULong
, nHyper
, nUHyper
, fFloat
, fDouble
,
566 eEnum
, rStr
, xTest
, rAny
, rSequence
);
567 _aStructData
= rStruct
;
569 TestElement elem
= rSequence
[ 0 ];
570 rSequence
[ 0 ] = rSequence
[ 1 ];
571 rSequence
[ 1 ] = elem
;
576 ::test::testtools::bridgetest::TestDataElements
Test_Impl::getValues( sal_Bool
& bBool
, sal_Unicode
& cChar
, sal_Int8
& nByte
,
577 sal_Int16
& nShort
, sal_uInt16
& nUShort
,
578 sal_Int32
& nLong
, sal_uInt32
& nULong
,
579 sal_Int64
& nHyper
, sal_uInt64
& nUHyper
,
580 float& fFloat
, double& fDouble
,
581 TestEnum
& eEnum
, OUString
& rStr
,
582 css::uno::Reference
< css::uno::XInterface
>& xTest
,
584 css::uno::Sequence
<TestElement
>& rSequence
,
585 ::test::testtools::bridgetest::TestDataElements
& rStruct
)
590 nShort
= _aData
.Short
;
591 nUShort
= _aData
.UShort
;
593 nULong
= _aData
.ULong
;
594 nHyper
= _aData
.Hyper
;
595 nUHyper
= _aData
.UHyper
;
596 fFloat
= _aData
.Float
;
597 fDouble
= _aData
.Double
;
599 rStr
= _aData
.String
;
600 xTest
= _aData
.Interface
;
602 rSequence
= _aData
.Sequence
;
603 rStruct
= _aStructData
;
607 ::test::testtools::bridgetest::TestDataElements
Test_Impl::raiseException( sal_Int16 nArgumentPos
, const OUString
& rMsg
, const Reference
< XInterface
> & xContext
)
609 IllegalArgumentException aExc
;
610 aExc
.ArgumentPosition
= nArgumentPos
;
611 aExc
.Message
= _aData
.String
= rMsg
;
612 aExc
.Context
= _aData
.Interface
= xContext
;
616 void Test_Impl::raiseRuntimeExceptionOneway( const OUString
& rMsg
, const Reference
< XInterface
> & xContext
)
618 RuntimeException aExc
;
619 aExc
.Message
= _aData
.String
= rMsg
;
620 aExc
.Context
= _aData
.Interface
= xContext
;
624 static void dothrow2(const RuntimeException
& e
)
628 static void dothrow(const RuntimeException
& e
)
631 // currently only for MSVC:
632 // just to test whether all bridges fall back to a RuntimeException
633 // in case of a thrown non-UNO exception:
636 throw ::std::bad_alloc();
642 Any
a( getCaughtException() );
643 RuntimeException exc
;
644 OSL_VERIFY( a
>>= exc
);
646 catch (...) // never throws anything
648 fprintf( stderr
, "\ngetCaughtException() failed!\n" );
656 sal_Int32
Test_Impl::getRuntimeException()
660 dothrow( RuntimeException( _aData
.String
, _aData
.Interface
) );
664 Any
a( getCaughtException() );
667 return 0; // for dummy
670 void Test_Impl::setRuntimeException( sal_Int32
)
672 RuntimeException aExc
;
673 aExc
.Message
= _aData
.String
;
674 aExc
.Context
= _aData
.Interface
;
675 throwException( makeAny( aExc
) );
678 // XBridgeTest2 -------------------------------------------------------------
679 Sequence
< sal_Bool
> SAL_CALL
Test_Impl::setSequenceBool(
680 const Sequence
< sal_Bool
>& aSeq
)
686 Sequence
< sal_Unicode
> SAL_CALL
Test_Impl::setSequenceChar(
687 const Sequence
< sal_Unicode
>& aSeq
)
693 Sequence
< sal_Int8
> SAL_CALL
Test_Impl::setSequenceByte(
694 const Sequence
< sal_Int8
>& aSeq
)
700 Sequence
< sal_Int16
> SAL_CALL
Test_Impl::setSequenceShort(
701 const Sequence
< sal_Int16
>& aSeq
)
707 Sequence
< sal_uInt16
> SAL_CALL
Test_Impl::setSequenceUShort(
708 const Sequence
< sal_uInt16
>& aSeq
)
714 Sequence
< sal_Int32
> SAL_CALL
Test_Impl::setSequenceLong(
715 const Sequence
< sal_Int32
>& aSeq
)
721 Sequence
< sal_uInt32
> SAL_CALL
Test_Impl::setSequenceULong(
722 const Sequence
< sal_uInt32
>& aSeq
)
728 Sequence
< sal_Int64
> SAL_CALL
Test_Impl::setSequenceHyper(
729 const Sequence
< sal_Int64
>& aSeq
)
735 Sequence
< sal_uInt64
> SAL_CALL
Test_Impl::setSequenceUHyper(
736 const Sequence
< sal_uInt64
>& aSeq
)
742 Sequence
< float > SAL_CALL
Test_Impl::setSequenceFloat(
743 const Sequence
< float >& aSeq
)
749 Sequence
< double > SAL_CALL
Test_Impl::setSequenceDouble(
750 const Sequence
< double >& aSeq
)
756 Sequence
< TestEnum
> SAL_CALL
Test_Impl::setSequenceEnum(
757 const Sequence
< TestEnum
>& aSeq
)
763 Sequence
< OUString
> SAL_CALL
Test_Impl::setSequenceString(
764 const Sequence
< OUString
>& aSeq
)
770 Sequence
< Reference
< XInterface
> > SAL_CALL
Test_Impl::setSequenceXInterface(
771 const Sequence
< Reference
< XInterface
> >& aSeq
)
777 Sequence
<Any
> SAL_CALL
Test_Impl::setSequenceAny(
778 const Sequence
<Any
>& aSeq
)
784 Sequence
<TestElement
> SAL_CALL
Test_Impl::setSequenceStruct(
785 const Sequence
< TestElement
>& aSeq
)
791 Sequence
< Sequence
< sal_Int32
> > SAL_CALL
Test_Impl::setDim2(
792 const Sequence
<Sequence
< sal_Int32
> >& aSeq
)
798 Sequence
< Sequence
< Sequence
< sal_Int32
> > > SAL_CALL
Test_Impl::setDim3(
799 const Sequence
< Sequence
< Sequence
< sal_Int32
> > >& aSeq
)
805 void SAL_CALL
Test_Impl::setSequencesInOut(Sequence
< sal_Bool
>& aSeqBoolean
,
806 Sequence
< sal_Unicode
>& aSeqChar
,
807 Sequence
< sal_Int8
>& aSeqByte
,
808 Sequence
< sal_Int16
>& aSeqShort
,
809 Sequence
< sal_uInt16
>& aSeqUShort
,
810 Sequence
< sal_Int32
>& aSeqLong
,
811 Sequence
< sal_uInt32
>& aSeqULong
,
812 Sequence
< sal_Int64
>& aSeqHyper
,
813 Sequence
< sal_uInt64
>& aSeqUHyper
,
814 Sequence
< float >& aSeqFloat
,
815 Sequence
< double >& aSeqDouble
,
816 Sequence
< TestEnum
>& aSeqTestEnum
,
817 Sequence
< OUString
>& aSeqString
,
818 Sequence
<Reference
<XInterface
> >& aSeqXInterface
,
819 Sequence
< Any
>& aSeqAny
,
820 Sequence
< Sequence
< sal_Int32
> >& aSeqDim2
,
821 Sequence
< Sequence
< Sequence
< sal_Int32
> > >& aSeqDim3
)
823 _arBool
= aSeqBoolean
;
826 _arShort
= aSeqShort
;
827 _arUShort
= aSeqUShort
;
829 _arULong
= aSeqULong
;
830 _arHyper
= aSeqHyper
;
831 _arUHyper
= aSeqUHyper
;
832 _arFloat
= aSeqFloat
;
833 _arDouble
= aSeqDouble
;
834 _arEnum
= aSeqTestEnum
;
835 _arString
= aSeqString
;
836 _arObject
= aSeqXInterface
;
842 void SAL_CALL
Test_Impl::setSequencesOut( Sequence
< sal_Bool
>& aSeqBoolean
,
843 Sequence
< sal_Unicode
>& aSeqChar
,
844 Sequence
< sal_Int8
>& aSeqByte
,
845 Sequence
< sal_Int16
>& aSeqShort
,
846 Sequence
< sal_uInt16
>& aSeqUShort
,
847 Sequence
< sal_Int32
>& aSeqLong
,
848 Sequence
< sal_uInt32
>& aSeqULong
,
849 Sequence
< sal_Int64
>& aSeqHyper
,
850 Sequence
< sal_uInt64
>& aSeqUHyper
,
851 Sequence
< float >& aSeqFloat
,
852 Sequence
< double >& aSeqDouble
,
853 Sequence
< TestEnum
>& aSeqEnum
,
854 Sequence
< OUString
>& aSeqString
,
855 Sequence
< Reference
< XInterface
> >& aSeqXInterface
,
856 Sequence
< Any
>& aSeqAny
,
857 Sequence
< Sequence
< sal_Int32
> >& aSeqDim2
,
858 Sequence
< Sequence
< Sequence
< sal_Int32
> > >& aSeqDim3
)
860 aSeqBoolean
= _arBool
;
863 aSeqShort
= _arShort
;
864 aSeqUShort
= _arUShort
;
866 aSeqULong
= _arULong
;
867 aSeqHyper
= _arHyper
;
868 aSeqUHyper
= _arUHyper
;
869 aSeqFloat
= _arFloat
;
870 aSeqDouble
= _arDouble
;
872 aSeqString
= _arString
;
873 aSeqXInterface
= _arObject
;
879 void Test_Impl::testConstructorsService(
880 Reference
< XComponentContext
> const & context
)
882 Sequence
< sal_Bool
> arg14(1); arg14
[0] = true;
883 Sequence
< sal_Int8
> arg15(1); arg15
[0] = SAL_MIN_INT8
;
884 Sequence
< sal_Int16
> arg16(1); arg16
[0] = SAL_MIN_INT16
;
885 Sequence
< sal_uInt16
> arg17(1); arg17
[0] = SAL_MAX_UINT16
;
886 Sequence
< sal_Int32
> arg18(1); arg18
[0] = SAL_MIN_INT32
;
887 Sequence
< sal_uInt32
> arg19(1); arg19
[0] = SAL_MAX_UINT32
;
888 Sequence
< sal_Int64
> arg20(1); arg20
[0] = SAL_MIN_INT64
;
889 Sequence
< sal_uInt64
> arg21(1); arg21
[0] = SAL_MAX_UINT64
;
890 Sequence
< float > arg22(1); arg22
[0] = 0.123f
;
891 Sequence
< double > arg23(1); arg23
[0] = 0.456;
892 Sequence
< sal_Unicode
> arg24(1); arg24
[0] = 'X';
893 Sequence
< OUString
> arg25
{ "test" };
894 Sequence
< Type
> arg26(1); arg26
[0] = UnoType
< Any
>::get();
895 Sequence
< Any
> arg27(1); arg27
[0] <<= true;
896 Sequence
< Sequence
< sal_Bool
> > arg28(1);
897 arg28
[0] = Sequence
< sal_Bool
>(1); arg28
[0][0] = true;
898 Sequence
< Sequence
< Any
> > arg29(1); arg29
[0] = Sequence
< Any
>(1);
899 arg29
[0][0] <<= true;
900 Sequence
< TestEnum
> arg30(1); arg30
[0] = TestEnum_TWO
;
901 Sequence
< TestStruct
> arg31(1); arg31
[0].member
= 10;
902 Sequence
< TestPolyStruct
< sal_Bool
> > arg32(1); arg32
[0].member
= true;
903 Sequence
< TestPolyStruct
< Any
> > arg33(1); arg33
[0].member
<<= true;
904 Sequence
< Reference
< XInterface
> > arg34(1);
905 Constructors::create1(context
,
918 UnoType
< Any
>::get(),
943 TestPolyStruct
< sal_Bool
>(true),
944 TestPolyStruct
< Any
>(makeAny(true)),
945 Reference
< XInterface
>(nullptr));
946 Sequence
< Any
> args(40);
948 args
[1] <<= SAL_MIN_INT8
;
949 args
[2] <<= SAL_MIN_INT16
;
950 args
[3] <<= SAL_MAX_UINT16
;
951 args
[4] <<= SAL_MIN_INT32
;
952 args
[5] <<= SAL_MAX_UINT32
;
953 args
[6] <<= SAL_MIN_INT64
;
954 args
[7] <<= SAL_MAX_UINT64
;
958 args
[11] <<= OUString("test");
959 args
[12] <<= UnoType
< Any
>::get();
982 args
[35] <<= TestEnum_TWO
;
983 args
[36] <<= TestStruct(10);
984 args
[37] <<= TestPolyStruct
< sal_Bool
>(true);
985 args
[38] <<= TestPolyStruct
< Any
>(makeAny(true));
986 args
[39] <<= Reference
< XInterface
>(nullptr);
987 Constructors::create2(context
, args
);
989 Sequence
<Type
> argSeq1(1); argSeq1
[0] = cppu::UnoType
<sal_Int32
>::get();
990 Sequence
<Reference
<XInterface
> > argSeq2
{ static_cast<XComponent
*>(new Dummy()) };
991 Sequence
<Reference
<XComponent
> > argSeq2a
{ static_cast<XComponent
*>(new Dummy()) };
993 Sequence
<TestPolyStruct2
<sal_Unicode
, Sequence
<Any
> > > argSeq3(1);
994 argSeq3
[0] = TestPolyStruct2
<sal_Unicode
, Sequence
<Any
> >('X', arg27
);
995 Sequence
<TestPolyStruct2
<TestPolyStruct
<sal_Unicode
>, Sequence
<Any
> > > argSeq4(1);
996 argSeq4
[0] = TestPolyStruct2
<TestPolyStruct
<sal_Unicode
>, Sequence
<Any
> >(
997 TestPolyStruct
<sal_Unicode
>('X'), arg27
);
998 Sequence
<Sequence
<sal_Int32
> > argSeq5(1);
999 argSeq5
[0] = Sequence
<sal_Int32
>(1); argSeq5
[0][0] = SAL_MIN_INT32
;
1000 Sequence
<TestPolyStruct
<sal_Int32
> > argSeq6(1);
1001 argSeq6
[0] = TestPolyStruct
<sal_Int32
>(SAL_MIN_INT32
);
1002 Sequence
<TestPolyStruct
<TestPolyStruct2
<sal_Unicode
, Any
> > > argSeq7(1);
1003 argSeq7
[0] = TestPolyStruct
<TestPolyStruct2
<sal_Unicode
, Any
> >(
1004 TestPolyStruct2
<sal_Unicode
, Any
>('X', Any(true)));
1005 Sequence
<TestPolyStruct
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>,OUString
> > > argSeq8(1);
1006 argSeq8
[0] = TestPolyStruct
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>,OUString
> > (
1007 TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>,OUString
>(
1008 TestPolyStruct2
<sal_Unicode
, Any
>('X', Any(true)), OUString("test")));
1009 Sequence
<TestPolyStruct2
<OUString
, TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> > > > argSeq9(1);
1010 argSeq9
[0] = TestPolyStruct2
<OUString
, TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> > >(
1011 OUString("test"), TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> >(
1012 'X', TestPolyStruct
<Any
>(Any(true))));
1013 Sequence
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>, TestPolyStruct
<sal_Unicode
> > > argSeq10(1);
1014 argSeq10
[0] = TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>, TestPolyStruct
<sal_Unicode
> >(
1015 TestPolyStruct2
<sal_Unicode
, Any
>('X', Any(true)), TestPolyStruct
<sal_Unicode
>('X'));
1016 Sequence
<Sequence
<TestPolyStruct
<sal_Unicode
> > > argSeq11(1);
1017 argSeq11
[0] = Sequence
<TestPolyStruct
<sal_Unicode
> >(1);
1018 argSeq11
[0][0] = TestPolyStruct
<sal_Unicode
>('X');
1019 Sequence
<Sequence
<TestPolyStruct
<TestPolyStruct2
<sal_Unicode
,Any
> > > > argSeq12(1);
1020 argSeq12
[0] = Sequence
<TestPolyStruct
<TestPolyStruct2
<sal_Unicode
,Any
> > >(1);
1021 argSeq12
[0][0] = TestPolyStruct
<TestPolyStruct2
<sal_Unicode
,Any
> >(
1022 TestPolyStruct2
<sal_Unicode
,Any
>('X', Any(true)));
1023 Sequence
<Sequence
<TestPolyStruct
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>,OUString
> > > > argSeq13(1);
1024 argSeq13
[0] = Sequence
<TestPolyStruct
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>,OUString
> > >(1);
1025 argSeq13
[0][0] = TestPolyStruct
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>,OUString
> >(
1026 TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>,OUString
>(
1027 TestPolyStruct2
<sal_Unicode
,Any
>('X', Any(true)), OUString("test")));
1028 Sequence
<Sequence
<TestPolyStruct2
<OUString
, TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> > > > > argSeq14(1);
1029 argSeq14
[0] = Sequence
<TestPolyStruct2
<OUString
, TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> > > >(1);
1030 argSeq14
[0][0] = TestPolyStruct2
<OUString
, TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> > >(
1031 OUString("test"), TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> >(
1032 'X', TestPolyStruct
<Any
>(Any(true))));
1033 Sequence
<Sequence
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>, TestPolyStruct
<sal_Unicode
> > > > argSeq15(1);
1034 argSeq15
[0] = Sequence
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>, TestPolyStruct
<sal_Unicode
> > >(1);
1035 argSeq15
[0][0] = TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
,Any
>, TestPolyStruct
<sal_Unicode
> >(
1036 TestPolyStruct2
<sal_Unicode
,Any
>('X',Any(true)), TestPolyStruct
<sal_Unicode
>('X'));
1038 Constructors2::create1(
1040 TestPolyStruct
<Type
>(cppu::UnoType
<sal_Int32
>::get()),
1041 TestPolyStruct
<Any
>(Any(true)),
1042 TestPolyStruct
<sal_Bool
>(true),
1043 TestPolyStruct
<sal_Int8
>(SAL_MIN_INT8
),
1044 TestPolyStruct
<sal_Int16
>(SAL_MIN_INT16
),
1045 TestPolyStruct
<sal_Int32
>(SAL_MIN_INT32
),
1046 TestPolyStruct
<sal_Int64
>(SAL_MIN_INT64
),
1047 TestPolyStruct
<sal_Unicode
>('X'),
1048 TestPolyStruct
<OUString
>(OUString("test")),
1049 TestPolyStruct
<float>(0.123f
),
1050 TestPolyStruct
<double>(0.456),
1051 TestPolyStruct
<Reference
<XInterface
> >(static_cast<XBridgeTest2
*>(this)),
1052 TestPolyStruct
<Reference
<XComponent
> >(static_cast<XComponent
*>(new Dummy())),
1053 TestPolyStruct
<TestEnum
>(TestEnum_TWO
),
1054 TestPolyStruct
<TestPolyStruct2
<sal_Unicode
, Any
> >(
1055 TestPolyStruct2
<sal_Unicode
, Any
>('X', Any(true))),
1056 TestPolyStruct
<TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>,OUString
> > (
1057 TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>,OUString
>(
1058 TestPolyStruct2
<sal_Unicode
, Any
>('X', Any(true)), OUString("test"))),
1059 TestPolyStruct2
<OUString
, TestPolyStruct2
<sal_Unicode
,TestPolyStruct
<Any
> > >(
1061 TestPolyStruct2
<sal_Unicode
, TestPolyStruct
<Any
> >('X', TestPolyStruct
<Any
>(Any(true)))),
1062 TestPolyStruct2
<TestPolyStruct2
<sal_Unicode
, Any
>, TestPolyStruct
<sal_Unicode
> >(
1063 TestPolyStruct2
<sal_Unicode
, Any
>('X', Any(true)),
1064 TestPolyStruct
<sal_Unicode
>('X')),
1065 TestPolyStruct
<Sequence
<Type
> >(argSeq1
),
1066 TestPolyStruct
<Sequence
<Any
> >(arg27
),
1067 TestPolyStruct
<Sequence
<sal_Bool
> >(arg14
),
1068 TestPolyStruct
<Sequence
<sal_Int8
> >(arg15
),
1069 TestPolyStruct
<Sequence
<sal_Int16
> >(arg16
),
1070 TestPolyStruct
<Sequence
<sal_Int32
> >(arg18
),
1071 TestPolyStruct
<Sequence
<sal_Int64
> >(arg20
),
1072 TestPolyStruct
<Sequence
<sal_Unicode
> >(arg24
),
1073 TestPolyStruct
<Sequence
<OUString
> >(arg25
),
1074 TestPolyStruct
<Sequence
<float> >(arg22
),
1075 TestPolyStruct
<Sequence
<double> >(arg23
),
1076 TestPolyStruct
<Sequence
<Reference
<XInterface
> > >(argSeq2
),
1077 TestPolyStruct
<Sequence
<Reference
<XComponent
> > >(argSeq2a
),
1078 TestPolyStruct
<Sequence
<TestEnum
> >(arg30
),
1079 TestPolyStruct
<Sequence
<TestPolyStruct2
<sal_Unicode
, Sequence
<Any
> > > >(argSeq3
),
1080 TestPolyStruct
<Sequence
<TestPolyStruct2
<TestPolyStruct
<sal_Unicode
>, Sequence
<Any
> > > > (argSeq4
),
1081 TestPolyStruct
<Sequence
<Sequence
<sal_Int32
> > >(argSeq5
),
1094 Reference
< XCurrentContextChecker
> Test_Impl::getCurrentContextChecker()
1096 return new testtools::bridgetest::CurrentContextChecker
;
1101 OUString
Test_Impl::getImplementationName()
1106 sal_Bool
Test_Impl::supportsService( const OUString
& rServiceName
)
1108 return cppu::supportsService(this, rServiceName
);
1111 Sequence
< OUString
> Test_Impl::getSupportedServiceNames()
1113 return bridge_object::getSupportedServiceNames();
1117 static Reference
< XInterface
> Test_Impl_create(
1118 SAL_UNUSED_PARAMETER
const Reference
< XMultiServiceFactory
> & )
1120 return Reference
< XInterface
>( static_cast<XBridgeTest
*>(new Test_Impl()) );
1127 SAL_DLLPUBLIC_EXPORT
void * component_getFactory(
1128 const sal_Char
* pImplName
, SAL_UNUSED_PARAMETER
void * pServiceManager
,
1129 SAL_UNUSED_PARAMETER
void * )
1131 void * pRet
= nullptr;
1133 if (pServiceManager
&& rtl_str_compare( pImplName
, IMPLNAME
) == 0)
1135 Reference
< XSingleServiceFactory
> xFactory( createSingleFactory(
1136 static_cast< XMultiServiceFactory
* >( pServiceManager
),
1138 bridge_object::Test_Impl_create
,
1139 bridge_object::getSupportedServiceNames() ) );
1143 xFactory
->acquire();
1144 pRet
= xFactory
.get();
1152 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */