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