xref: /AOO41X/main/testtools/source/bridgetest/cppobj.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_testtools.hxx"
30*cdf0e10cSrcweir #include <stdio.h>
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #include "cppu/unotype.hxx"
33*cdf0e10cSrcweir #include <osl/diagnose.h>
34*cdf0e10cSrcweir #include "osl/diagnose.hxx"
35*cdf0e10cSrcweir #include <osl/thread.h>
36*cdf0e10cSrcweir #include <osl/mutex.hxx>
37*cdf0e10cSrcweir #include <osl/time.h>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #include <cppuhelper/implbase3.hxx>
40*cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
41*cdf0e10cSrcweir #include "cppuhelper/exc_hlp.hxx"
42*cdf0e10cSrcweir #include "cppuhelper/compbase_ex.hxx"
43*cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
44*cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp>
45*cdf0e10cSrcweir #include "com/sun/star/uno/Any.hxx"
46*cdf0e10cSrcweir #include "com/sun/star/uno/RuntimeException.hpp"
47*cdf0e10cSrcweir #include "com/sun/star/uno/Sequence.hxx"
48*cdf0e10cSrcweir 
49*cdf0e10cSrcweir #include "test/testtools/bridgetest/Constructors.hpp"
50*cdf0e10cSrcweir #include "test/testtools/bridgetest/Constructors2.hpp"
51*cdf0e10cSrcweir #include "test/testtools/bridgetest/TestPolyStruct.hpp"
52*cdf0e10cSrcweir #include "test/testtools/bridgetest/TestPolyStruct2.hpp"
53*cdf0e10cSrcweir #include "test/testtools/bridgetest/XBridgeTest2.hpp"
54*cdf0e10cSrcweir #include "test/testtools/bridgetest/XMulti.hpp"
55*cdf0e10cSrcweir 
56*cdf0e10cSrcweir #include "currentcontextchecker.hxx"
57*cdf0e10cSrcweir #include "multi.hxx"
58*cdf0e10cSrcweir 
59*cdf0e10cSrcweir using namespace rtl;
60*cdf0e10cSrcweir using namespace osl;
61*cdf0e10cSrcweir using namespace cppu;
62*cdf0e10cSrcweir using namespace com::sun::star::uno;
63*cdf0e10cSrcweir using namespace com::sun::star::lang;
64*cdf0e10cSrcweir using namespace com::sun::star::registry;
65*cdf0e10cSrcweir using namespace test::testtools::bridgetest;
66*cdf0e10cSrcweir 
67*cdf0e10cSrcweir #define SERVICENAME		"com.sun.star.test.bridge.CppTestObject"
68*cdf0e10cSrcweir #define IMPLNAME		"com.sun.star.comp.bridge.CppTestObject"
69*cdf0e10cSrcweir 
70*cdf0e10cSrcweir namespace bridge_object
71*cdf0e10cSrcweir {
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir //--------------------------------------------------------------------------------------------------
74*cdf0e10cSrcweir inline static Sequence< OUString > getSupportedServiceNames()
75*cdf0e10cSrcweir {
76*cdf0e10cSrcweir 	OUString aName( RTL_CONSTASCII_USTRINGPARAM(SERVICENAME) );
77*cdf0e10cSrcweir 	return Sequence< OUString >( &aName, 1 );
78*cdf0e10cSrcweir }
79*cdf0e10cSrcweir 
80*cdf0e10cSrcweir //==================================================================================================
81*cdf0e10cSrcweir static void assign( TestElement & rData,
82*cdf0e10cSrcweir 					sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
83*cdf0e10cSrcweir 					sal_Int16 nShort, sal_uInt16 nUShort,
84*cdf0e10cSrcweir 					sal_Int32 nLong, sal_uInt32 nULong,
85*cdf0e10cSrcweir 					sal_Int64 nHyper, sal_uInt64 nUHyper,
86*cdf0e10cSrcweir 					float fFloat, double fDouble,
87*cdf0e10cSrcweir 					TestEnum eEnum, const ::rtl::OUString& rStr,
88*cdf0e10cSrcweir 					const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
89*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& rAny )
90*cdf0e10cSrcweir {
91*cdf0e10cSrcweir 	rData.Bool = bBool;
92*cdf0e10cSrcweir 	rData.Char = cChar;
93*cdf0e10cSrcweir 	rData.Byte = nByte;
94*cdf0e10cSrcweir 	rData.Short = nShort;
95*cdf0e10cSrcweir 	rData.UShort = nUShort;
96*cdf0e10cSrcweir 	rData.Long = nLong;
97*cdf0e10cSrcweir 	rData.ULong = nULong;
98*cdf0e10cSrcweir 	rData.Hyper = nHyper;
99*cdf0e10cSrcweir 	rData.UHyper = nUHyper;
100*cdf0e10cSrcweir 	rData.Float = fFloat;
101*cdf0e10cSrcweir 	rData.Double = fDouble;
102*cdf0e10cSrcweir 	rData.Enum = eEnum;
103*cdf0e10cSrcweir 	rData.String = rStr;
104*cdf0e10cSrcweir 	rData.Interface = xTest;
105*cdf0e10cSrcweir 	rData.Any = rAny;
106*cdf0e10cSrcweir }
107*cdf0e10cSrcweir //==================================================================================================
108*cdf0e10cSrcweir static void assign( TestData & rData,
109*cdf0e10cSrcweir 					sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
110*cdf0e10cSrcweir 					sal_Int16 nShort, sal_uInt16 nUShort,
111*cdf0e10cSrcweir 					sal_Int32 nLong, sal_uInt32 nULong,
112*cdf0e10cSrcweir 					sal_Int64 nHyper, sal_uInt64 nUHyper,
113*cdf0e10cSrcweir 					float fFloat, double fDouble,
114*cdf0e10cSrcweir 					TestEnum eEnum, const ::rtl::OUString& rStr,
115*cdf0e10cSrcweir 					const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
116*cdf0e10cSrcweir 					const ::com::sun::star::uno::Any& rAny,
117*cdf0e10cSrcweir 					const com::sun::star::uno::Sequence< TestElement >& rSequence )
118*cdf0e10cSrcweir {
119*cdf0e10cSrcweir 	assign( (TestElement &)rData,
120*cdf0e10cSrcweir 			bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
121*cdf0e10cSrcweir 			eEnum, rStr, xTest, rAny );
122*cdf0e10cSrcweir 	rData.Sequence = rSequence;
123*cdf0e10cSrcweir }
124*cdf0e10cSrcweir 
125*cdf0e10cSrcweir //==================================================================================================
126*cdf0e10cSrcweir class Test_Impl :
127*cdf0e10cSrcweir     public osl::DebugBase<Test_Impl>,
128*cdf0e10cSrcweir     public WeakImplHelper3< XBridgeTest2, XServiceInfo , XRecursiveCall >
129*cdf0e10cSrcweir {
130*cdf0e10cSrcweir 	TestData _aData, _aStructData;
131*cdf0e10cSrcweir 	sal_Int32 m_nLastCallId;
132*cdf0e10cSrcweir 	sal_Bool m_bFirstCall;
133*cdf0e10cSrcweir 	sal_Bool m_bSequenceOfCallTestPassed;
134*cdf0e10cSrcweir 	Mutex m_mutex;
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir     Sequence<sal_Bool> _arBool;
137*cdf0e10cSrcweir     Sequence<sal_Unicode> _arChar;
138*cdf0e10cSrcweir     Sequence<sal_Int8> _arByte;
139*cdf0e10cSrcweir     Sequence<sal_Int16> _arShort;
140*cdf0e10cSrcweir     Sequence<sal_uInt16> _arUShort;
141*cdf0e10cSrcweir     Sequence<sal_Int32> _arLong;
142*cdf0e10cSrcweir     Sequence<sal_uInt32> _arULong;
143*cdf0e10cSrcweir     Sequence<sal_Int64> _arHyper;
144*cdf0e10cSrcweir     Sequence<sal_uInt64> _arUHyper;
145*cdf0e10cSrcweir     Sequence<OUString> _arString;
146*cdf0e10cSrcweir     Sequence<float> _arFloat;
147*cdf0e10cSrcweir     Sequence<double> _arDouble;
148*cdf0e10cSrcweir     Sequence<TestEnum> _arEnum;
149*cdf0e10cSrcweir     Sequence<Reference<XInterface> > _arObject;
150*cdf0e10cSrcweir     Sequence<Sequence<sal_Int32> > _arLong2;
151*cdf0e10cSrcweir     Sequence<Sequence<Sequence<sal_Int32> > > _arLong3;
152*cdf0e10cSrcweir     Sequence<Any> _arAny;
153*cdf0e10cSrcweir     Sequence<TestElement> _arStruct;
154*cdf0e10cSrcweir 
155*cdf0e10cSrcweir public:
156*cdf0e10cSrcweir 	Test_Impl() : m_nLastCallId( 0 ),
157*cdf0e10cSrcweir 				  m_bFirstCall( sal_True ),
158*cdf0e10cSrcweir 				  m_bSequenceOfCallTestPassed( sal_True )
159*cdf0e10cSrcweir 		{}
160*cdf0e10cSrcweir 	virtual ~Test_Impl()
161*cdf0e10cSrcweir 		{
162*cdf0e10cSrcweir 			OSL_TRACE( "> scalar Test_Impl dtor <" );
163*cdf0e10cSrcweir 		}
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir 	void SAL_CALL acquire() throw ()
166*cdf0e10cSrcweir 	{
167*cdf0e10cSrcweir 		OWeakObject::acquire();
168*cdf0e10cSrcweir 	}
169*cdf0e10cSrcweir 	void SAL_CALL release() throw ()
170*cdf0e10cSrcweir 	{
171*cdf0e10cSrcweir 		OWeakObject::release();
172*cdf0e10cSrcweir  	}
173*cdf0e10cSrcweir 
174*cdf0e10cSrcweir 	// XServiceInfo
175*cdf0e10cSrcweir 	virtual OUString SAL_CALL getImplementationName() throw (RuntimeException);
176*cdf0e10cSrcweir 	virtual sal_Bool SAL_CALL supportsService( const OUString & rServiceName ) throw (RuntimeException);
177*cdf0e10cSrcweir 	virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw (RuntimeException);
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	// XLBTestBase
180*cdf0e10cSrcweir     virtual void SAL_CALL setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
181*cdf0e10cSrcweir 									 sal_Int16 nShort, sal_uInt16 nUShort,
182*cdf0e10cSrcweir 									 sal_Int32 nLong, sal_uInt32 nULong,
183*cdf0e10cSrcweir 									 sal_Int64 nHyper, sal_uInt64 nUHyper,
184*cdf0e10cSrcweir 									 float fFloat, double fDouble,
185*cdf0e10cSrcweir 									 TestEnum eEnum, const ::rtl::OUString& rStr,
186*cdf0e10cSrcweir 									 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
187*cdf0e10cSrcweir 									 const ::com::sun::star::uno::Any& rAny,
188*cdf0e10cSrcweir 									 const ::com::sun::star::uno::Sequence<TestElement >& rSequence,
189*cdf0e10cSrcweir 									 const TestData& rStruct )
190*cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
191*cdf0e10cSrcweir 
192*cdf0e10cSrcweir     virtual TestData SAL_CALL setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
193*cdf0e10cSrcweir 												sal_Int16& nShort, sal_uInt16& nUShort,
194*cdf0e10cSrcweir 												sal_Int32& nLong, sal_uInt32& nULong,
195*cdf0e10cSrcweir 												sal_Int64& nHyper, sal_uInt64& nUHyper,
196*cdf0e10cSrcweir 												float& fFloat, double& fDouble,
197*cdf0e10cSrcweir 												TestEnum& eEnum, rtl::OUString& rStr,
198*cdf0e10cSrcweir 												::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
199*cdf0e10cSrcweir 												::com::sun::star::uno::Any& rAny,
200*cdf0e10cSrcweir 												::com::sun::star::uno::Sequence<TestElement >& rSequence,
201*cdf0e10cSrcweir 												TestData& rStruct )
202*cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
203*cdf0e10cSrcweir 
204*cdf0e10cSrcweir     virtual TestData SAL_CALL getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
205*cdf0e10cSrcweir 											   sal_Int16& nShort, sal_uInt16& nUShort,
206*cdf0e10cSrcweir 											   sal_Int32& nLong, sal_uInt32& nULong,
207*cdf0e10cSrcweir 											   sal_Int64& nHyper, sal_uInt64& nUHyper,
208*cdf0e10cSrcweir 											   float& fFloat, double& fDouble,
209*cdf0e10cSrcweir 											   TestEnum& eEnum, rtl::OUString& rStr,
210*cdf0e10cSrcweir 											   ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
211*cdf0e10cSrcweir 											   ::com::sun::star::uno::Any& rAny,
212*cdf0e10cSrcweir 											   ::com::sun::star::uno::Sequence< TestElement >& rSequence,
213*cdf0e10cSrcweir 											   TestData& rStruct )
214*cdf0e10cSrcweir 		throw(com::sun::star::uno::RuntimeException);
215*cdf0e10cSrcweir 
216*cdf0e10cSrcweir     virtual SmallStruct SAL_CALL echoSmallStruct(const SmallStruct& rStruct) throw(com::sun::star::uno::RuntimeException)
217*cdf0e10cSrcweir         { return rStruct; }
218*cdf0e10cSrcweir     virtual MediumStruct SAL_CALL echoMediumStruct(const MediumStruct& rStruct) throw(com::sun::star::uno::RuntimeException)
219*cdf0e10cSrcweir         { return rStruct; }
220*cdf0e10cSrcweir     virtual BigStruct SAL_CALL echoBigStruct(const BigStruct& rStruct) throw(com::sun::star::uno::RuntimeException)
221*cdf0e10cSrcweir         { return rStruct; }
222*cdf0e10cSrcweir     virtual AllFloats SAL_CALL echoAllFloats(const AllFloats& rStruct) throw(com::sun::star::uno::RuntimeException)
223*cdf0e10cSrcweir         { return rStruct; }
224*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL testPPCAlignment( sal_Int64, sal_Int64, sal_Int32, sal_Int64, sal_Int32 i2 ) throw(com::sun::star::uno::RuntimeException)
225*cdf0e10cSrcweir         { return i2; }
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL getBool() throw(com::sun::star::uno::RuntimeException)
228*cdf0e10cSrcweir 		{ return _aData.Bool; }
229*cdf0e10cSrcweir     virtual sal_Int8 SAL_CALL getByte() throw(com::sun::star::uno::RuntimeException)
230*cdf0e10cSrcweir 		{ return _aData.Byte; }
231*cdf0e10cSrcweir     virtual sal_Unicode SAL_CALL getChar() throw(com::sun::star::uno::RuntimeException)
232*cdf0e10cSrcweir 		{ return _aData.Char; }
233*cdf0e10cSrcweir     virtual sal_Int16 SAL_CALL getShort() throw(com::sun::star::uno::RuntimeException)
234*cdf0e10cSrcweir 		{ return _aData.Short; }
235*cdf0e10cSrcweir     virtual sal_uInt16 SAL_CALL getUShort() throw(com::sun::star::uno::RuntimeException)
236*cdf0e10cSrcweir 		{ return _aData.UShort; }
237*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getLong() throw(com::sun::star::uno::RuntimeException)
238*cdf0e10cSrcweir 		{ return _aData.Long; }
239*cdf0e10cSrcweir     virtual sal_uInt32 SAL_CALL getULong() throw(com::sun::star::uno::RuntimeException)
240*cdf0e10cSrcweir 		{ return _aData.ULong; }
241*cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL getHyper() throw(com::sun::star::uno::RuntimeException)
242*cdf0e10cSrcweir 		{ return _aData.Hyper; }
243*cdf0e10cSrcweir     virtual sal_uInt64 SAL_CALL getUHyper() throw(com::sun::star::uno::RuntimeException)
244*cdf0e10cSrcweir 		{ return _aData.UHyper; }
245*cdf0e10cSrcweir     virtual float SAL_CALL getFloat() throw(com::sun::star::uno::RuntimeException)
246*cdf0e10cSrcweir 		{ return _aData.Float; }
247*cdf0e10cSrcweir     virtual double SAL_CALL getDouble() throw(com::sun::star::uno::RuntimeException)
248*cdf0e10cSrcweir 		{ return _aData.Double; }
249*cdf0e10cSrcweir     virtual TestEnum SAL_CALL getEnum() throw(com::sun::star::uno::RuntimeException)
250*cdf0e10cSrcweir 		{ return _aData.Enum; }
251*cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL getString() throw(com::sun::star::uno::RuntimeException)
252*cdf0e10cSrcweir 		{ return _aData.String; }
253*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getInterface(  ) throw(com::sun::star::uno::RuntimeException)
254*cdf0e10cSrcweir 		{ return _aData.Interface; }
255*cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL getAny() throw(com::sun::star::uno::RuntimeException)
256*cdf0e10cSrcweir 		{ return _aData.Any; }
257*cdf0e10cSrcweir     virtual com::sun::star::uno::Sequence< TestElement > SAL_CALL getSequence() throw(com::sun::star::uno::RuntimeException)
258*cdf0e10cSrcweir 		{ return _aData.Sequence; }
259*cdf0e10cSrcweir     virtual TestData SAL_CALL getStruct() throw(com::sun::star::uno::RuntimeException)
260*cdf0e10cSrcweir 		{ return _aStructData; }
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir     virtual void SAL_CALL setBool( sal_Bool _bool ) throw(::com::sun::star::uno::RuntimeException)
263*cdf0e10cSrcweir 		{ _aData.Bool = _bool; }
264*cdf0e10cSrcweir     virtual void SAL_CALL setByte( sal_Int8 _byte ) throw(::com::sun::star::uno::RuntimeException)
265*cdf0e10cSrcweir 		{ _aData.Byte = _byte; }
266*cdf0e10cSrcweir     virtual void SAL_CALL setChar( sal_Unicode _char ) throw(::com::sun::star::uno::RuntimeException)
267*cdf0e10cSrcweir 		{ _aData.Char = _char; }
268*cdf0e10cSrcweir     virtual void SAL_CALL setShort( sal_Int16 _short ) throw(::com::sun::star::uno::RuntimeException)
269*cdf0e10cSrcweir 		{ _aData.Short = _short; }
270*cdf0e10cSrcweir     virtual void SAL_CALL setUShort( sal_uInt16 _ushort ) throw(::com::sun::star::uno::RuntimeException)
271*cdf0e10cSrcweir 		{ _aData.UShort = _ushort; }
272*cdf0e10cSrcweir     virtual void SAL_CALL setLong( sal_Int32 _long ) throw(::com::sun::star::uno::RuntimeException)
273*cdf0e10cSrcweir 		{ _aData.Long = _long; }
274*cdf0e10cSrcweir     virtual void SAL_CALL setULong( sal_uInt32 _ulong ) throw(::com::sun::star::uno::RuntimeException)
275*cdf0e10cSrcweir 		{ _aData.ULong = _ulong; }
276*cdf0e10cSrcweir     virtual void SAL_CALL setHyper( sal_Int64 _hyper ) throw(::com::sun::star::uno::RuntimeException)
277*cdf0e10cSrcweir 		{ _aData.Hyper = _hyper; }
278*cdf0e10cSrcweir     virtual void SAL_CALL setUHyper( sal_uInt64 _uhyper ) throw(::com::sun::star::uno::RuntimeException)
279*cdf0e10cSrcweir 		{ _aData.UHyper = _uhyper; }
280*cdf0e10cSrcweir     virtual void SAL_CALL setFloat( float _float ) throw(::com::sun::star::uno::RuntimeException)
281*cdf0e10cSrcweir 		{ _aData.Float = _float; }
282*cdf0e10cSrcweir     virtual void SAL_CALL setDouble( double _double ) throw(::com::sun::star::uno::RuntimeException)
283*cdf0e10cSrcweir 		{ _aData.Double = _double; }
284*cdf0e10cSrcweir     virtual void SAL_CALL setEnum( TestEnum _enum ) throw(::com::sun::star::uno::RuntimeException)
285*cdf0e10cSrcweir 		{ _aData.Enum = _enum; }
286*cdf0e10cSrcweir     virtual void SAL_CALL setString( const ::rtl::OUString& _string ) throw(::com::sun::star::uno::RuntimeException)
287*cdf0e10cSrcweir 		{ _aData.String = _string; }
288*cdf0e10cSrcweir     virtual void SAL_CALL setInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _interface ) throw(::com::sun::star::uno::RuntimeException)
289*cdf0e10cSrcweir 		{ _aData.Interface = _interface; }
290*cdf0e10cSrcweir     virtual void SAL_CALL setAny( const ::com::sun::star::uno::Any& _any ) throw(::com::sun::star::uno::RuntimeException)
291*cdf0e10cSrcweir 		{ _aData.Any = _any; }
292*cdf0e10cSrcweir     virtual void SAL_CALL setSequence( const ::com::sun::star::uno::Sequence<TestElement >& _sequence ) throw(::com::sun::star::uno::RuntimeException)
293*cdf0e10cSrcweir 		{ _aData.Sequence = _sequence; }
294*cdf0e10cSrcweir     virtual void SAL_CALL setStruct( const TestData& _struct ) throw(::com::sun::star::uno::RuntimeException)
295*cdf0e10cSrcweir 		{ _aStructData = _struct; }
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getRaiseAttr1() throw (RuntimeException)
298*cdf0e10cSrcweir     { throw RuntimeException(); }
299*cdf0e10cSrcweir 
300*cdf0e10cSrcweir     virtual void SAL_CALL setRaiseAttr1(sal_Int32)
301*cdf0e10cSrcweir         throw (IllegalArgumentException, RuntimeException)
302*cdf0e10cSrcweir     { throw IllegalArgumentException(); }
303*cdf0e10cSrcweir 
304*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getRaiseAttr2()
305*cdf0e10cSrcweir         throw (IllegalArgumentException, RuntimeException)
306*cdf0e10cSrcweir     { throw IllegalArgumentException(); }
307*cdf0e10cSrcweir 
308*cdf0e10cSrcweir     virtual TestPolyStruct< sal_Bool > SAL_CALL transportPolyBoolean(
309*cdf0e10cSrcweir         TestPolyStruct< sal_Bool > const & arg) throw (RuntimeException)
310*cdf0e10cSrcweir     { return arg; }
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir     virtual void SAL_CALL transportPolyHyper(TestPolyStruct< sal_Int64 > &)
313*cdf0e10cSrcweir         throw (RuntimeException) {}
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir     virtual void SAL_CALL transportPolySequence(
316*cdf0e10cSrcweir         TestPolyStruct< Sequence< Any > > const & arg1,
317*cdf0e10cSrcweir         TestPolyStruct< Sequence< Any > > & arg2) throw (RuntimeException)
318*cdf0e10cSrcweir     { arg2 = arg1; }
319*cdf0e10cSrcweir 
320*cdf0e10cSrcweir     virtual TestPolyStruct< sal_Int32 > SAL_CALL getNullPolyLong()
321*cdf0e10cSrcweir         throw (RuntimeException)
322*cdf0e10cSrcweir     { return TestPolyStruct< sal_Int32 >(0); /* work around MS compiler bug */ }
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir     virtual TestPolyStruct< rtl::OUString > SAL_CALL getNullPolyString()
325*cdf0e10cSrcweir         throw (RuntimeException)
326*cdf0e10cSrcweir     { return TestPolyStruct< rtl::OUString >(); }
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir     virtual TestPolyStruct< Type > SAL_CALL getNullPolyType()
329*cdf0e10cSrcweir         throw (RuntimeException)
330*cdf0e10cSrcweir     { return TestPolyStruct< Type >(); }
331*cdf0e10cSrcweir 
332*cdf0e10cSrcweir     virtual TestPolyStruct< Any > SAL_CALL getNullPolyAny()
333*cdf0e10cSrcweir         throw (RuntimeException)
334*cdf0e10cSrcweir     { return TestPolyStruct< Any >(); }
335*cdf0e10cSrcweir 
336*cdf0e10cSrcweir     virtual TestPolyStruct< Sequence< sal_Bool > > SAL_CALL
337*cdf0e10cSrcweir     getNullPolySequence() throw (RuntimeException)
338*cdf0e10cSrcweir     { return TestPolyStruct< Sequence< sal_Bool > >(); }
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir     virtual TestPolyStruct< TestEnum > SAL_CALL getNullPolyEnum()
341*cdf0e10cSrcweir         throw (RuntimeException)
342*cdf0e10cSrcweir     { return TestPolyStruct< TestEnum >(
343*cdf0e10cSrcweir         test::testtools::bridgetest::TestEnum_TEST);
344*cdf0e10cSrcweir           /* work around MS compiler bug */ }
345*cdf0e10cSrcweir 
346*cdf0e10cSrcweir     virtual TestPolyStruct< TestBadEnum > SAL_CALL getNullPolyBadEnum()
347*cdf0e10cSrcweir         throw (RuntimeException)
348*cdf0e10cSrcweir     { return TestPolyStruct< TestBadEnum >(
349*cdf0e10cSrcweir         test::testtools::bridgetest::TestBadEnum_M);
350*cdf0e10cSrcweir           /* explicitly instantiate with default enumerator */ }
351*cdf0e10cSrcweir 
352*cdf0e10cSrcweir     virtual TestPolyStruct< TestStruct > SAL_CALL getNullPolyStruct()
353*cdf0e10cSrcweir         throw (RuntimeException)
354*cdf0e10cSrcweir     { return TestPolyStruct< TestStruct >(); }
355*cdf0e10cSrcweir 
356*cdf0e10cSrcweir     virtual TestPolyStruct< Reference< XBridgeTestBase > > SAL_CALL
357*cdf0e10cSrcweir     getNullPolyInterface() throw (RuntimeException)
358*cdf0e10cSrcweir     { return TestPolyStruct< Reference< XBridgeTestBase > >(); }
359*cdf0e10cSrcweir 
360*cdf0e10cSrcweir     virtual ::com::sun::star::uno::Any SAL_CALL transportAny(
361*cdf0e10cSrcweir 		const ::com::sun::star::uno::Any& value )
362*cdf0e10cSrcweir 		throw(::com::sun::star::uno::RuntimeException);
363*cdf0e10cSrcweir 
364*cdf0e10cSrcweir     virtual void SAL_CALL call( sal_Int32 nCallId, sal_Int32 nWaitMUSEC )
365*cdf0e10cSrcweir 		throw(::com::sun::star::uno::RuntimeException);
366*cdf0e10cSrcweir     virtual void SAL_CALL callOneway( sal_Int32 nCallId, sal_Int32 nWaitMUSEC )
367*cdf0e10cSrcweir 		throw(::com::sun::star::uno::RuntimeException);
368*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL sequenceOfCallTestPassed(  )
369*cdf0e10cSrcweir 		throw(::com::sun::star::uno::RuntimeException);
370*cdf0e10cSrcweir     virtual void SAL_CALL startRecursiveCall(
371*cdf0e10cSrcweir 		const ::com::sun::star::uno::Reference< XRecursiveCall >& xCall, sal_Int32 nToCall )
372*cdf0e10cSrcweir 		throw(::com::sun::star::uno::RuntimeException);
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir     virtual Reference< XMulti > SAL_CALL getMulti() throw (RuntimeException);
375*cdf0e10cSrcweir 
376*cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL testMulti(Reference< XMulti > const & multi)
377*cdf0e10cSrcweir         throw (RuntimeException);
378*cdf0e10cSrcweir 
379*cdf0e10cSrcweir public: // XBridgeTest
380*cdf0e10cSrcweir     virtual TestData SAL_CALL raiseException( sal_Int16 nArgumentPos, const OUString & rMsg, const Reference< XInterface > & xCOntext )
381*cdf0e10cSrcweir 		throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
382*cdf0e10cSrcweir 
383*cdf0e10cSrcweir     virtual void SAL_CALL raiseRuntimeExceptionOneway(
384*cdf0e10cSrcweir 		const ::rtl::OUString& Message, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Context )
385*cdf0e10cSrcweir 		throw(::com::sun::star::uno::RuntimeException);
386*cdf0e10cSrcweir 
387*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL getRuntimeException() throw(::com::sun::star::uno::RuntimeException);
388*cdf0e10cSrcweir     virtual void SAL_CALL setRuntimeException( sal_Int32 _runtimeexception ) throw(::com::sun::star::uno::RuntimeException);
389*cdf0e10cSrcweir 
390*cdf0e10cSrcweir     // XBridgeTest2
391*cdf0e10cSrcweir     virtual Sequence< sal_Bool > SAL_CALL setSequenceBool(
392*cdf0e10cSrcweir         const Sequence< sal_Bool >& aSeq ) throw (RuntimeException);
393*cdf0e10cSrcweir     virtual Sequence< sal_Unicode > SAL_CALL setSequenceChar(
394*cdf0e10cSrcweir         const Sequence< sal_Unicode >& aSeq ) throw (RuntimeException);
395*cdf0e10cSrcweir     virtual Sequence< sal_Int8 > SAL_CALL setSequenceByte(
396*cdf0e10cSrcweir         const Sequence< sal_Int8 >& aSeq ) throw (RuntimeException);
397*cdf0e10cSrcweir     virtual Sequence< sal_Int16 > SAL_CALL setSequenceShort(
398*cdf0e10cSrcweir         const Sequence< sal_Int16 >& aSeq ) throw (RuntimeException);
399*cdf0e10cSrcweir     virtual Sequence< sal_uInt16 > SAL_CALL setSequenceUShort(
400*cdf0e10cSrcweir         const Sequence< sal_uInt16 >& aSeq ) throw (RuntimeException);
401*cdf0e10cSrcweir     virtual Sequence< sal_Int32 > SAL_CALL setSequenceLong(
402*cdf0e10cSrcweir         const Sequence< sal_Int32 >& aSeq ) throw (RuntimeException);
403*cdf0e10cSrcweir     virtual Sequence< sal_uInt32 > SAL_CALL setSequenceULong(
404*cdf0e10cSrcweir         const Sequence< sal_uInt32 >& aSeq ) throw (RuntimeException);
405*cdf0e10cSrcweir     virtual Sequence< sal_Int64 > SAL_CALL setSequenceHyper(
406*cdf0e10cSrcweir         const Sequence< sal_Int64 >& aSeq ) throw (RuntimeException);
407*cdf0e10cSrcweir     virtual Sequence< sal_uInt64 > SAL_CALL setSequenceUHyper(
408*cdf0e10cSrcweir         const Sequence< sal_uInt64 >& aSeq ) throw (RuntimeException);
409*cdf0e10cSrcweir     virtual Sequence< float > SAL_CALL setSequenceFloat(
410*cdf0e10cSrcweir         const Sequence< float >& aSeq ) throw (RuntimeException);
411*cdf0e10cSrcweir     virtual Sequence< double > SAL_CALL setSequenceDouble(
412*cdf0e10cSrcweir         const Sequence< double >& aSeq ) throw (RuntimeException);
413*cdf0e10cSrcweir     virtual Sequence< TestEnum > SAL_CALL setSequenceEnum(
414*cdf0e10cSrcweir         const Sequence< TestEnum >& aSeq ) throw (RuntimeException) ;
415*cdf0e10cSrcweir     virtual Sequence< OUString > SAL_CALL setSequenceString(
416*cdf0e10cSrcweir         const Sequence< OUString >& aString ) throw (RuntimeException);
417*cdf0e10cSrcweir     virtual Sequence< Reference< XInterface > > SAL_CALL setSequenceXInterface(
418*cdf0e10cSrcweir         const Sequence< Reference< XInterface > >& aSeq )
419*cdf0e10cSrcweir         throw (RuntimeException);
420*cdf0e10cSrcweir     virtual Sequence<Any > SAL_CALL setSequenceAny(
421*cdf0e10cSrcweir         const Sequence<Any >& aSeq ) throw (RuntimeException);
422*cdf0e10cSrcweir     virtual Sequence<TestElement > SAL_CALL setSequenceStruct(
423*cdf0e10cSrcweir         const Sequence< TestElement >& aSeq ) throw (RuntimeException);
424*cdf0e10cSrcweir     virtual Sequence< Sequence< sal_Int32 > > SAL_CALL setDim2(
425*cdf0e10cSrcweir         const Sequence<Sequence< sal_Int32 > >& aSeq ) throw (RuntimeException);
426*cdf0e10cSrcweir     virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL setDim3(
427*cdf0e10cSrcweir         const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq )
428*cdf0e10cSrcweir         throw (RuntimeException);
429*cdf0e10cSrcweir     virtual void SAL_CALL setSequencesInOut(Sequence< sal_Bool >& aSeqBoolean,
430*cdf0e10cSrcweir                                 Sequence< sal_Unicode >& aSeqChar,
431*cdf0e10cSrcweir                                 Sequence< sal_Int8 >& aSeqByte,
432*cdf0e10cSrcweir                                 Sequence< sal_Int16 >& aSeqShort,
433*cdf0e10cSrcweir                                 Sequence< sal_uInt16 >& aSeqUShort,
434*cdf0e10cSrcweir                                 Sequence< sal_Int32 >& aSeqLong,
435*cdf0e10cSrcweir                                 Sequence< sal_uInt32 >& aSeqULong,
436*cdf0e10cSrcweir                                 Sequence< sal_Int64 >& aSeqHyper,
437*cdf0e10cSrcweir                                 Sequence< sal_uInt64 >& aSeqUHyper,
438*cdf0e10cSrcweir                                 Sequence< float >& aSeqFloat,
439*cdf0e10cSrcweir                                 Sequence< double >& aSeqDouble,
440*cdf0e10cSrcweir                                 Sequence< TestEnum >& aSeqTestEnum,
441*cdf0e10cSrcweir                                 Sequence< OUString >& aSeqString,
442*cdf0e10cSrcweir                                 Sequence<Reference<XInterface > >& aSeqXInterface,
443*cdf0e10cSrcweir                                 Sequence< Any >& aSeqAny,
444*cdf0e10cSrcweir                                 Sequence< Sequence< sal_Int32 > >& aSeqDim2,
445*cdf0e10cSrcweir                                 Sequence< Sequence< Sequence< sal_Int32 > > >& aSeqDim3 )
446*cdf0e10cSrcweir         throw (RuntimeException);
447*cdf0e10cSrcweir     virtual void SAL_CALL setSequencesOut( Sequence< sal_Bool >& aSeqBoolean,
448*cdf0e10cSrcweir                              Sequence< sal_Unicode >& aSeqChar,
449*cdf0e10cSrcweir                              Sequence< sal_Int8 >& aSeqByte,
450*cdf0e10cSrcweir                              Sequence< sal_Int16 >& aSeqShort,
451*cdf0e10cSrcweir                              Sequence< sal_uInt16 >& aSeqUShort,
452*cdf0e10cSrcweir                              Sequence< sal_Int32 >& aSeqLong,
453*cdf0e10cSrcweir                              Sequence< sal_uInt32 >& aSeqULong,
454*cdf0e10cSrcweir                              Sequence< sal_Int64 >& aSeqHyper,
455*cdf0e10cSrcweir                              Sequence< sal_uInt64 >& aSeqUHyper,
456*cdf0e10cSrcweir                              Sequence< float >& aSeqFloat,
457*cdf0e10cSrcweir                              Sequence< double >& aSeqDouble,
458*cdf0e10cSrcweir                              Sequence< TestEnum >& aSeqEnum,
459*cdf0e10cSrcweir                              Sequence< OUString >& aSeqString,
460*cdf0e10cSrcweir                              Sequence< Reference< XInterface > >& aSeqXInterface,
461*cdf0e10cSrcweir                              Sequence< Any >& aSeqAny,
462*cdf0e10cSrcweir                              Sequence< Sequence< sal_Int32 > >& aSeqDim2,
463*cdf0e10cSrcweir                              Sequence< Sequence< Sequence< sal_Int32 > > >& aSeqDim3 )
464*cdf0e10cSrcweir         throw (RuntimeException);
465*cdf0e10cSrcweir     virtual void SAL_CALL testConstructorsService(
466*cdf0e10cSrcweir         Reference< XComponentContext > const & context)
467*cdf0e10cSrcweir         throw (RuntimeException);
468*cdf0e10cSrcweir     virtual Reference< XCurrentContextChecker > SAL_CALL
469*cdf0e10cSrcweir     getCurrentContextChecker()
470*cdf0e10cSrcweir         throw (RuntimeException);
471*cdf0e10cSrcweir 
472*cdf0e10cSrcweir public:
473*cdf0e10cSrcweir     virtual void SAL_CALL callRecursivly( const ::com::sun::star::uno::Reference< XRecursiveCall >& xCall, sal_Int32 nToCall ) throw(::com::sun::star::uno::RuntimeException);
474*cdf0e10cSrcweir };
475*cdf0e10cSrcweir 
476*cdf0e10cSrcweir //Dummy class for XComponent implementation
477*cdf0e10cSrcweir class Dummy : public osl::DebugBase<Dummy>,
478*cdf0e10cSrcweir               public WeakComponentImplHelperBase
479*cdf0e10cSrcweir {
480*cdf0e10cSrcweir public:
481*cdf0e10cSrcweir      Dummy(): WeakComponentImplHelperBase(*Mutex::getGlobalMutex()){}
482*cdf0e10cSrcweir 
483*cdf0e10cSrcweir };
484*cdf0e10cSrcweir //__________________________________________________________________________________________________
485*cdf0e10cSrcweir Any Test_Impl::transportAny( const Any & value ) throw ( ::com::sun::star::uno::RuntimeException)
486*cdf0e10cSrcweir {
487*cdf0e10cSrcweir 	return value;
488*cdf0e10cSrcweir }
489*cdf0e10cSrcweir 
490*cdf0e10cSrcweir //__________________________________________________________________________________________________
491*cdf0e10cSrcweir void Test_Impl::call( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) throw(::com::sun::star::uno::RuntimeException)
492*cdf0e10cSrcweir {
493*cdf0e10cSrcweir 	TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 };
494*cdf0e10cSrcweir 	osl_waitThread( &value );
495*cdf0e10cSrcweir 	if( m_bFirstCall )
496*cdf0e10cSrcweir 	{
497*cdf0e10cSrcweir 		m_bFirstCall = sal_False;
498*cdf0e10cSrcweir 	}
499*cdf0e10cSrcweir 	else
500*cdf0e10cSrcweir 	{
501*cdf0e10cSrcweir 		m_bSequenceOfCallTestPassed = m_bSequenceOfCallTestPassed && (nCallId > m_nLastCallId);
502*cdf0e10cSrcweir 	}
503*cdf0e10cSrcweir 	m_nLastCallId = nCallId;
504*cdf0e10cSrcweir }
505*cdf0e10cSrcweir 
506*cdf0e10cSrcweir //__________________________________________________________________________________________________
507*cdf0e10cSrcweir void Test_Impl::callOneway( sal_Int32 nCallId , sal_Int32 nWaitMUSEC ) throw (::com::sun::star::uno::RuntimeException)
508*cdf0e10cSrcweir {
509*cdf0e10cSrcweir 	TimeValue value = { nWaitMUSEC / 1000000 , nWaitMUSEC * 1000 };
510*cdf0e10cSrcweir 	osl_waitThread( &value );
511*cdf0e10cSrcweir 	m_bSequenceOfCallTestPassed = m_bSequenceOfCallTestPassed && (nCallId > m_nLastCallId);
512*cdf0e10cSrcweir 	m_nLastCallId = nCallId;
513*cdf0e10cSrcweir }
514*cdf0e10cSrcweir 
515*cdf0e10cSrcweir //__________________________________________________________________________________________________
516*cdf0e10cSrcweir sal_Bool Test_Impl::sequenceOfCallTestPassed() throw (::com::sun::star::uno::RuntimeException)
517*cdf0e10cSrcweir {
518*cdf0e10cSrcweir 	return m_bSequenceOfCallTestPassed;
519*cdf0e10cSrcweir }
520*cdf0e10cSrcweir 
521*cdf0e10cSrcweir //__________________________________________________________________________________________________
522*cdf0e10cSrcweir void SAL_CALL Test_Impl::startRecursiveCall(
523*cdf0e10cSrcweir 	const ::com::sun::star::uno::Reference< XRecursiveCall >& xCall, sal_Int32 nToCall )
524*cdf0e10cSrcweir 	throw(::com::sun::star::uno::RuntimeException)
525*cdf0e10cSrcweir {
526*cdf0e10cSrcweir 	MutexGuard guard( m_mutex );
527*cdf0e10cSrcweir 	if( nToCall )
528*cdf0e10cSrcweir 	{
529*cdf0e10cSrcweir 		nToCall --;
530*cdf0e10cSrcweir 		xCall->callRecursivly( this , nToCall );
531*cdf0e10cSrcweir 	}
532*cdf0e10cSrcweir }
533*cdf0e10cSrcweir 
534*cdf0e10cSrcweir 
535*cdf0e10cSrcweir void SAL_CALL Test_Impl::callRecursivly(
536*cdf0e10cSrcweir 	const ::com::sun::star::uno::Reference< XRecursiveCall >& xCall,
537*cdf0e10cSrcweir 	sal_Int32 nToCall )
538*cdf0e10cSrcweir 	throw(::com::sun::star::uno::RuntimeException)
539*cdf0e10cSrcweir {
540*cdf0e10cSrcweir 	MutexGuard guard( m_mutex );
541*cdf0e10cSrcweir 	if( nToCall )
542*cdf0e10cSrcweir 	{
543*cdf0e10cSrcweir 		nToCall --;
544*cdf0e10cSrcweir 		xCall->callRecursivly( this , nToCall );
545*cdf0e10cSrcweir 	}
546*cdf0e10cSrcweir }
547*cdf0e10cSrcweir 
548*cdf0e10cSrcweir Reference< XMulti > Test_Impl::getMulti() throw (RuntimeException) {
549*cdf0e10cSrcweir     return new testtools::bridgetest::Multi;
550*cdf0e10cSrcweir }
551*cdf0e10cSrcweir 
552*cdf0e10cSrcweir rtl::OUString Test_Impl::testMulti(Reference< XMulti > const & multi)
553*cdf0e10cSrcweir     throw (RuntimeException)
554*cdf0e10cSrcweir {
555*cdf0e10cSrcweir     return testtools::bridgetest::testMulti(multi);
556*cdf0e10cSrcweir }
557*cdf0e10cSrcweir 
558*cdf0e10cSrcweir //__________________________________________________________________________________________________
559*cdf0e10cSrcweir void Test_Impl::setValues( sal_Bool bBool, sal_Unicode cChar, sal_Int8 nByte,
560*cdf0e10cSrcweir 						   sal_Int16 nShort, sal_uInt16 nUShort,
561*cdf0e10cSrcweir 						   sal_Int32 nLong, sal_uInt32 nULong,
562*cdf0e10cSrcweir 						   sal_Int64 nHyper, sal_uInt64 nUHyper,
563*cdf0e10cSrcweir 						   float fFloat, double fDouble,
564*cdf0e10cSrcweir 						   TestEnum eEnum, const ::rtl::OUString& rStr,
565*cdf0e10cSrcweir 						   const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
566*cdf0e10cSrcweir 						   const ::com::sun::star::uno::Any& rAny,
567*cdf0e10cSrcweir 						   const ::com::sun::star::uno::Sequence<TestElement >& rSequence,
568*cdf0e10cSrcweir 						   const TestData& rStruct )
569*cdf0e10cSrcweir 	throw(com::sun::star::uno::RuntimeException)
570*cdf0e10cSrcweir {
571*cdf0e10cSrcweir 	assign( _aData,
572*cdf0e10cSrcweir 			bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
573*cdf0e10cSrcweir 			eEnum, rStr, xTest, rAny, rSequence );
574*cdf0e10cSrcweir 	_aStructData = rStruct;
575*cdf0e10cSrcweir }
576*cdf0e10cSrcweir //__________________________________________________________________________________________________
577*cdf0e10cSrcweir TestData Test_Impl::setValues2( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
578*cdf0e10cSrcweir 								sal_Int16& nShort, sal_uInt16& nUShort,
579*cdf0e10cSrcweir 								sal_Int32& nLong, sal_uInt32& nULong,
580*cdf0e10cSrcweir 								sal_Int64& nHyper, sal_uInt64& nUHyper,
581*cdf0e10cSrcweir 								float& fFloat, double& fDouble,
582*cdf0e10cSrcweir 								TestEnum& eEnum, rtl::OUString& rStr,
583*cdf0e10cSrcweir 								::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
584*cdf0e10cSrcweir 								::com::sun::star::uno::Any& rAny,
585*cdf0e10cSrcweir 								::com::sun::star::uno::Sequence<TestElement >& rSequence,
586*cdf0e10cSrcweir 								TestData& rStruct )
587*cdf0e10cSrcweir 	throw(com::sun::star::uno::RuntimeException)
588*cdf0e10cSrcweir {
589*cdf0e10cSrcweir 	assign( _aData,
590*cdf0e10cSrcweir 			bBool, cChar, nByte, nShort, nUShort, nLong, nULong, nHyper, nUHyper, fFloat, fDouble,
591*cdf0e10cSrcweir 			eEnum, rStr, xTest, rAny, rSequence );
592*cdf0e10cSrcweir 	_aStructData = rStruct;
593*cdf0e10cSrcweir 
594*cdf0e10cSrcweir     TestElement elem = rSequence[ 0 ];
595*cdf0e10cSrcweir     rSequence[ 0 ] = rSequence[ 1 ];
596*cdf0e10cSrcweir     rSequence[ 1 ] = elem;
597*cdf0e10cSrcweir 
598*cdf0e10cSrcweir 	return _aStructData;
599*cdf0e10cSrcweir }
600*cdf0e10cSrcweir //__________________________________________________________________________________________________
601*cdf0e10cSrcweir TestData Test_Impl::getValues( sal_Bool& bBool, sal_Unicode& cChar, sal_Int8& nByte,
602*cdf0e10cSrcweir 							   sal_Int16& nShort, sal_uInt16& nUShort,
603*cdf0e10cSrcweir 							   sal_Int32& nLong, sal_uInt32& nULong,
604*cdf0e10cSrcweir 							   sal_Int64& nHyper, sal_uInt64& nUHyper,
605*cdf0e10cSrcweir 							   float& fFloat, double& fDouble,
606*cdf0e10cSrcweir 							   TestEnum& eEnum, rtl::OUString& rStr,
607*cdf0e10cSrcweir 							   ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xTest,
608*cdf0e10cSrcweir 							   ::com::sun::star::uno::Any& rAny,
609*cdf0e10cSrcweir 							   ::com::sun::star::uno::Sequence<TestElement >& rSequence,
610*cdf0e10cSrcweir 							   TestData& rStruct )
611*cdf0e10cSrcweir 	throw(com::sun::star::uno::RuntimeException)
612*cdf0e10cSrcweir {
613*cdf0e10cSrcweir 	bBool = _aData.Bool;
614*cdf0e10cSrcweir 	cChar = _aData.Char;
615*cdf0e10cSrcweir 	nByte = _aData.Byte;
616*cdf0e10cSrcweir 	nShort = _aData.Short;
617*cdf0e10cSrcweir 	nUShort = _aData.UShort;
618*cdf0e10cSrcweir 	nLong = _aData.Long;
619*cdf0e10cSrcweir 	nULong = _aData.ULong;
620*cdf0e10cSrcweir 	nHyper = _aData.Hyper;
621*cdf0e10cSrcweir 	nUHyper = _aData.UHyper;
622*cdf0e10cSrcweir 	fFloat = _aData.Float;
623*cdf0e10cSrcweir 	fDouble = _aData.Double;
624*cdf0e10cSrcweir 	eEnum = _aData.Enum;
625*cdf0e10cSrcweir 	rStr = _aData.String;
626*cdf0e10cSrcweir 	xTest = _aData.Interface;
627*cdf0e10cSrcweir 	rAny = _aData.Any;
628*cdf0e10cSrcweir 	rSequence = _aData.Sequence;
629*cdf0e10cSrcweir 	rStruct = _aStructData;
630*cdf0e10cSrcweir 	return _aStructData;
631*cdf0e10cSrcweir }
632*cdf0e10cSrcweir //__________________________________________________________________________________________________
633*cdf0e10cSrcweir TestData Test_Impl::raiseException( sal_Int16 nArgumentPos, const OUString & rMsg, const Reference< XInterface > & xContext )
634*cdf0e10cSrcweir 	throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException)
635*cdf0e10cSrcweir {
636*cdf0e10cSrcweir 	IllegalArgumentException aExc;
637*cdf0e10cSrcweir 	aExc.ArgumentPosition = nArgumentPos;
638*cdf0e10cSrcweir 	aExc.Message		  = _aData.String = rMsg;
639*cdf0e10cSrcweir 	aExc.Context		  = _aData.Interface = xContext;
640*cdf0e10cSrcweir 	throw aExc;
641*cdf0e10cSrcweir }
642*cdf0e10cSrcweir 
643*cdf0e10cSrcweir void Test_Impl::raiseRuntimeExceptionOneway( const OUString & rMsg, const Reference< XInterface > & xContext )
644*cdf0e10cSrcweir 	throw(::com::sun::star::uno::RuntimeException)
645*cdf0e10cSrcweir {
646*cdf0e10cSrcweir 	RuntimeException aExc;
647*cdf0e10cSrcweir 	aExc.Message		  = _aData.String = rMsg;
648*cdf0e10cSrcweir 	aExc.Context		  = _aData.Interface = xContext;
649*cdf0e10cSrcweir 	throw aExc;
650*cdf0e10cSrcweir }
651*cdf0e10cSrcweir 
652*cdf0e10cSrcweir void dothrow2( RuntimeException e )
653*cdf0e10cSrcweir {
654*cdf0e10cSrcweir     throw e;
655*cdf0e10cSrcweir }
656*cdf0e10cSrcweir void dothrow( RuntimeException const & e )
657*cdf0e10cSrcweir {
658*cdf0e10cSrcweir #if defined _MSC_VER
659*cdf0e10cSrcweir     // currently only for MSVC:
660*cdf0e10cSrcweir     // just to test whether all bridges fall back to a RuntimeException
661*cdf0e10cSrcweir     // in case of a thrown non-UNO exception:
662*cdf0e10cSrcweir     try
663*cdf0e10cSrcweir     {
664*cdf0e10cSrcweir         throw ::std::bad_alloc();
665*cdf0e10cSrcweir     }
666*cdf0e10cSrcweir     catch (...)
667*cdf0e10cSrcweir     {
668*cdf0e10cSrcweir         try
669*cdf0e10cSrcweir         {
670*cdf0e10cSrcweir             Any a( getCaughtException() );
671*cdf0e10cSrcweir             RuntimeException exc;
672*cdf0e10cSrcweir             OSL_VERIFY( a >>= exc );
673*cdf0e10cSrcweir             OSL_TRACE(
674*cdf0e10cSrcweir                 OUStringToOString(
675*cdf0e10cSrcweir                     exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
676*cdf0e10cSrcweir         }
677*cdf0e10cSrcweir         catch (...) // never throws anything
678*cdf0e10cSrcweir         {
679*cdf0e10cSrcweir             fprintf( stderr, "\ngetCaughtException() failed!\n" );
680*cdf0e10cSrcweir             exit( 1 );
681*cdf0e10cSrcweir         }
682*cdf0e10cSrcweir     }
683*cdf0e10cSrcweir #endif
684*cdf0e10cSrcweir     dothrow2( e );
685*cdf0e10cSrcweir }
686*cdf0e10cSrcweir //______________________________________________________________________________
687*cdf0e10cSrcweir sal_Int32 Test_Impl::getRuntimeException()
688*cdf0e10cSrcweir     throw (RuntimeException)
689*cdf0e10cSrcweir {
690*cdf0e10cSrcweir     try
691*cdf0e10cSrcweir     {
692*cdf0e10cSrcweir         dothrow( RuntimeException( _aData.String, _aData.Interface ) );
693*cdf0e10cSrcweir     }
694*cdf0e10cSrcweir     catch (Exception &)
695*cdf0e10cSrcweir     {
696*cdf0e10cSrcweir         Any a( getCaughtException() );
697*cdf0e10cSrcweir         throwException( a );
698*cdf0e10cSrcweir     }
699*cdf0e10cSrcweir 	return 0; // for dummy
700*cdf0e10cSrcweir }
701*cdf0e10cSrcweir //__________________________________________________________________________________________________
702*cdf0e10cSrcweir void Test_Impl::setRuntimeException( sal_Int32 ) throw(::com::sun::star::uno::RuntimeException)
703*cdf0e10cSrcweir {
704*cdf0e10cSrcweir 	RuntimeException aExc;
705*cdf0e10cSrcweir 	aExc.Message		  = _aData.String;
706*cdf0e10cSrcweir 	aExc.Context		  = _aData.Interface;
707*cdf0e10cSrcweir     throwException( makeAny( aExc ) );
708*cdf0e10cSrcweir }
709*cdf0e10cSrcweir 
710*cdf0e10cSrcweir // XBridgeTest2 -------------------------------------------------------------
711*cdf0e10cSrcweir Sequence< sal_Bool > SAL_CALL Test_Impl::setSequenceBool(
712*cdf0e10cSrcweir         const Sequence< sal_Bool >& aSeq ) throw (RuntimeException)
713*cdf0e10cSrcweir {
714*cdf0e10cSrcweir     _arBool = aSeq;
715*cdf0e10cSrcweir     return aSeq;
716*cdf0e10cSrcweir }
717*cdf0e10cSrcweir 
718*cdf0e10cSrcweir Sequence< sal_Unicode > SAL_CALL Test_Impl::setSequenceChar(
719*cdf0e10cSrcweir         const Sequence< sal_Unicode >& aSeq ) throw (RuntimeException)
720*cdf0e10cSrcweir {
721*cdf0e10cSrcweir     _arChar = aSeq;
722*cdf0e10cSrcweir     return aSeq;
723*cdf0e10cSrcweir }
724*cdf0e10cSrcweir 
725*cdf0e10cSrcweir Sequence< sal_Int8 > SAL_CALL Test_Impl::setSequenceByte(
726*cdf0e10cSrcweir         const Sequence< sal_Int8 >& aSeq ) throw (RuntimeException)
727*cdf0e10cSrcweir {
728*cdf0e10cSrcweir     _arByte = aSeq;
729*cdf0e10cSrcweir     return aSeq;
730*cdf0e10cSrcweir }
731*cdf0e10cSrcweir 
732*cdf0e10cSrcweir Sequence< sal_Int16 > SAL_CALL Test_Impl::setSequenceShort(
733*cdf0e10cSrcweir         const Sequence< sal_Int16 >& aSeq ) throw (RuntimeException)
734*cdf0e10cSrcweir {
735*cdf0e10cSrcweir     _arShort = aSeq;
736*cdf0e10cSrcweir     return aSeq;
737*cdf0e10cSrcweir }
738*cdf0e10cSrcweir 
739*cdf0e10cSrcweir Sequence< sal_uInt16 > SAL_CALL Test_Impl::setSequenceUShort(
740*cdf0e10cSrcweir         const Sequence< sal_uInt16 >& aSeq ) throw (RuntimeException)
741*cdf0e10cSrcweir {
742*cdf0e10cSrcweir     _arUShort = aSeq;
743*cdf0e10cSrcweir     return aSeq;
744*cdf0e10cSrcweir }
745*cdf0e10cSrcweir 
746*cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL Test_Impl::setSequenceLong(
747*cdf0e10cSrcweir         const Sequence< sal_Int32 >& aSeq ) throw (RuntimeException)
748*cdf0e10cSrcweir {
749*cdf0e10cSrcweir     _arLong = aSeq;
750*cdf0e10cSrcweir     return aSeq;
751*cdf0e10cSrcweir }
752*cdf0e10cSrcweir 
753*cdf0e10cSrcweir Sequence< sal_uInt32 > SAL_CALL Test_Impl::setSequenceULong(
754*cdf0e10cSrcweir         const Sequence< sal_uInt32 >& aSeq ) throw (RuntimeException)
755*cdf0e10cSrcweir {
756*cdf0e10cSrcweir     _arULong = aSeq;
757*cdf0e10cSrcweir     return aSeq;
758*cdf0e10cSrcweir }
759*cdf0e10cSrcweir 
760*cdf0e10cSrcweir Sequence< sal_Int64 > SAL_CALL Test_Impl::setSequenceHyper(
761*cdf0e10cSrcweir         const Sequence< sal_Int64 >& aSeq ) throw (RuntimeException)
762*cdf0e10cSrcweir {
763*cdf0e10cSrcweir     _arHyper = aSeq;
764*cdf0e10cSrcweir     return aSeq;
765*cdf0e10cSrcweir }
766*cdf0e10cSrcweir 
767*cdf0e10cSrcweir Sequence< sal_uInt64 > SAL_CALL Test_Impl::setSequenceUHyper(
768*cdf0e10cSrcweir         const Sequence< sal_uInt64 >& aSeq ) throw (RuntimeException)
769*cdf0e10cSrcweir {
770*cdf0e10cSrcweir     _arUHyper = aSeq;
771*cdf0e10cSrcweir     return aSeq;
772*cdf0e10cSrcweir }
773*cdf0e10cSrcweir 
774*cdf0e10cSrcweir Sequence< float > SAL_CALL Test_Impl::setSequenceFloat(
775*cdf0e10cSrcweir         const Sequence< float >& aSeq ) throw (RuntimeException)
776*cdf0e10cSrcweir {
777*cdf0e10cSrcweir     _arFloat = aSeq;
778*cdf0e10cSrcweir     return aSeq;
779*cdf0e10cSrcweir }
780*cdf0e10cSrcweir 
781*cdf0e10cSrcweir Sequence< double > SAL_CALL Test_Impl::setSequenceDouble(
782*cdf0e10cSrcweir     const Sequence< double >& aSeq ) throw (RuntimeException)
783*cdf0e10cSrcweir {
784*cdf0e10cSrcweir     _arDouble = aSeq;
785*cdf0e10cSrcweir     return aSeq;
786*cdf0e10cSrcweir }
787*cdf0e10cSrcweir 
788*cdf0e10cSrcweir Sequence< TestEnum > SAL_CALL Test_Impl::setSequenceEnum(
789*cdf0e10cSrcweir     const Sequence< TestEnum >& aSeq ) throw (RuntimeException)
790*cdf0e10cSrcweir {
791*cdf0e10cSrcweir     _arEnum = aSeq;
792*cdf0e10cSrcweir     return aSeq;
793*cdf0e10cSrcweir }
794*cdf0e10cSrcweir 
795*cdf0e10cSrcweir Sequence< OUString > SAL_CALL Test_Impl::setSequenceString(
796*cdf0e10cSrcweir     const Sequence< OUString >& aSeq ) throw (RuntimeException)
797*cdf0e10cSrcweir {
798*cdf0e10cSrcweir     _arString = aSeq;
799*cdf0e10cSrcweir     return aSeq;
800*cdf0e10cSrcweir }
801*cdf0e10cSrcweir 
802*cdf0e10cSrcweir Sequence< Reference< XInterface > > SAL_CALL Test_Impl::setSequenceXInterface(
803*cdf0e10cSrcweir         const Sequence< Reference< XInterface > >& aSeq )
804*cdf0e10cSrcweir         throw (RuntimeException)
805*cdf0e10cSrcweir {
806*cdf0e10cSrcweir     _arObject = aSeq;
807*cdf0e10cSrcweir     return aSeq;
808*cdf0e10cSrcweir }
809*cdf0e10cSrcweir 
810*cdf0e10cSrcweir Sequence<Any > SAL_CALL Test_Impl::setSequenceAny(
811*cdf0e10cSrcweir     const Sequence<Any >& aSeq ) throw (RuntimeException)
812*cdf0e10cSrcweir {
813*cdf0e10cSrcweir     _arAny = aSeq;
814*cdf0e10cSrcweir     return aSeq;
815*cdf0e10cSrcweir }
816*cdf0e10cSrcweir 
817*cdf0e10cSrcweir Sequence<TestElement > SAL_CALL Test_Impl::setSequenceStruct(
818*cdf0e10cSrcweir     const Sequence< TestElement >& aSeq ) throw (RuntimeException)
819*cdf0e10cSrcweir {
820*cdf0e10cSrcweir     _arStruct = aSeq;
821*cdf0e10cSrcweir     return aSeq;
822*cdf0e10cSrcweir }
823*cdf0e10cSrcweir 
824*cdf0e10cSrcweir Sequence< Sequence< sal_Int32 > > SAL_CALL Test_Impl::setDim2(
825*cdf0e10cSrcweir         const Sequence<Sequence< sal_Int32 > >& aSeq ) throw (RuntimeException)
826*cdf0e10cSrcweir {
827*cdf0e10cSrcweir     _arLong2 = aSeq;
828*cdf0e10cSrcweir     return aSeq;
829*cdf0e10cSrcweir }
830*cdf0e10cSrcweir 
831*cdf0e10cSrcweir Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL Test_Impl::setDim3(
832*cdf0e10cSrcweir         const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq )
833*cdf0e10cSrcweir         throw (RuntimeException)
834*cdf0e10cSrcweir {
835*cdf0e10cSrcweir     _arLong3 = aSeq;
836*cdf0e10cSrcweir     return aSeq;
837*cdf0e10cSrcweir }
838*cdf0e10cSrcweir 
839*cdf0e10cSrcweir void SAL_CALL Test_Impl::setSequencesInOut(Sequence< sal_Bool >& aSeqBoolean,
840*cdf0e10cSrcweir                                 Sequence< sal_Unicode >& aSeqChar,
841*cdf0e10cSrcweir                                 Sequence< sal_Int8 >& aSeqByte,
842*cdf0e10cSrcweir                                 Sequence< sal_Int16 >& aSeqShort,
843*cdf0e10cSrcweir                                 Sequence< sal_uInt16 >& aSeqUShort,
844*cdf0e10cSrcweir                                 Sequence< sal_Int32 >& aSeqLong,
845*cdf0e10cSrcweir                                 Sequence< sal_uInt32 >& aSeqULong,
846*cdf0e10cSrcweir                                 Sequence< sal_Int64 >& aSeqHyper,
847*cdf0e10cSrcweir                                 Sequence< sal_uInt64 >& aSeqUHyper,
848*cdf0e10cSrcweir                                 Sequence< float >& aSeqFloat,
849*cdf0e10cSrcweir                                 Sequence< double >& aSeqDouble,
850*cdf0e10cSrcweir                                 Sequence< TestEnum >& aSeqTestEnum,
851*cdf0e10cSrcweir                                 Sequence< OUString >& aSeqString,
852*cdf0e10cSrcweir                                 Sequence<Reference<XInterface > >& aSeqXInterface,
853*cdf0e10cSrcweir                                 Sequence< Any >& aSeqAny,
854*cdf0e10cSrcweir                                 Sequence< Sequence< sal_Int32 > >& aSeqDim2,
855*cdf0e10cSrcweir                                 Sequence< Sequence< Sequence< sal_Int32 > > >& aSeqDim3 )
856*cdf0e10cSrcweir         throw (RuntimeException)
857*cdf0e10cSrcweir {
858*cdf0e10cSrcweir     _arBool = aSeqBoolean;
859*cdf0e10cSrcweir     _arChar = aSeqChar;
860*cdf0e10cSrcweir     _arByte = aSeqByte;
861*cdf0e10cSrcweir     _arShort = aSeqShort;
862*cdf0e10cSrcweir     _arUShort = aSeqUShort;
863*cdf0e10cSrcweir     _arLong = aSeqLong;
864*cdf0e10cSrcweir     _arULong = aSeqULong;
865*cdf0e10cSrcweir     _arHyper  = aSeqHyper;
866*cdf0e10cSrcweir     _arUHyper = aSeqUHyper;
867*cdf0e10cSrcweir     _arFloat = aSeqFloat;
868*cdf0e10cSrcweir     _arDouble = aSeqDouble;
869*cdf0e10cSrcweir     _arEnum = aSeqTestEnum;
870*cdf0e10cSrcweir     _arString = aSeqString;
871*cdf0e10cSrcweir     _arObject = aSeqXInterface;
872*cdf0e10cSrcweir     _arAny = aSeqAny;
873*cdf0e10cSrcweir     _arLong2 = aSeqDim2;
874*cdf0e10cSrcweir     _arLong3 = aSeqDim3;
875*cdf0e10cSrcweir }
876*cdf0e10cSrcweir 
877*cdf0e10cSrcweir void SAL_CALL Test_Impl::setSequencesOut( Sequence< sal_Bool >& aSeqBoolean,
878*cdf0e10cSrcweir                              Sequence< sal_Unicode >& aSeqChar,
879*cdf0e10cSrcweir                              Sequence< sal_Int8 >& aSeqByte,
880*cdf0e10cSrcweir                              Sequence< sal_Int16 >& aSeqShort,
881*cdf0e10cSrcweir                              Sequence< sal_uInt16 >& aSeqUShort,
882*cdf0e10cSrcweir                              Sequence< sal_Int32 >& aSeqLong,
883*cdf0e10cSrcweir                              Sequence< sal_uInt32 >& aSeqULong,
884*cdf0e10cSrcweir                              Sequence< sal_Int64 >& aSeqHyper,
885*cdf0e10cSrcweir                              Sequence< sal_uInt64 >& aSeqUHyper,
886*cdf0e10cSrcweir                              Sequence< float >& aSeqFloat,
887*cdf0e10cSrcweir                              Sequence< double >& aSeqDouble,
888*cdf0e10cSrcweir                              Sequence< TestEnum >& aSeqEnum,
889*cdf0e10cSrcweir                              Sequence< OUString >& aSeqString,
890*cdf0e10cSrcweir                              Sequence< Reference< XInterface > >& aSeqXInterface,
891*cdf0e10cSrcweir                              Sequence< Any >& aSeqAny,
892*cdf0e10cSrcweir                              Sequence< Sequence< sal_Int32 > >& aSeqDim2,
893*cdf0e10cSrcweir                              Sequence< Sequence< Sequence< sal_Int32 > > >& aSeqDim3 )
894*cdf0e10cSrcweir         throw (RuntimeException)
895*cdf0e10cSrcweir {
896*cdf0e10cSrcweir     aSeqBoolean = _arBool;
897*cdf0e10cSrcweir     aSeqChar = _arChar;
898*cdf0e10cSrcweir     aSeqByte = _arByte;
899*cdf0e10cSrcweir     aSeqShort = _arShort;
900*cdf0e10cSrcweir     aSeqUShort = _arUShort;
901*cdf0e10cSrcweir     aSeqLong = _arLong;
902*cdf0e10cSrcweir     aSeqULong = _arULong;
903*cdf0e10cSrcweir     aSeqHyper = _arHyper;
904*cdf0e10cSrcweir     aSeqUHyper = _arUHyper;
905*cdf0e10cSrcweir     aSeqFloat = _arFloat;
906*cdf0e10cSrcweir     aSeqDouble = _arDouble;
907*cdf0e10cSrcweir     aSeqEnum = _arEnum;
908*cdf0e10cSrcweir     aSeqString = _arString;
909*cdf0e10cSrcweir     aSeqXInterface = _arObject;
910*cdf0e10cSrcweir     aSeqAny = _arAny;
911*cdf0e10cSrcweir     aSeqDim2 = _arLong2;
912*cdf0e10cSrcweir     aSeqDim3 = _arLong3;
913*cdf0e10cSrcweir }
914*cdf0e10cSrcweir 
915*cdf0e10cSrcweir void Test_Impl::testConstructorsService(
916*cdf0e10cSrcweir     Reference< XComponentContext > const & context) throw (RuntimeException)
917*cdf0e10cSrcweir {
918*cdf0e10cSrcweir     Sequence< sal_Bool > arg14(1); arg14[0] = true;
919*cdf0e10cSrcweir     Sequence< sal_Int8 > arg15(1); arg15[0] = SAL_MIN_INT8;
920*cdf0e10cSrcweir     Sequence< sal_Int16 > arg16(1); arg16[0] = SAL_MIN_INT16;
921*cdf0e10cSrcweir     Sequence< sal_uInt16 > arg17(1); arg17[0] = SAL_MAX_UINT16;
922*cdf0e10cSrcweir     Sequence< sal_Int32 > arg18(1); arg18[0] = SAL_MIN_INT32;
923*cdf0e10cSrcweir     Sequence< sal_uInt32 > arg19(1); arg19[0] = SAL_MAX_UINT32;
924*cdf0e10cSrcweir     Sequence< sal_Int64 > arg20(1); arg20[0] = SAL_MIN_INT64;
925*cdf0e10cSrcweir     Sequence< sal_uInt64 > arg21(1); arg21[0] = SAL_MAX_UINT64;
926*cdf0e10cSrcweir     Sequence< float > arg22(1); arg22[0] = 0.123f;
927*cdf0e10cSrcweir     Sequence< double > arg23(1); arg23[0] = 0.456;
928*cdf0e10cSrcweir     Sequence< sal_Unicode > arg24(1); arg24[0] = 'X';
929*cdf0e10cSrcweir     Sequence< OUString > arg25(1);
930*cdf0e10cSrcweir     arg25[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("test"));
931*cdf0e10cSrcweir     Sequence< Type > arg26(1); arg26[0] = UnoType< Any >::get();
932*cdf0e10cSrcweir     Sequence< Any > arg27(1); arg27[0] <<= true;
933*cdf0e10cSrcweir     Sequence< Sequence< sal_Bool > > arg28(1);
934*cdf0e10cSrcweir     arg28[0] = Sequence< sal_Bool >(1); arg28[0][0] = true;
935*cdf0e10cSrcweir     Sequence< Sequence< Any > > arg29(1); arg29[0] = Sequence< Any >(1);
936*cdf0e10cSrcweir     arg29[0][0] <<= true;
937*cdf0e10cSrcweir     Sequence< TestEnum > arg30(1); arg30[0] = TestEnum_TWO;
938*cdf0e10cSrcweir     Sequence< TestStruct > arg31(1); arg31[0].member = 10;
939*cdf0e10cSrcweir     Sequence< TestPolyStruct< sal_Bool > > arg32(1); arg32[0].member = true;
940*cdf0e10cSrcweir     Sequence< TestPolyStruct< Any > > arg33(1); arg33[0].member <<= true;
941*cdf0e10cSrcweir     Sequence< Reference< XInterface > > arg34(1);
942*cdf0e10cSrcweir     Constructors::create1(context,
943*cdf0e10cSrcweir         true,
944*cdf0e10cSrcweir         SAL_MIN_INT8,
945*cdf0e10cSrcweir         SAL_MIN_INT16,
946*cdf0e10cSrcweir         SAL_MAX_UINT16,
947*cdf0e10cSrcweir         SAL_MIN_INT32,
948*cdf0e10cSrcweir         SAL_MAX_UINT32,
949*cdf0e10cSrcweir         SAL_MIN_INT64,
950*cdf0e10cSrcweir         SAL_MAX_UINT64,
951*cdf0e10cSrcweir         0.123f,
952*cdf0e10cSrcweir         0.456,
953*cdf0e10cSrcweir         'X',
954*cdf0e10cSrcweir         OUString(RTL_CONSTASCII_USTRINGPARAM("test")),
955*cdf0e10cSrcweir         UnoType< Any >::get(),
956*cdf0e10cSrcweir         makeAny(true),
957*cdf0e10cSrcweir         arg14,
958*cdf0e10cSrcweir         arg15,
959*cdf0e10cSrcweir         arg16,
960*cdf0e10cSrcweir         arg17,
961*cdf0e10cSrcweir         arg18,
962*cdf0e10cSrcweir         arg19,
963*cdf0e10cSrcweir         arg20,
964*cdf0e10cSrcweir         arg21,
965*cdf0e10cSrcweir         arg22,
966*cdf0e10cSrcweir         arg23,
967*cdf0e10cSrcweir         arg24,
968*cdf0e10cSrcweir         arg25,
969*cdf0e10cSrcweir         arg26,
970*cdf0e10cSrcweir         arg27,
971*cdf0e10cSrcweir         arg28,
972*cdf0e10cSrcweir         arg29,
973*cdf0e10cSrcweir         arg30,
974*cdf0e10cSrcweir         arg31,
975*cdf0e10cSrcweir         arg32,
976*cdf0e10cSrcweir         arg33,
977*cdf0e10cSrcweir         arg34,
978*cdf0e10cSrcweir         TestEnum_TWO,
979*cdf0e10cSrcweir         TestStruct(10),
980*cdf0e10cSrcweir         TestPolyStruct< sal_Bool >(true),
981*cdf0e10cSrcweir         TestPolyStruct< Any >(makeAny(true)),
982*cdf0e10cSrcweir         Reference< XInterface >(0));
983*cdf0e10cSrcweir     Sequence< Any > args(40);
984*cdf0e10cSrcweir     args[0] <<= true;
985*cdf0e10cSrcweir     args[1] <<= SAL_MIN_INT8;
986*cdf0e10cSrcweir     args[2] <<= SAL_MIN_INT16;
987*cdf0e10cSrcweir     args[3] <<= SAL_MAX_UINT16;
988*cdf0e10cSrcweir     args[4] <<= SAL_MIN_INT32;
989*cdf0e10cSrcweir     args[5] <<= SAL_MAX_UINT32;
990*cdf0e10cSrcweir     args[6] <<= SAL_MIN_INT64;
991*cdf0e10cSrcweir     args[7] <<= SAL_MAX_UINT64;
992*cdf0e10cSrcweir     args[8] <<= 0.123f;
993*cdf0e10cSrcweir     args[9] <<= 0.456;
994*cdf0e10cSrcweir     sal_Unicode arg10c = 'X';
995*cdf0e10cSrcweir     args[10].setValue(&arg10c, UnoType< UnoCharType >::get());
996*cdf0e10cSrcweir     args[11] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("test"));
997*cdf0e10cSrcweir     args[12] <<= UnoType< Any >::get();
998*cdf0e10cSrcweir     args[13] <<= true;
999*cdf0e10cSrcweir     args[14] <<= arg14;
1000*cdf0e10cSrcweir     args[15] <<= arg15;
1001*cdf0e10cSrcweir     args[16] <<= arg16;
1002*cdf0e10cSrcweir     args[17] <<= arg17;
1003*cdf0e10cSrcweir     args[18] <<= arg18;
1004*cdf0e10cSrcweir     args[19] <<= arg19;
1005*cdf0e10cSrcweir     args[20] <<= arg20;
1006*cdf0e10cSrcweir     args[21] <<= arg21;
1007*cdf0e10cSrcweir     args[22] <<= arg22;
1008*cdf0e10cSrcweir     args[23] <<= arg23;
1009*cdf0e10cSrcweir     args[24].setValue(&arg24, UnoType< UnoSequenceType< UnoCharType > >::get());
1010*cdf0e10cSrcweir     args[25] <<= arg25;
1011*cdf0e10cSrcweir     args[26] <<= arg26;
1012*cdf0e10cSrcweir     args[27] <<= arg27;
1013*cdf0e10cSrcweir     args[28] <<= arg28;
1014*cdf0e10cSrcweir     args[29] <<= arg29;
1015*cdf0e10cSrcweir     args[30] <<= arg30;
1016*cdf0e10cSrcweir     args[31] <<= arg31;
1017*cdf0e10cSrcweir     args[32] <<= arg32;
1018*cdf0e10cSrcweir     args[33] <<= arg33;
1019*cdf0e10cSrcweir     args[34] <<= arg34;
1020*cdf0e10cSrcweir     args[35] <<= TestEnum_TWO;
1021*cdf0e10cSrcweir     args[36] <<= TestStruct(10);
1022*cdf0e10cSrcweir     args[37] <<= TestPolyStruct< sal_Bool >(true);
1023*cdf0e10cSrcweir     args[38] <<= TestPolyStruct< Any >(makeAny(true));
1024*cdf0e10cSrcweir     args[39] <<= Reference< XInterface >(0);
1025*cdf0e10cSrcweir     Constructors::create2(context, args);
1026*cdf0e10cSrcweir 
1027*cdf0e10cSrcweir     Sequence<Type> argSeq1(1); argSeq1[0] = cppu::UnoType<sal_Int32>::get();
1028*cdf0e10cSrcweir     Sequence<Reference<XInterface> > argSeq2(1); argSeq2[0] = static_cast<XComponent*>(new Dummy());
1029*cdf0e10cSrcweir     Sequence<Reference<XComponent> > argSeq2a(1); argSeq2a[0] = static_cast<XComponent*>(new Dummy());
1030*cdf0e10cSrcweir 
1031*cdf0e10cSrcweir     Sequence<TestPolyStruct2<sal_Unicode, Sequence<Any> > > argSeq3(1);
1032*cdf0e10cSrcweir     argSeq3[0] = TestPolyStruct2<sal_Unicode, Sequence<Any> >('X', arg27);
1033*cdf0e10cSrcweir     Sequence<TestPolyStruct2<TestPolyStruct<sal_Unicode>, Sequence<Any> > > argSeq4(1);
1034*cdf0e10cSrcweir     argSeq4[0] = TestPolyStruct2<TestPolyStruct<sal_Unicode>, Sequence<Any> >(
1035*cdf0e10cSrcweir         TestPolyStruct<sal_Unicode>('X'), arg27);
1036*cdf0e10cSrcweir     Sequence<Sequence<sal_Int32> > argSeq5(1);
1037*cdf0e10cSrcweir     argSeq5[0] = Sequence<sal_Int32>(1); argSeq5[0][0] = SAL_MIN_INT32;
1038*cdf0e10cSrcweir     Sequence<TestPolyStruct<sal_Int32> > argSeq6(1);
1039*cdf0e10cSrcweir     argSeq6[0] = TestPolyStruct<sal_Int32>(SAL_MIN_INT32);
1040*cdf0e10cSrcweir     Sequence<TestPolyStruct<TestPolyStruct2<sal_Unicode, Any> > > argSeq7(1);
1041*cdf0e10cSrcweir     argSeq7[0] = TestPolyStruct<TestPolyStruct2<sal_Unicode, Any> >(
1042*cdf0e10cSrcweir         TestPolyStruct2<sal_Unicode, Any>('X', Any(true)));
1043*cdf0e10cSrcweir     Sequence<TestPolyStruct<TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>,OUString> > > argSeq8(1);
1044*cdf0e10cSrcweir     argSeq8[0] = TestPolyStruct<TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>,OUString> > (
1045*cdf0e10cSrcweir         TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>,OUString>(
1046*cdf0e10cSrcweir             TestPolyStruct2<sal_Unicode, Any>('X', Any(true)), OUString(RTL_CONSTASCII_USTRINGPARAM("test"))));
1047*cdf0e10cSrcweir     Sequence<TestPolyStruct2<OUString, TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> > > > argSeq9(1);
1048*cdf0e10cSrcweir     argSeq9[0] = TestPolyStruct2<OUString, TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> > >(
1049*cdf0e10cSrcweir         OUString(RTL_CONSTASCII_USTRINGPARAM("test")), TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> >(
1050*cdf0e10cSrcweir                      'X', TestPolyStruct<Any>(Any(true))));
1051*cdf0e10cSrcweir     Sequence<TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>, TestPolyStruct<sal_Unicode> > > argSeq10(1);
1052*cdf0e10cSrcweir     argSeq10[0] = TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>, TestPolyStruct<sal_Unicode> >(
1053*cdf0e10cSrcweir         TestPolyStruct2<sal_Unicode, Any>('X', Any(true)), TestPolyStruct<sal_Unicode>('X'));
1054*cdf0e10cSrcweir     Sequence<Sequence<TestPolyStruct<sal_Unicode > > > argSeq11(1);
1055*cdf0e10cSrcweir     argSeq11[0] = Sequence<TestPolyStruct<sal_Unicode > >(1);
1056*cdf0e10cSrcweir     argSeq11[0][0] = TestPolyStruct<sal_Unicode>('X');
1057*cdf0e10cSrcweir     Sequence<Sequence<TestPolyStruct<TestPolyStruct2<sal_Unicode,Any> > > > argSeq12(1);
1058*cdf0e10cSrcweir     argSeq12[0] = Sequence<TestPolyStruct<TestPolyStruct2<sal_Unicode,Any> > >(1);
1059*cdf0e10cSrcweir     argSeq12[0][0] = TestPolyStruct<TestPolyStruct2<sal_Unicode,Any> >(
1060*cdf0e10cSrcweir         TestPolyStruct2<sal_Unicode,Any>('X', Any(true)));
1061*cdf0e10cSrcweir     Sequence<Sequence<TestPolyStruct<TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>,OUString> > > > argSeq13(1);
1062*cdf0e10cSrcweir     argSeq13[0] = Sequence<TestPolyStruct<TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>,OUString> > >(1);
1063*cdf0e10cSrcweir     argSeq13[0][0] = TestPolyStruct<TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>,OUString> >(
1064*cdf0e10cSrcweir         TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>,OUString>(
1065*cdf0e10cSrcweir             TestPolyStruct2<sal_Unicode,Any>('X', Any(true)), OUString(RTL_CONSTASCII_USTRINGPARAM("test"))));
1066*cdf0e10cSrcweir     Sequence<Sequence<TestPolyStruct2<OUString, TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> > > > > argSeq14(1);
1067*cdf0e10cSrcweir     argSeq14[0] = Sequence<TestPolyStruct2<OUString, TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> > > >(1);
1068*cdf0e10cSrcweir     argSeq14[0][0] = TestPolyStruct2<OUString, TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> > >(
1069*cdf0e10cSrcweir         OUString(RTL_CONSTASCII_USTRINGPARAM("test")), TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> >(
1070*cdf0e10cSrcweir             'X', TestPolyStruct<Any>(Any(true))));
1071*cdf0e10cSrcweir     Sequence<Sequence<TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>, TestPolyStruct<sal_Unicode> > > > argSeq15(1);
1072*cdf0e10cSrcweir     argSeq15[0] = Sequence<TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>, TestPolyStruct<sal_Unicode> > >(1);
1073*cdf0e10cSrcweir     argSeq15[0][0] = TestPolyStruct2<TestPolyStruct2<sal_Unicode,Any>, TestPolyStruct<sal_Unicode> >(
1074*cdf0e10cSrcweir         TestPolyStruct2<sal_Unicode,Any>('X',Any(true)), TestPolyStruct<sal_Unicode>('X'));
1075*cdf0e10cSrcweir 
1076*cdf0e10cSrcweir     Constructors2::create1(
1077*cdf0e10cSrcweir         context,
1078*cdf0e10cSrcweir         TestPolyStruct<Type>(cppu::UnoType<sal_Int32>::get()),
1079*cdf0e10cSrcweir         TestPolyStruct<Any>(Any(true)),
1080*cdf0e10cSrcweir         TestPolyStruct<sal_Bool>(true),
1081*cdf0e10cSrcweir         TestPolyStruct<sal_Int8>(SAL_MIN_INT8),
1082*cdf0e10cSrcweir         TestPolyStruct<sal_Int16>(SAL_MIN_INT16),
1083*cdf0e10cSrcweir         TestPolyStruct<sal_Int32>(SAL_MIN_INT32),
1084*cdf0e10cSrcweir         TestPolyStruct<sal_Int64>(SAL_MIN_INT64),
1085*cdf0e10cSrcweir         TestPolyStruct<sal_Unicode>('X'),
1086*cdf0e10cSrcweir         TestPolyStruct<OUString>(OUString(RTL_CONSTASCII_USTRINGPARAM("test"))),
1087*cdf0e10cSrcweir         TestPolyStruct<float>(0.123f),
1088*cdf0e10cSrcweir         TestPolyStruct<double>(0.456),
1089*cdf0e10cSrcweir         TestPolyStruct<Reference<XInterface> >(static_cast<XBridgeTest2*>(this)),
1090*cdf0e10cSrcweir         TestPolyStruct<Reference<XComponent> >(static_cast<XComponent*>(new Dummy())),
1091*cdf0e10cSrcweir         TestPolyStruct<TestEnum>(TestEnum_TWO),
1092*cdf0e10cSrcweir         TestPolyStruct<TestPolyStruct2<sal_Unicode, Any> >(
1093*cdf0e10cSrcweir             TestPolyStruct2<sal_Unicode, Any>('X', Any(true))),
1094*cdf0e10cSrcweir         TestPolyStruct<TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>,OUString> > (
1095*cdf0e10cSrcweir             TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>,OUString>(
1096*cdf0e10cSrcweir                 TestPolyStruct2<sal_Unicode, Any>('X', Any(true)), OUString(RTL_CONSTASCII_USTRINGPARAM("test")))),
1097*cdf0e10cSrcweir         TestPolyStruct2<OUString, TestPolyStruct2<sal_Unicode,TestPolyStruct<Any> > >(
1098*cdf0e10cSrcweir             OUString(RTL_CONSTASCII_USTRINGPARAM("test")),
1099*cdf0e10cSrcweir             TestPolyStruct2<sal_Unicode, TestPolyStruct<Any> >('X', TestPolyStruct<Any>(Any(true)))),
1100*cdf0e10cSrcweir         TestPolyStruct2<TestPolyStruct2<sal_Unicode, Any>, TestPolyStruct<sal_Unicode> >(
1101*cdf0e10cSrcweir             TestPolyStruct2<sal_Unicode, Any>('X', Any(true)),
1102*cdf0e10cSrcweir             TestPolyStruct<sal_Unicode>('X')),
1103*cdf0e10cSrcweir         TestPolyStruct<Sequence<Type> >(argSeq1),
1104*cdf0e10cSrcweir         TestPolyStruct<Sequence<Any> >(arg27),
1105*cdf0e10cSrcweir         TestPolyStruct<Sequence<sal_Bool> >(arg14),
1106*cdf0e10cSrcweir         TestPolyStruct<Sequence<sal_Int8> >(arg15),
1107*cdf0e10cSrcweir         TestPolyStruct<Sequence<sal_Int16> >(arg16),
1108*cdf0e10cSrcweir         TestPolyStruct<Sequence<sal_Int32> >(arg18),
1109*cdf0e10cSrcweir         TestPolyStruct<Sequence<sal_Int64> >(arg20),
1110*cdf0e10cSrcweir         TestPolyStruct<Sequence<sal_Unicode> >(arg24),
1111*cdf0e10cSrcweir         TestPolyStruct<Sequence<OUString> >(arg25),
1112*cdf0e10cSrcweir         TestPolyStruct<Sequence<float> >(arg22),
1113*cdf0e10cSrcweir         TestPolyStruct<Sequence<double> >(arg23),
1114*cdf0e10cSrcweir         TestPolyStruct<Sequence<Reference<XInterface> > >(argSeq2),
1115*cdf0e10cSrcweir         TestPolyStruct<Sequence<Reference<XComponent> > >(argSeq2a),
1116*cdf0e10cSrcweir         TestPolyStruct<Sequence<TestEnum> >(arg30),
1117*cdf0e10cSrcweir         TestPolyStruct<Sequence<TestPolyStruct2<sal_Unicode, Sequence<Any> > > >(argSeq3),
1118*cdf0e10cSrcweir         TestPolyStruct<Sequence<TestPolyStruct2<TestPolyStruct<sal_Unicode>, Sequence<Any> > > > (argSeq4),
1119*cdf0e10cSrcweir         TestPolyStruct<Sequence<Sequence<sal_Int32> > >(argSeq5),
1120*cdf0e10cSrcweir         argSeq6,
1121*cdf0e10cSrcweir         argSeq7,
1122*cdf0e10cSrcweir         argSeq8,
1123*cdf0e10cSrcweir         argSeq9,
1124*cdf0e10cSrcweir         argSeq10,
1125*cdf0e10cSrcweir         argSeq11,
1126*cdf0e10cSrcweir         argSeq12,
1127*cdf0e10cSrcweir         argSeq13,
1128*cdf0e10cSrcweir         argSeq14,
1129*cdf0e10cSrcweir         argSeq15);
1130*cdf0e10cSrcweir }
1131*cdf0e10cSrcweir 
1132*cdf0e10cSrcweir Reference< XCurrentContextChecker > Test_Impl::getCurrentContextChecker()
1133*cdf0e10cSrcweir     throw (RuntimeException)
1134*cdf0e10cSrcweir {
1135*cdf0e10cSrcweir     return new testtools::bridgetest::CurrentContextChecker;
1136*cdf0e10cSrcweir }
1137*cdf0e10cSrcweir 
1138*cdf0e10cSrcweir // XServiceInfo
1139*cdf0e10cSrcweir //__________________________________________________________________________________________________
1140*cdf0e10cSrcweir OUString Test_Impl::getImplementationName()
1141*cdf0e10cSrcweir 	throw (RuntimeException)
1142*cdf0e10cSrcweir {
1143*cdf0e10cSrcweir 	return OUString( RTL_CONSTASCII_USTRINGPARAM(IMPLNAME) );
1144*cdf0e10cSrcweir }
1145*cdf0e10cSrcweir //__________________________________________________________________________________________________
1146*cdf0e10cSrcweir sal_Bool Test_Impl::supportsService( const OUString & rServiceName )
1147*cdf0e10cSrcweir 	throw (RuntimeException)
1148*cdf0e10cSrcweir {
1149*cdf0e10cSrcweir 	const Sequence< OUString > & rSNL = getSupportedServiceNames();
1150*cdf0e10cSrcweir 	const OUString * pArray = rSNL.getConstArray();
1151*cdf0e10cSrcweir 	for ( sal_Int32 nPos = rSNL.getLength(); nPos--; )
1152*cdf0e10cSrcweir 	{
1153*cdf0e10cSrcweir 		if (pArray[nPos] == rServiceName)
1154*cdf0e10cSrcweir 			return sal_True;
1155*cdf0e10cSrcweir 	}
1156*cdf0e10cSrcweir 	return sal_False;
1157*cdf0e10cSrcweir }
1158*cdf0e10cSrcweir //__________________________________________________________________________________________________
1159*cdf0e10cSrcweir Sequence< OUString > Test_Impl::getSupportedServiceNames()
1160*cdf0e10cSrcweir 	throw (RuntimeException)
1161*cdf0e10cSrcweir {
1162*cdf0e10cSrcweir 	return bridge_object::getSupportedServiceNames();
1163*cdf0e10cSrcweir }
1164*cdf0e10cSrcweir 
1165*cdf0e10cSrcweir // ...
1166*cdf0e10cSrcweir 
1167*cdf0e10cSrcweir //==================================================================================================
1168*cdf0e10cSrcweir static Reference< XInterface > SAL_CALL Test_Impl_create( const Reference< XMultiServiceFactory > & )
1169*cdf0e10cSrcweir {
1170*cdf0e10cSrcweir 	return Reference< XInterface >( (XBridgeTest *)new Test_Impl() );
1171*cdf0e10cSrcweir }
1172*cdf0e10cSrcweir 
1173*cdf0e10cSrcweir }
1174*cdf0e10cSrcweir 
1175*cdf0e10cSrcweir extern "C"
1176*cdf0e10cSrcweir {
1177*cdf0e10cSrcweir //==================================================================================================
1178*cdf0e10cSrcweir void SAL_CALL component_getImplementationEnvironment(
1179*cdf0e10cSrcweir 	const sal_Char ** ppEnvTypeName, uno_Environment ** )
1180*cdf0e10cSrcweir {
1181*cdf0e10cSrcweir 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
1182*cdf0e10cSrcweir }
1183*cdf0e10cSrcweir //==================================================================================================
1184*cdf0e10cSrcweir void * SAL_CALL component_getFactory(
1185*cdf0e10cSrcweir 	const sal_Char * pImplName, void * pServiceManager, void * )
1186*cdf0e10cSrcweir {
1187*cdf0e10cSrcweir 	void * pRet = 0;
1188*cdf0e10cSrcweir 
1189*cdf0e10cSrcweir 	if (pServiceManager && rtl_str_compare( pImplName, IMPLNAME ) == 0)
1190*cdf0e10cSrcweir 	{
1191*cdf0e10cSrcweir 		Reference< XSingleServiceFactory > xFactory( createSingleFactory(
1192*cdf0e10cSrcweir 			reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
1193*cdf0e10cSrcweir 			OUString( RTL_CONSTASCII_USTRINGPARAM(IMPLNAME) ),
1194*cdf0e10cSrcweir 			bridge_object::Test_Impl_create,
1195*cdf0e10cSrcweir 			bridge_object::getSupportedServiceNames() ) );
1196*cdf0e10cSrcweir 
1197*cdf0e10cSrcweir 		if (xFactory.is())
1198*cdf0e10cSrcweir 		{
1199*cdf0e10cSrcweir 			xFactory->acquire();
1200*cdf0e10cSrcweir 			pRet = xFactory.get();
1201*cdf0e10cSrcweir 		}
1202*cdf0e10cSrcweir 	}
1203*cdf0e10cSrcweir 
1204*cdf0e10cSrcweir 	return pRet;
1205*cdf0e10cSrcweir }
1206*cdf0e10cSrcweir }
1207*cdf0e10cSrcweir 
1208