xref: /aoo41x/main/extensions/test/ole/cpnt/cpnt.cxx (revision 2a97ec55)
1*2a97ec55SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*2a97ec55SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*2a97ec55SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*2a97ec55SAndrew Rist  * distributed with this work for additional information
6*2a97ec55SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*2a97ec55SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*2a97ec55SAndrew Rist  * "License"); you may not use this file except in compliance
9*2a97ec55SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*2a97ec55SAndrew Rist  *
11*2a97ec55SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*2a97ec55SAndrew Rist  *
13*2a97ec55SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*2a97ec55SAndrew Rist  * software distributed under the License is distributed on an
15*2a97ec55SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*2a97ec55SAndrew Rist  * KIND, either express or implied.  See the License for the
17*2a97ec55SAndrew Rist  * specific language governing permissions and limitations
18*2a97ec55SAndrew Rist  * under the License.
19*2a97ec55SAndrew Rist  *
20*2a97ec55SAndrew Rist  *************************************************************/
21*2a97ec55SAndrew Rist 
22*2a97ec55SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_extensions.hxx"
26cdf0e10cSrcweir #include <windows.h>
27cdf0e10cSrcweir #include <atlbase.h>
28cdf0e10cSrcweir #include <stdio.h>
29cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
30cdf0e10cSrcweir #include <com/sun/star/registry/XRegistryKey.hpp>
31cdf0e10cSrcweir #include <osl/diagnose.h>
32cdf0e10cSrcweir #include <uno/environment.h>
33cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
34cdf0e10cSrcweir // OPTIONAL is a constant in com.sun.star.beans.PropertyAttributes but it must be
35cdf0e10cSrcweir // undef'd in some header files
36cdf0e10cSrcweir #define OPTIONAL OPTIONAL
37cdf0e10cSrcweir #include <com/sun/star/beans/PropertyAttribute.hpp>
38cdf0e10cSrcweir #include <com/sun/star/script/XInvocation.hpp>
39cdf0e10cSrcweir #include <com/sun/star/reflection/XIdlReflection.hpp>
40cdf0e10cSrcweir #include <com/sun/star/lang/XEventListener.hpp>
41cdf0e10cSrcweir 
42cdf0e10cSrcweir #include <cppuhelper/implbase7.hxx>
43cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx>
44cdf0e10cSrcweir #include <com/sun/star/uno/Reference.h>
45cdf0e10cSrcweir #include <rtl/ustring.h>
46cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx>
47cdf0e10cSrcweir #include <oletest/XTestSequence.hpp>
48cdf0e10cSrcweir #include <oletest/XTestStruct.hpp>
49cdf0e10cSrcweir #include <oletest/XTestOther.hpp>
50cdf0e10cSrcweir #include <oletest/XTestInterfaces.hpp>
51cdf0e10cSrcweir #include <oletest/XSimple.hpp>
52cdf0e10cSrcweir #include <oletest/XSimple2.hpp>
53cdf0e10cSrcweir #include <oletest/XSimple3.hpp>
54cdf0e10cSrcweir #include <oletest/XTestInParameters.hpp>
55cdf0e10cSrcweir //#include <oletest/XTestOutParameters.hpp>
56cdf0e10cSrcweir #include <oletest/XIdentity.hpp>
57cdf0e10cSrcweir #include <com/sun/star/beans/Property.hpp>
58cdf0e10cSrcweir using namespace cppu;
59cdf0e10cSrcweir using namespace osl;
60cdf0e10cSrcweir using namespace oletest;
61cdf0e10cSrcweir using namespace rtl;
62cdf0e10cSrcweir using namespace com::sun::star::uno;
63cdf0e10cSrcweir using namespace com::sun::star::lang;
64cdf0e10cSrcweir using namespace com::sun::star::beans;
65cdf0e10cSrcweir using namespace com::sun::star::registry;
66cdf0e10cSrcweir using namespace com::sun::star::script;
67cdf0e10cSrcweir using namespace com::sun::star::reflection;
68cdf0e10cSrcweir 
69cdf0e10cSrcweir 
70cdf0e10cSrcweir #define IMPL_NAME L"oletest.OleTestImpl"  // oletest.OleTestImpl in applicat.rdb
71cdf0e10cSrcweir #define SERVICE_NAME L"oletest.OleTest"
72cdf0e10cSrcweir #define KEY1 L"/oletest.OleTestImpl/UNO/SERVICES"
73cdf0e10cSrcweir #define KEY2 L"oletest.OleTest"
74cdf0e10cSrcweir 
75cdf0e10cSrcweir class OComponent : public WeakImplHelper7<
76cdf0e10cSrcweir          XTestSequence, XTestStruct, XTestOther, XTestInterfaces,
77cdf0e10cSrcweir 				   XSimple, XTestInParameters, XIdentity >
78cdf0e10cSrcweir {
79cdf0e10cSrcweir     Reference<XInterface> m_xIntIdentity;
80cdf0e10cSrcweir 	sal_Int32 m_arrayConstructor;
81cdf0e10cSrcweir 	Reference<XMultiServiceFactory> m_rFactory;
82cdf0e10cSrcweir 
83cdf0e10cSrcweir 	Sequence<sal_Int8> m_seqByte;
84cdf0e10cSrcweir 	Sequence<float> m_seqFloat;
85cdf0e10cSrcweir 	Sequence<double> m_seqDouble;
86cdf0e10cSrcweir 	Sequence<sal_Bool> m_seqBool;
87cdf0e10cSrcweir 	Sequence<sal_Int16> m_seqShort;
88cdf0e10cSrcweir 	Sequence<sal_uInt16> m_seqUShort;
89cdf0e10cSrcweir 	Sequence<sal_Int32> m_seqLong;
90cdf0e10cSrcweir 	Sequence<sal_uInt32> m_seqULong;
91cdf0e10cSrcweir 	Sequence<sal_Unicode> m_seqChar;
92cdf0e10cSrcweir 	Sequence<OUString> m_seqString;
93cdf0e10cSrcweir 	Sequence<Any> m_seqAny;
94cdf0e10cSrcweir     Sequence<Type> m_seqType;
95cdf0e10cSrcweir 	Sequence<Sequence< sal_Int32> > m_seq1;
96cdf0e10cSrcweir 	Sequence<Sequence< Sequence< sal_Int32> > > m_seq2;
97cdf0e10cSrcweir 	Any m_any;
98cdf0e10cSrcweir     Type m_type;
99cdf0e10cSrcweir 	Sequence<Reference< XInterface > > m_seqxInterface;
100cdf0e10cSrcweir 
101cdf0e10cSrcweir     sal_Int8 m_int8;
102cdf0e10cSrcweir     sal_uInt8 m_uint8;
103cdf0e10cSrcweir     sal_Int16 m_int16;
104cdf0e10cSrcweir     sal_uInt16 m_uint16;
105cdf0e10cSrcweir     sal_Int32 m_int32;
106cdf0e10cSrcweir     sal_uInt32 m_uint32;
107cdf0e10cSrcweir     sal_Int64 m_int64;
108cdf0e10cSrcweir     sal_uInt64 m_uint64;
109cdf0e10cSrcweir     float m_float;
110cdf0e10cSrcweir     double m_double;
111cdf0e10cSrcweir     OUString m_string;
112cdf0e10cSrcweir     sal_Unicode m_char;
113cdf0e10cSrcweir     sal_Bool m_bool;
114cdf0e10cSrcweir     Reference<XInterface> m_xinterface;
115cdf0e10cSrcweir 
116cdf0e10cSrcweir     sal_Int8 m_attr_int8;
117cdf0e10cSrcweir     sal_uInt8 m_attr_uint8;
118cdf0e10cSrcweir     sal_Int16 m_attr_int16;
119cdf0e10cSrcweir     sal_uInt16 m_attr_uint16;
120cdf0e10cSrcweir     sal_Int32 m_attr_int32;
121cdf0e10cSrcweir     sal_uInt32 m_attr_uint32;
122cdf0e10cSrcweir     sal_Int64 m_attr_int64;
123cdf0e10cSrcweir     sal_uInt64 m_attr_uint64;
124cdf0e10cSrcweir     float m_attr_float;
125cdf0e10cSrcweir     double m_attr_double;
126cdf0e10cSrcweir     OUString m_attr_string;
127cdf0e10cSrcweir     sal_Unicode m_attr_char;
128cdf0e10cSrcweir     sal_Bool m_attr_bool;
129cdf0e10cSrcweir     Any m_attr_any;
130cdf0e10cSrcweir     Type m_attr_type;
131cdf0e10cSrcweir     Reference<XInterface> m_attr_xinterface;
132cdf0e10cSrcweir     Reference<XInvocation> m_attr_xinvocation;
133cdf0e10cSrcweir 
134cdf0e10cSrcweir public:
OComponent(const Reference<XMultiServiceFactory> & rFactory)135cdf0e10cSrcweir 	OComponent( const Reference<XMultiServiceFactory> & rFactory ) :
136cdf0e10cSrcweir 	  m_rFactory( rFactory ), m_arrayConstructor(0) {}
137cdf0e10cSrcweir 	~OComponent();
138cdf0e10cSrcweir public: // XTestSequence
139cdf0e10cSrcweir 	virtual Sequence<sal_Int8> SAL_CALL methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException );
140cdf0e10cSrcweir 	virtual Sequence<float> SAL_CALL methodFloat(const Sequence< float >& aSeq) throw( RuntimeException );
141cdf0e10cSrcweir 	virtual Sequence< double > SAL_CALL methodDouble(const Sequence< double >& aSeq) throw( RuntimeException);
142cdf0e10cSrcweir 	virtual Sequence< sal_Bool > SAL_CALL methodBool(const Sequence< sal_Bool >& aSeq) throw( RuntimeException );
143cdf0e10cSrcweir 	virtual Sequence< sal_Int16 > SAL_CALL methodShort(const Sequence< sal_Int16 >& aSeq) throw( RuntimeException );
144cdf0e10cSrcweir 	virtual Sequence< sal_uInt16 > SAL_CALL methodUShort(const Sequence< sal_uInt16 >& aSeq) throw( RuntimeException );
145cdf0e10cSrcweir 	virtual Sequence< sal_Int32 > SAL_CALL methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException) ;
146cdf0e10cSrcweir 	virtual Sequence< sal_uInt32 > SAL_CALL methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException );
147cdf0e10cSrcweir 	virtual Sequence< OUString > SAL_CALL methodString(const Sequence< OUString >& aSeq) throw( RuntimeException );
148cdf0e10cSrcweir 	virtual Sequence< sal_Unicode > SAL_CALL methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException );
149cdf0e10cSrcweir 	virtual Sequence< Any > SAL_CALL methodAny(const Sequence< Any >& aSeq) throw( RuntimeException );
150cdf0e10cSrcweir     virtual Sequence< Type > SAL_CALL methodType(const Sequence< Type >& aSeq) throw( RuntimeException );
151cdf0e10cSrcweir     virtual Sequence< Reference< XInterface > > SAL_CALL methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException) ;
152cdf0e10cSrcweir 	virtual Sequence< Sequence< sal_Int32 > > SAL_CALL methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException );
153cdf0e10cSrcweir 	virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq) throw( RuntimeException );
154cdf0e10cSrcweir     virtual Sequence< Reference<XEventListener> > SAL_CALL methodXEventListeners( const Sequence<Reference<XEventListener> >& aSeq) throw( RuntimeException);
155cdf0e10cSrcweir     virtual Sequence< Sequence<Reference<XEventListener > > > SAL_CALL methodXEventListenersMul( const Sequence<Sequence<Reference<XEventListener > > >& aSeq ) throw (RuntimeException);
156cdf0e10cSrcweir 
157cdf0e10cSrcweir     virtual Sequence< sal_Int8 > SAL_CALL getAttrByte(void) throw( RuntimeException );
158cdf0e10cSrcweir     virtual void SAL_CALL setAttrByte(const Sequence< sal_Int8 >& AttrByte_) throw( RuntimeException );
159cdf0e10cSrcweir     virtual Sequence< float > SAL_CALL getAttrFloat(void)  throw( RuntimeException) ;
160cdf0e10cSrcweir     virtual void SAL_CALL setAttrFloat(const Sequence< float >& AttrFloat_) throw( RuntimeException );
161cdf0e10cSrcweir     virtual Sequence< double > SAL_CALL getAttrDouble(void)  throw( RuntimeException) ;
162cdf0e10cSrcweir     virtual void SAL_CALL setAttrDouble(const Sequence< double >& AttrDouble_) throw( RuntimeException );
163cdf0e10cSrcweir     virtual Sequence< sal_Bool > SAL_CALL getAttrBool(void)  throw( RuntimeException );
164cdf0e10cSrcweir     virtual void SAL_CALL setAttrBool(const Sequence< sal_Bool >& AttrBool_) throw( RuntimeException );
165cdf0e10cSrcweir 	virtual Sequence< sal_Int16 > SAL_CALL getAttrShort(void)  throw( RuntimeException );
166cdf0e10cSrcweir     virtual void SAL_CALL setAttrShort(const Sequence< sal_Int16 >& AttrShort_) throw( RuntimeException );
167cdf0e10cSrcweir     virtual Sequence< sal_uInt16 > SAL_CALL getAttrUShort(void)  throw( RuntimeException );
168cdf0e10cSrcweir     virtual void SAL_CALL setAttrUShort(const Sequence< sal_uInt16 >& AttrUShort_) throw( RuntimeException );
169cdf0e10cSrcweir     virtual Sequence< sal_Int32 > SAL_CALL getAttrLong(void)  throw( RuntimeException );
170cdf0e10cSrcweir     virtual void SAL_CALL setAttrLong(const Sequence< sal_Int32 >& AttrLong_) throw( RuntimeException );
171cdf0e10cSrcweir     virtual Sequence< sal_uInt32 > SAL_CALL getAttrULong(void)  throw( RuntimeException );
172cdf0e10cSrcweir     virtual void SAL_CALL setAttrULong(const Sequence< sal_uInt32 >& AttrULong_) throw( RuntimeException );
173cdf0e10cSrcweir     virtual Sequence< OUString > SAL_CALL getAttrString(void)  throw(RuntimeException );
174cdf0e10cSrcweir     virtual void SAL_CALL setAttrString(const Sequence< OUString >& AttrString_) throw( RuntimeException );
175cdf0e10cSrcweir     virtual Sequence< sal_Unicode > SAL_CALL getAttrChar(void)  throw( RuntimeException );
176cdf0e10cSrcweir     virtual void SAL_CALL setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException );
177cdf0e10cSrcweir 	virtual Sequence< Any > SAL_CALL getAttrAny(void)  throw( RuntimeException );
178cdf0e10cSrcweir     virtual void SAL_CALL setAttrAny(const Sequence< Any >& AttrAny_) throw( RuntimeException );
179cdf0e10cSrcweir 	virtual Sequence< Type > SAL_CALL getAttrType(void)  throw( RuntimeException );
180cdf0e10cSrcweir     virtual void SAL_CALL setAttrType( const Sequence< Type >& _attrtype ) throw (RuntimeException);
181cdf0e10cSrcweir     virtual Sequence< Sequence< sal_Int32 > > SAL_CALL getAttrSequence(void) throw( RuntimeException );
182cdf0e10cSrcweir     virtual void SAL_CALL  setAttrSequence(const Sequence< Sequence< sal_Int32 > >& AttrSequence_) throw( RuntimeException );
183cdf0e10cSrcweir 	virtual Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL getAttrSequence2(void)  throw( RuntimeException );
184cdf0e10cSrcweir     virtual void SAL_CALL setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_) throw ( RuntimeException );
185cdf0e10cSrcweir     virtual Sequence< Reference< XInterface > > SAL_CALL getAttrXInterface() throw(RuntimeException);
186cdf0e10cSrcweir 	virtual void SAL_CALL setAttrXInterface( const Sequence< Reference< XInterface > >& _attrxinterface ) throw(RuntimeException);
187cdf0e10cSrcweir 
188cdf0e10cSrcweir     virtual ::sal_Int8 SAL_CALL getAByte() throw (RuntimeException);
189cdf0e10cSrcweir     virtual void SAL_CALL setAByte( ::sal_Int8 _abyte ) throw (RuntimeException);
190cdf0e10cSrcweir     virtual float SAL_CALL getAFloat() throw (RuntimeException);
191cdf0e10cSrcweir     virtual void SAL_CALL setAFloat( float _afloat ) throw (RuntimeException);
192cdf0e10cSrcweir     virtual double SAL_CALL getADouble() throw (RuntimeException);
193cdf0e10cSrcweir     virtual void SAL_CALL setADouble( double _adouble ) throw (RuntimeException);
194cdf0e10cSrcweir     virtual ::sal_Bool SAL_CALL getABool() throw (RuntimeException);
195cdf0e10cSrcweir     virtual void SAL_CALL setABool( ::sal_Bool _abool ) throw (RuntimeException);
196cdf0e10cSrcweir     virtual ::sal_Int16 SAL_CALL getAShort() throw (RuntimeException);
197cdf0e10cSrcweir     virtual void SAL_CALL setAShort( ::sal_Int16 _ashort ) throw (RuntimeException);
198cdf0e10cSrcweir     virtual ::sal_uInt16 SAL_CALL getAUShort() throw (RuntimeException);
199cdf0e10cSrcweir     virtual void SAL_CALL setAUShort( ::sal_uInt16 _aushort ) throw (RuntimeException);
200cdf0e10cSrcweir     virtual ::sal_Int32 SAL_CALL getALong() throw (RuntimeException);
201cdf0e10cSrcweir     virtual void SAL_CALL setALong( ::sal_Int32 _along ) throw (RuntimeException);
202cdf0e10cSrcweir     virtual ::sal_uInt32 SAL_CALL getAULong() throw (RuntimeException);
203cdf0e10cSrcweir     virtual void SAL_CALL setAULong( ::sal_uInt32 _aulong ) throw (RuntimeException);
204cdf0e10cSrcweir     virtual ::rtl::OUString SAL_CALL getAString() throw (RuntimeException);
205cdf0e10cSrcweir     virtual void SAL_CALL setAString( const ::rtl::OUString& _astring ) throw (RuntimeException);
206cdf0e10cSrcweir     virtual ::sal_Unicode SAL_CALL getAChar() throw (RuntimeException);
207cdf0e10cSrcweir     virtual void SAL_CALL setAChar( ::sal_Unicode _achar ) throw (RuntimeException);
208cdf0e10cSrcweir     virtual Any SAL_CALL getAAny() throw (RuntimeException);
209cdf0e10cSrcweir     virtual void SAL_CALL setAAny( const Any& _aany ) throw (RuntimeException);
210cdf0e10cSrcweir     virtual Type SAL_CALL getAType() throw (RuntimeException);
211cdf0e10cSrcweir     virtual void SAL_CALL setAType( const Type& _atype ) throw (RuntimeException);
212cdf0e10cSrcweir     virtual Reference< XInterface > SAL_CALL getAXInterface() throw (RuntimeException);
213cdf0e10cSrcweir     virtual void SAL_CALL setAXInterface( const Reference<XInterface >& _axinterface ) throw (RuntimeException);
214cdf0e10cSrcweir     virtual Reference<XInvocation > SAL_CALL getAXInvocation() throw (RuntimeException);
215cdf0e10cSrcweir     virtual void SAL_CALL setAXInvocation( const Reference< XInvocation >& _axinvocation ) throw (RuntimeException);
216cdf0e10cSrcweir 
217cdf0e10cSrcweir     virtual void SAL_CALL testout_methodByte(sal_Int8& rOut) throw( RuntimeException );
218cdf0e10cSrcweir     virtual void SAL_CALL testout_methodFloat(float& rOut) throw( RuntimeException );
219cdf0e10cSrcweir     virtual void SAL_CALL testout_methodDouble(double& rOut) throw( RuntimeException );
220cdf0e10cSrcweir     virtual void SAL_CALL testout_methodBool(sal_Bool& rOut) throw( RuntimeException );
221cdf0e10cSrcweir     virtual void SAL_CALL testout_methodShort(sal_Int16& rOut) throw( RuntimeException );
222cdf0e10cSrcweir     virtual void SAL_CALL testout_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
223cdf0e10cSrcweir     virtual void SAL_CALL testout_methodLong(sal_Int32& rOut) throw( RuntimeException );
224cdf0e10cSrcweir     virtual void SAL_CALL testout_methodULong(sal_uInt32& rOut) throw( RuntimeException );
225cdf0e10cSrcweir     virtual void SAL_CALL testout_methodHyper(sal_Int64& rOut) throw( RuntimeException );
226cdf0e10cSrcweir     virtual void SAL_CALL testout_methodUHyper(sal_uInt64& rOut) throw( RuntimeException );
227cdf0e10cSrcweir     virtual void SAL_CALL testout_methodString(OUString& rOut) throw( RuntimeException );
228cdf0e10cSrcweir     virtual void SAL_CALL testout_methodChar(sal_Unicode& rOut) throw( RuntimeException );
229cdf0e10cSrcweir     virtual void SAL_CALL testout_methodAny(Any& rOut) throw( RuntimeException );
230cdf0e10cSrcweir     virtual void SAL_CALL testout_methodType(Type& rOut) throw( RuntimeException );
231cdf0e10cSrcweir     virtual void SAL_CALL testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
232cdf0e10cSrcweir     virtual void SAL_CALL testout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
233cdf0e10cSrcweir     virtual void SAL_CALL testout_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
234cdf0e10cSrcweir     virtual void SAL_CALL testout_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
235cdf0e10cSrcweir     virtual void SAL_CALL testout_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );
236cdf0e10cSrcweir     virtual void SAL_CALL testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 in3 ) throw(RuntimeException);
237cdf0e10cSrcweir     virtual void SAL_CALL testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException);
238cdf0e10cSrcweir 
239cdf0e10cSrcweir 	virtual void SAL_CALL testinout_methodByte(sal_Int8& rOut) throw( RuntimeException );
240cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodFloat(float& rOut) throw( RuntimeException );
241cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodDouble(double& rOut) throw( RuntimeException );
242cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodBool(sal_Bool& rOut) throw( RuntimeException );
243cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodShort(sal_Int16& rOut) throw( RuntimeException );
244cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
245cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodLong(sal_Int32& rOut) throw( RuntimeException );
246cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodULong(sal_uInt32& rOut) throw( RuntimeException );
247cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodHyper(sal_Int64& rOut) throw( RuntimeException );
248cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodUHyper(sal_uInt64& rOut) throw( RuntimeException );
249cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodString(OUString& rOut) throw( RuntimeException );
250cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException );
251cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodAny(Any& rOut) throw( RuntimeException );
252cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodType(Type& rOut) throw( RuntimeException );
253cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
254cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
255cdf0e10cSrcweir     virtual void SAL_CALL testinout_methodXInterface( Reference< XInvocation >& rOut ) throw(RuntimeException);
256cdf0e10cSrcweir 	virtual void SAL_CALL testinout_methodXInterface2( Reference< XInterface > & rOut) throw( RuntimeException);
257cdf0e10cSrcweir     virtual Any SAL_CALL methodAnyTest1(const Any& rIn) throw( RuntimeException ) ;
258cdf0e10cSrcweir     virtual Any SAL_CALL getAttrAny2(void) throw( RuntimeException ) ;
259cdf0e10cSrcweir     virtual void SAL_CALL setAttrAny2(const Any& AttrAny2_) throw( RuntimeException ) ;
260cdf0e10cSrcweir 
261cdf0e10cSrcweir 
262cdf0e10cSrcweir 	// XTestStruct
263cdf0e10cSrcweir 	virtual void SAL_CALL methodStruct(const Property& aProp) throw( RuntimeException );
264cdf0e10cSrcweir 
265cdf0e10cSrcweir     virtual Property SAL_CALL retMethodStruct(void) throw( RuntimeException );
266cdf0e10cSrcweir 
267cdf0e10cSrcweir     virtual Property SAL_CALL  getAttrStruct(void) throw( RuntimeException );
268cdf0e10cSrcweir     virtual void SAL_CALL setAttrStruct(const Property& AttrStruct_) throw( RuntimeException );
269cdf0e10cSrcweir     virtual Property SAL_CALL methodStruct2( const Property& aProp ) throw (RuntimeException);
270cdf0e10cSrcweir 
271cdf0e10cSrcweir 	// XTestOther
272cdf0e10cSrcweir     virtual void SAL_CALL other_methodAnyIn(const Any& rAny) throw( RuntimeException );
273cdf0e10cSrcweir     virtual void SAL_CALL other_methodAnyOut(Any& rAny) throw( RuntimeException );
274cdf0e10cSrcweir     virtual Any SAL_CALL other_methodAnyRet(void) throw( RuntimeException );
275cdf0e10cSrcweir 	virtual void SAL_CALL in_float( float val) throw ( RuntimeException);
276cdf0e10cSrcweir     virtual Any SAL_CALL other_methodAny( const Any& rAny, const OUString& typeInAny )
277cdf0e10cSrcweir         throw (RuntimeException);
278cdf0e10cSrcweir 
279cdf0e10cSrcweir 
280cdf0e10cSrcweir 	// XTestOutParameters ------------------------------------------------------------------------
281cdf0e10cSrcweir //     virtual void SAL_CALL out_test(sal_Int8 rIn) throw( RuntimeException );
282cdf0e10cSrcweir 
283cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodByte(sal_Int8& rOut) throw( RuntimeException );
284cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodFloat(float& rOut) throw( RuntimeException );
285cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodDouble(double& rOut) throw( RuntimeException );
286cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodBool(sal_Bool& rOut) throw( RuntimeException );
287cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodShort(sal_Int16& rOut) throw( RuntimeException );
288cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodUShort(sal_uInt16& rOut) throw( RuntimeException );
289cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodLong(sal_Int32& rOut) throw( RuntimeException );
290cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodULong(sal_uInt32& rOut) throw( RuntimeException );
291cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodHyper(sal_Int64& rOut) throw( RuntimeException );
292cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException );
293cdf0e10cSrcweir //     virtual void SAL_CALL out_methodString(OUString& rOut) throw( RuntimeException );
294cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodChar(sal_Unicode& rOut) throw( RuntimeException );
295cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodAny(Any& rOut) throw( RuntimeException );
296cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException );
297cdf0e10cSrcweir // 	virtual void SAL_CALL out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException );
298cdf0e10cSrcweir //     virtual void SAL_CALL out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException );
299cdf0e10cSrcweir //     virtual void SAL_CALL out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException );
300cdf0e10cSrcweir //     virtual void SAL_CALL out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException );
301cdf0e10cSrcweir 
302cdf0e10cSrcweir 	// XTestInParameters
303cdf0e10cSrcweir     virtual sal_Int8 SAL_CALL in_methodByte( sal_Int8 rIn ) throw (RuntimeException);
304cdf0e10cSrcweir     virtual float SAL_CALL in_methodFloat( float rIn ) throw (RuntimeException);
305cdf0e10cSrcweir     virtual double SAL_CALL in_methodDouble( double rIn ) throw (RuntimeException);
306cdf0e10cSrcweir     virtual sal_Bool SAL_CALL in_methodBool( sal_Bool rIn ) throw (RuntimeException);
307cdf0e10cSrcweir     virtual sal_Int16 SAL_CALL in_methodShort( sal_Int16 rIn ) throw (RuntimeException);
308cdf0e10cSrcweir     virtual sal_uInt16 SAL_CALL in_methodUShort( sal_uInt16 rIn ) throw (RuntimeException);
309cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL in_methodLong( sal_Int32 rIn ) throw (RuntimeException);
310cdf0e10cSrcweir     virtual sal_uInt32 SAL_CALL in_methodULong( sal_uInt32 rIn ) throw (RuntimeException);
311cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL in_methodHyper( sal_Int64 rIn ) throw (RuntimeException);
312cdf0e10cSrcweir     virtual sal_uInt64 SAL_CALL in_methodUHyper( sal_uInt64 rIn ) throw (RuntimeException);
313cdf0e10cSrcweir     virtual OUString SAL_CALL in_methodString( const OUString& rIn ) throw (RuntimeException);
314cdf0e10cSrcweir     virtual sal_Unicode SAL_CALL in_methodChar( sal_Unicode rIn ) throw (RuntimeException);
315cdf0e10cSrcweir     virtual Any SAL_CALL in_methodAny( const Any& rIn ) throw (RuntimeException);
316cdf0e10cSrcweir     virtual Type SAL_CALL in_methodType( const Type& rIn ) throw (RuntimeException);
317cdf0e10cSrcweir     virtual Reference<XInterface> SAL_CALL in_methodXInterface( const Reference< XInterface >& rIn ) throw (RuntimeException);
318cdf0e10cSrcweir     virtual Reference<XInvocation > SAL_CALL in_methodInvocation( const Reference< XInvocation >& inv ) throw (RuntimeException);
319cdf0e10cSrcweir 	virtual SimpleStruct SAL_CALL in_methodStruct( const SimpleStruct& aStruct ) throw (RuntimeException);
320cdf0e10cSrcweir     virtual void SAL_CALL in_methodAll( sal_Int8 b, float f, double d, sal_Bool boo, sal_Int16 sh, sal_uInt16 us, sal_Int32 l, sal_uInt32 ul, const OUString& s, sal_Unicode c, const Any& a, const Type& t, const Reference<XInvocation>& inv ) throw (RuntimeException);
321cdf0e10cSrcweir 
322cdf0e10cSrcweir 	// XTestInterfaces --------------------------------------------------------------------------
323cdf0e10cSrcweir     virtual void SAL_CALL testInterface(  const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException);
324cdf0e10cSrcweir     virtual void SAL_CALL testInterface2(  const Reference< XSimple >& xSimple, sal_Int32 mode ) throw(RuntimeException);
325cdf0e10cSrcweir 	// XSimple --------------------------------------------------------------------------
326cdf0e10cSrcweir 	void SAL_CALL func( const OUString &message) throw(::com::sun::star::uno::RuntimeException);
327cdf0e10cSrcweir 	OUString SAL_CALL getName() throw(::com::sun::star::uno::RuntimeException);
328cdf0e10cSrcweir 
329cdf0e10cSrcweir     // XIdentity
330cdf0e10cSrcweir     virtual void SAL_CALL setObject( const Reference< XInterface >& val ) throw (RuntimeException);
331cdf0e10cSrcweir     virtual sal_Bool SAL_CALL isSame( const Reference< XInterface >& val ) throw (RuntimeException);
332cdf0e10cSrcweir     virtual Reference< XInterface > SAL_CALL getThis(  ) throw (RuntimeException);
333cdf0e10cSrcweir };
334cdf0e10cSrcweir 
335cdf0e10cSrcweir class EventListener: public WeakImplHelper1<XEventListener>
336cdf0e10cSrcweir {
337cdf0e10cSrcweir public:
EventListener()338cdf0e10cSrcweir     EventListener::EventListener(): bCalled( sal_False)
339cdf0e10cSrcweir         {}
340cdf0e10cSrcweir     virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (RuntimeException);
341cdf0e10cSrcweir 
342cdf0e10cSrcweir     sal_Bool bCalled;
343cdf0e10cSrcweir };
344cdf0e10cSrcweir 
345cdf0e10cSrcweir 
~OComponent()346cdf0e10cSrcweir OComponent::~OComponent()
347cdf0e10cSrcweir {
348cdf0e10cSrcweir }
349cdf0e10cSrcweir 
350cdf0e10cSrcweir 
351cdf0e10cSrcweir // Funktions ==============================================================================
352cdf0e10cSrcweir 
OComponent_CreateInstance(const Reference<XMultiServiceFactory> & rSMgr)353cdf0e10cSrcweir Reference<XInterface> SAL_CALL OComponent_CreateInstance( const Reference<XMultiServiceFactory> & rSMgr ) throw(RuntimeException)
354cdf0e10cSrcweir {
355cdf0e10cSrcweir //	Reference<XInterface> xService(static_cast<XWeak*>(new OComponent( rSMgr )), UNO_QUERY);
356cdf0e10cSrcweir     OComponent* o= new OComponent( rSMgr );
357cdf0e10cSrcweir     Reference<XInterface> xService(static_cast<XIdentity*>(o), UNO_QUERY);
358cdf0e10cSrcweir 	return xService;
359cdf0e10cSrcweir }
360cdf0e10cSrcweir 
OComponent_getSupportedServiceNames(void)361cdf0e10cSrcweir Sequence<OUString> OComponent_getSupportedServiceNames(void)
362cdf0e10cSrcweir {
363cdf0e10cSrcweir 	Sequence<OUString> aRet(1);
364cdf0e10cSrcweir 	aRet.getArray()[0] = SERVICE_NAME;//ODataInputStream_getImplementationName();
365cdf0e10cSrcweir 
366cdf0e10cSrcweir 	return aRet;
367cdf0e10cSrcweir }
368cdf0e10cSrcweir 
369cdf0e10cSrcweir 
component_writeInfo(void *,void * pRegistryKey)370cdf0e10cSrcweir extern "C" sal_Bool SAL_CALL component_writeInfo(	void * /*pServiceManager*/, void * pRegistryKey )
371cdf0e10cSrcweir {
372cdf0e10cSrcweir 	if(pRegistryKey)
373cdf0e10cSrcweir 	{
374cdf0e10cSrcweir 		try
375cdf0e10cSrcweir 		{
376cdf0e10cSrcweir 			Reference<XRegistryKey> xNewKey =
377cdf0e10cSrcweir 				reinterpret_cast<XRegistryKey*>( pRegistryKey)->createKey(KEY1);
378cdf0e10cSrcweir 			xNewKey->createKey( KEY2);
379cdf0e10cSrcweir 			return sal_True;
380cdf0e10cSrcweir 
381cdf0e10cSrcweir 		}
382cdf0e10cSrcweir 		catch(InvalidRegistryException &)
383cdf0e10cSrcweir 		{
384cdf0e10cSrcweir 			OSL_ENSURE( sal_False, "### InvalidRegistryException!\n");
385cdf0e10cSrcweir 		}
386cdf0e10cSrcweir 	}
387cdf0e10cSrcweir 	return sal_False;
388cdf0e10cSrcweir }
389cdf0e10cSrcweir 
component_getFactory(const sal_Char * pImplName,void * pServiceManager,void *)390cdf0e10cSrcweir extern "C" void * SAL_CALL component_getFactory(
391cdf0e10cSrcweir 	const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
392cdf0e10cSrcweir {
393cdf0e10cSrcweir 	static void * pRet= NULL;
394cdf0e10cSrcweir 	if( ! pRet)
395cdf0e10cSrcweir 	{
396cdf0e10cSrcweir 		OUString aImplName( OUString::createFromAscii( pImplName ) );
397cdf0e10cSrcweir 		if (pServiceManager && aImplName.equals(  IMPL_NAME  ))
398cdf0e10cSrcweir 		{
399cdf0e10cSrcweir 			Reference<XMultiServiceFactory> xMulFac(
400cdf0e10cSrcweir 				reinterpret_cast< XMultiServiceFactory*>(pServiceManager));
401cdf0e10cSrcweir 
402cdf0e10cSrcweir 			Sequence<OUString> seqServiceNames;
403cdf0e10cSrcweir 			Reference<XSingleServiceFactory> xFactory = createOneInstanceFactory( xMulFac, SERVICE_NAME,
404cdf0e10cSrcweir 										OComponent_CreateInstance, seqServiceNames);
405cdf0e10cSrcweir 
406cdf0e10cSrcweir 			if (xFactory.is())
407cdf0e10cSrcweir 			{
408cdf0e10cSrcweir 				xFactory->acquire();
409cdf0e10cSrcweir 				pRet = xFactory.get();
410cdf0e10cSrcweir 			}
411cdf0e10cSrcweir 		}
412cdf0e10cSrcweir 	}
413cdf0e10cSrcweir 	return	pRet;
414cdf0e10cSrcweir }
415cdf0e10cSrcweir 
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)416cdf0e10cSrcweir extern "C" void SAL_CALL component_getImplementationEnvironment(
417cdf0e10cSrcweir 	const sal_Char ** ppEnvTypeName, uno_Environment ** )
418cdf0e10cSrcweir {
419cdf0e10cSrcweir 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
420cdf0e10cSrcweir }
421cdf0e10cSrcweir 
422cdf0e10cSrcweir 
423cdf0e10cSrcweir // XTestSequence ============================================================================
methodByte(const Sequence<sal_Int8> & aSeq)424cdf0e10cSrcweir Sequence<sal_Int8> SAL_CALL OComponent::methodByte(const Sequence< sal_Int8 >& aSeq) throw( RuntimeException )
425cdf0e10cSrcweir {
426cdf0e10cSrcweir 	sal_Int8 _x;
427cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
428cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
429cdf0e10cSrcweir 	}
430cdf0e10cSrcweir 	return aSeq;
431cdf0e10cSrcweir }
methodFloat(const Sequence<float> & aSeq)432cdf0e10cSrcweir Sequence<float> SAL_CALL OComponent::methodFloat(const Sequence< float>& aSeq) throw( RuntimeException )
433cdf0e10cSrcweir {
434cdf0e10cSrcweir 	float _x;
435cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
436cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
437cdf0e10cSrcweir 	}
438cdf0e10cSrcweir 	return aSeq;
439cdf0e10cSrcweir }
methodDouble(const Sequence<double> & aSeq)440cdf0e10cSrcweir Sequence<double> SAL_CALL OComponent::methodDouble(const Sequence< double >& aSeq) throw( RuntimeException)
441cdf0e10cSrcweir {
442cdf0e10cSrcweir 	double _x;
443cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
444cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
445cdf0e10cSrcweir 	}
446cdf0e10cSrcweir 	return aSeq;
447cdf0e10cSrcweir }
methodBool(const Sequence<sal_Bool> & aSeq)448cdf0e10cSrcweir Sequence< sal_Bool > SAL_CALL OComponent::methodBool(const Sequence< sal_Bool >& aSeq) throw( RuntimeException)
449cdf0e10cSrcweir {
450cdf0e10cSrcweir 	sal_Bool _x;
451cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
452cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
453cdf0e10cSrcweir 	}
454cdf0e10cSrcweir 	return aSeq;
455cdf0e10cSrcweir }
methodShort(const Sequence<sal_Int16> & aSeq)456cdf0e10cSrcweir Sequence< sal_Int16 > SAL_CALL OComponent::methodShort(const Sequence< sal_Int16 >& aSeq) throw( RuntimeException )
457cdf0e10cSrcweir {
458cdf0e10cSrcweir 	sal_Int16 _x;
459cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
460cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
461cdf0e10cSrcweir 	}
462cdf0e10cSrcweir 	return aSeq;
463cdf0e10cSrcweir }
methodUShort(const Sequence<sal_uInt16> & aSeq)464cdf0e10cSrcweir Sequence< sal_uInt16 > SAL_CALL OComponent::methodUShort(const Sequence< sal_uInt16 >& aSeq) throw( RuntimeException )
465cdf0e10cSrcweir {
466cdf0e10cSrcweir 	sal_uInt16 _x;
467cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
468cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
469cdf0e10cSrcweir 	}
470cdf0e10cSrcweir 	return aSeq;
471cdf0e10cSrcweir }
methodLong(const Sequence<sal_Int32> & aSeq)472cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL OComponent::methodLong(const Sequence< sal_Int32 >& aSeq) throw( RuntimeException)
473cdf0e10cSrcweir {
474cdf0e10cSrcweir 	sal_Int32 _x;
475cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++)  {
476cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
477cdf0e10cSrcweir 	}
478cdf0e10cSrcweir 	return aSeq;
479cdf0e10cSrcweir }
methodULong(const Sequence<sal_uInt32> & aSeq)480cdf0e10cSrcweir Sequence< sal_uInt32 > SAL_CALL OComponent::methodULong(const Sequence< sal_uInt32 >& aSeq) throw( RuntimeException)
481cdf0e10cSrcweir {
482cdf0e10cSrcweir 	sal_uInt32 _x;
483cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
484cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
485cdf0e10cSrcweir 	}
486cdf0e10cSrcweir 	return aSeq;
487cdf0e10cSrcweir }
methodString(const Sequence<OUString> & aSeq)488cdf0e10cSrcweir Sequence< OUString > SAL_CALL OComponent::methodString(const Sequence< OUString >& aSeq) throw( RuntimeException)
489cdf0e10cSrcweir {
490cdf0e10cSrcweir 	OUString _x;
491cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++) {
492cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
493cdf0e10cSrcweir 	}
494cdf0e10cSrcweir 	return aSeq;
495cdf0e10cSrcweir }
methodChar(const Sequence<sal_Unicode> & aSeq)496cdf0e10cSrcweir Sequence< sal_Unicode > SAL_CALL OComponent::methodChar(const Sequence< sal_Unicode >& aSeq) throw( RuntimeException)
497cdf0e10cSrcweir {
498cdf0e10cSrcweir 	sal_Unicode _x;
499cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
500cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
501cdf0e10cSrcweir 	}
502cdf0e10cSrcweir 	return aSeq;
503cdf0e10cSrcweir }
methodAny(const Sequence<Any> & aSeq)504cdf0e10cSrcweir Sequence< Any > SAL_CALL OComponent::methodAny(const Sequence< Any >& aSeq) throw( RuntimeException)
505cdf0e10cSrcweir {
506cdf0e10cSrcweir 	Any _x;
507cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
508cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
509cdf0e10cSrcweir 		TypeClass _t= _x.getValueTypeClass();
510cdf0e10cSrcweir 		if( _t== TypeClass_STRING)
511cdf0e10cSrcweir 			OUString s(* (rtl_uString**)_x.getValue());
512cdf0e10cSrcweir 	}
513cdf0e10cSrcweir 	return aSeq;
514cdf0e10cSrcweir 
515cdf0e10cSrcweir }
516cdf0e10cSrcweir 
methodType(const Sequence<Type> & aSeq)517cdf0e10cSrcweir Sequence< Type > SAL_CALL OComponent::methodType(const Sequence< Type >& aSeq) throw( RuntimeException )
518cdf0e10cSrcweir {
519cdf0e10cSrcweir 	Type _x;
520cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
521cdf0e10cSrcweir 		_x= aSeq.getConstArray()[i];
522cdf0e10cSrcweir 	}
523cdf0e10cSrcweir     return aSeq;
524cdf0e10cSrcweir }
525cdf0e10cSrcweir //Sequence< Reference< XInterface> > SAL_CALL methodXInterface ( const Sequence< Reference < XInterface> >& aSeq)
526cdf0e10cSrcweir //	throw (RuntimeException)
methodXInterface(const Sequence<Reference<XInterface>> & aSeq)527cdf0e10cSrcweir Sequence< Reference< XInterface > > SAL_CALL OComponent::methodXInterface( const Sequence< Reference< XInterface > >& aSeq ) throw(RuntimeException)
528cdf0e10cSrcweir {
529cdf0e10cSrcweir     for( sal_Int32 i= 0; i < aSeq.getLength(); i++)
530cdf0e10cSrcweir     {
531cdf0e10cSrcweir         Reference<XInterface> xInt= aSeq[i];
532cdf0e10cSrcweir         Reference<XEventListener> xList( xInt, UNO_QUERY);
533cdf0e10cSrcweir         if( xList.is())
534cdf0e10cSrcweir             xList->disposing( EventObject());
535cdf0e10cSrcweir     }
536cdf0e10cSrcweir 	return aSeq;
537cdf0e10cSrcweir }
538cdf0e10cSrcweir 
methodSequence(const Sequence<Sequence<sal_Int32>> & aSeq)539cdf0e10cSrcweir Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::methodSequence(const Sequence< Sequence< sal_Int32 > >& aSeq) throw( RuntimeException)
540cdf0e10cSrcweir {
541cdf0e10cSrcweir 	sal_Int32 value;
542cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
543cdf0e10cSrcweir 		const Sequence<sal_Int32>& rseq2= aSeq.getConstArray()[i];
544cdf0e10cSrcweir 		for (sal_Int16 j= 0; j < rseq2.getLength(); j++){
545cdf0e10cSrcweir 			value= rseq2.getConstArray()[j];
546cdf0e10cSrcweir 		}
547cdf0e10cSrcweir 	}
548cdf0e10cSrcweir 	return aSeq;
549cdf0e10cSrcweir }
methodSequence2(const Sequence<Sequence<Sequence<sal_Int32>>> & aSeq)550cdf0e10cSrcweir Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::methodSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& aSeq)
551cdf0e10cSrcweir 	throw( RuntimeException )
552cdf0e10cSrcweir {
553cdf0e10cSrcweir 	sal_Int32 value;
554cdf0e10cSrcweir 	sal_Int32 len= aSeq.getLength();
555cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < aSeq.getLength(); i++){
556cdf0e10cSrcweir 		const Sequence< Sequence<sal_Int32> >& rseq2= aSeq.getConstArray()[i];
557cdf0e10cSrcweir 		len= rseq2.getLength();
558cdf0e10cSrcweir 
559cdf0e10cSrcweir 		for (sal_Int16 j= 0; j < rseq2.getLength(); j++){
560cdf0e10cSrcweir 			const Sequence<sal_Int32> & rseq3= rseq2.getConstArray()[j];
561cdf0e10cSrcweir 			len= rseq3.getLength();
562cdf0e10cSrcweir 
563cdf0e10cSrcweir 			for (sal_Int16 k= 0; k < rseq3.getLength(); k++)
564cdf0e10cSrcweir 				value= rseq3.getConstArray()[k];
565cdf0e10cSrcweir 		}
566cdf0e10cSrcweir 	}
567cdf0e10cSrcweir 	return aSeq;
568cdf0e10cSrcweir }
569cdf0e10cSrcweir 
methodXEventListeners(const Sequence<Reference<XEventListener>> & aSeq)570cdf0e10cSrcweir Sequence< Reference< XEventListener> > SAL_CALL OComponent::methodXEventListeners( const Sequence< Reference <XEventListener> >& aSeq) throw( RuntimeException)
571cdf0e10cSrcweir {
572cdf0e10cSrcweir     Reference<XEventListener> listener;
573cdf0e10cSrcweir     for( int i= 0; i < aSeq.getLength(); i++)
574cdf0e10cSrcweir     {
575cdf0e10cSrcweir         listener= aSeq[i];
576cdf0e10cSrcweir 
577cdf0e10cSrcweir         listener->disposing( EventObject() );
578cdf0e10cSrcweir     }
579cdf0e10cSrcweir 
580cdf0e10cSrcweir     return aSeq;
581cdf0e10cSrcweir }
582cdf0e10cSrcweir 
methodXEventListenersMul(const Sequence<Sequence<Reference<XEventListener>>> & aSeq)583cdf0e10cSrcweir Sequence< Sequence<Reference<XEventListener > > > SAL_CALL OComponent::methodXEventListenersMul( const Sequence<Sequence<Reference<XEventListener > > >& aSeq ) throw (RuntimeException)
584cdf0e10cSrcweir {
585cdf0e10cSrcweir     Reference<XEventListener> listener;
586cdf0e10cSrcweir     for( int i= 0; i < aSeq.getLength(); i++)
587cdf0e10cSrcweir     {
588cdf0e10cSrcweir         Sequence<Reference<XEventListener> > seqInner= aSeq[i];
589cdf0e10cSrcweir         for( int j= 0; j < seqInner.getLength(); j++)
590cdf0e10cSrcweir         {
591cdf0e10cSrcweir             listener= seqInner[j];
592cdf0e10cSrcweir             listener->disposing( EventObject() );
593cdf0e10cSrcweir         }
594cdf0e10cSrcweir     }
595cdf0e10cSrcweir     return aSeq;
596cdf0e10cSrcweir }
597cdf0e10cSrcweir 
598cdf0e10cSrcweir //---------------------------------------------------------------------------------------------
599cdf0e10cSrcweir 
getAttrByte(void)600cdf0e10cSrcweir Sequence< sal_Int8 > SAL_CALL OComponent::getAttrByte(void) throw( RuntimeException)
601cdf0e10cSrcweir {
602cdf0e10cSrcweir 	return m_seqByte;
603cdf0e10cSrcweir }
setAttrByte(const Sequence<sal_Int8> & AttrByte_)604cdf0e10cSrcweir void SAL_CALL OComponent::setAttrByte(const Sequence< sal_Int8 >& AttrByte_) throw( RuntimeException )
605cdf0e10cSrcweir {
606cdf0e10cSrcweir 	m_seqByte= AttrByte_;
607cdf0e10cSrcweir }
getAttrFloat(void)608cdf0e10cSrcweir Sequence< float > SAL_CALL OComponent::getAttrFloat(void)  throw( RuntimeException )
609cdf0e10cSrcweir {
610cdf0e10cSrcweir 	return m_seqFloat;
611cdf0e10cSrcweir }
setAttrFloat(const Sequence<float> & AttrFloat_)612cdf0e10cSrcweir void SAL_CALL OComponent::setAttrFloat(const Sequence< float >& AttrFloat_) throw( RuntimeException )
613cdf0e10cSrcweir {
614cdf0e10cSrcweir 	m_seqFloat= AttrFloat_;
615cdf0e10cSrcweir }
616cdf0e10cSrcweir 
getAttrDouble(void)617cdf0e10cSrcweir Sequence< double > SAL_CALL OComponent::getAttrDouble(void)  throw( RuntimeException )
618cdf0e10cSrcweir {
619cdf0e10cSrcweir 	return m_seqDouble;
620cdf0e10cSrcweir }
setAttrDouble(const Sequence<double> & AttrDouble_)621cdf0e10cSrcweir void SAL_CALL OComponent::setAttrDouble(const Sequence< double >& AttrDouble_) throw( RuntimeException )
622cdf0e10cSrcweir {
623cdf0e10cSrcweir 	m_seqDouble= AttrDouble_;
624cdf0e10cSrcweir }
625cdf0e10cSrcweir 
getAttrBool(void)626cdf0e10cSrcweir Sequence< sal_Bool > SAL_CALL OComponent::getAttrBool(void)  throw( RuntimeException)
627cdf0e10cSrcweir {
628cdf0e10cSrcweir 	return m_seqBool;
629cdf0e10cSrcweir }
630cdf0e10cSrcweir 
setAttrBool(const Sequence<sal_Bool> & AttrBool_)631cdf0e10cSrcweir void SAL_CALL OComponent::setAttrBool(const Sequence< sal_Bool >& AttrBool_) throw (RuntimeException )
632cdf0e10cSrcweir {
633cdf0e10cSrcweir 	m_seqBool= AttrBool_;
634cdf0e10cSrcweir }
635cdf0e10cSrcweir 
getAttrShort(void)636cdf0e10cSrcweir Sequence< sal_Int16 > SAL_CALL OComponent::getAttrShort(void)  throw( RuntimeException)
637cdf0e10cSrcweir {
638cdf0e10cSrcweir 	return m_seqShort;
639cdf0e10cSrcweir }
setAttrShort(const Sequence<sal_Int16> & AttrShort_)640cdf0e10cSrcweir void SAL_CALL OComponent::setAttrShort(const Sequence< sal_Int16 >& AttrShort_) throw( RuntimeException )
641cdf0e10cSrcweir {
642cdf0e10cSrcweir 	m_seqShort= AttrShort_;
643cdf0e10cSrcweir }
644cdf0e10cSrcweir 
getAttrUShort(void)645cdf0e10cSrcweir Sequence< sal_uInt16 > SAL_CALL OComponent::getAttrUShort(void) throw( RuntimeException )
646cdf0e10cSrcweir {
647cdf0e10cSrcweir 	return m_seqUShort;
648cdf0e10cSrcweir }
setAttrUShort(const Sequence<sal_uInt16> & AttrUShort_)649cdf0e10cSrcweir void SAL_CALL OComponent::setAttrUShort(const Sequence< sal_uInt16 >& AttrUShort_) throw( RuntimeException )
650cdf0e10cSrcweir {
651cdf0e10cSrcweir 	m_seqUShort= AttrUShort_;
652cdf0e10cSrcweir }
653cdf0e10cSrcweir 
getAttrLong(void)654cdf0e10cSrcweir Sequence< sal_Int32 > SAL_CALL OComponent::getAttrLong(void)  throw( RuntimeException)
655cdf0e10cSrcweir {
656cdf0e10cSrcweir 	return m_seqLong;
657cdf0e10cSrcweir }
setAttrLong(const Sequence<sal_Int32> & AttrLong_)658cdf0e10cSrcweir void SAL_CALL OComponent::setAttrLong(const Sequence< sal_Int32 >& AttrLong_) throw( RuntimeException )
659cdf0e10cSrcweir {
660cdf0e10cSrcweir 	m_seqLong= AttrLong_;
661cdf0e10cSrcweir }
662cdf0e10cSrcweir 
getAttrULong(void)663cdf0e10cSrcweir Sequence< sal_uInt32 > SAL_CALL OComponent::getAttrULong(void)  throw( RuntimeException )
664cdf0e10cSrcweir {
665cdf0e10cSrcweir 	return m_seqULong;
666cdf0e10cSrcweir }
setAttrULong(const Sequence<sal_uInt32> & AttrULong_)667cdf0e10cSrcweir void SAL_CALL OComponent::setAttrULong(const Sequence< sal_uInt32 >& AttrULong_) throw( RuntimeException )
668cdf0e10cSrcweir {
669cdf0e10cSrcweir 	m_seqULong= AttrULong_;
670cdf0e10cSrcweir }
671cdf0e10cSrcweir 
getAttrString(void)672cdf0e10cSrcweir Sequence< OUString > SAL_CALL OComponent::getAttrString(void)  throw( RuntimeException )
673cdf0e10cSrcweir {
674cdf0e10cSrcweir 	return m_seqString;
675cdf0e10cSrcweir }
setAttrString(const Sequence<OUString> & AttrString_)676cdf0e10cSrcweir void SAL_CALL OComponent::setAttrString(const Sequence< OUString >& AttrString_) throw( RuntimeException )
677cdf0e10cSrcweir {
678cdf0e10cSrcweir 	m_seqString= AttrString_;
679cdf0e10cSrcweir }
680cdf0e10cSrcweir 
getAttrChar(void)681cdf0e10cSrcweir Sequence< sal_Unicode > SAL_CALL OComponent::getAttrChar(void)  throw( RuntimeException )
682cdf0e10cSrcweir {
683cdf0e10cSrcweir 	return m_seqChar;
684cdf0e10cSrcweir }
setAttrChar(const Sequence<sal_Unicode> & AttrChar_)685cdf0e10cSrcweir void SAL_CALL OComponent::setAttrChar(const Sequence< sal_Unicode >& AttrChar_) throw( RuntimeException)
686cdf0e10cSrcweir {
687cdf0e10cSrcweir 	m_seqChar= AttrChar_;
688cdf0e10cSrcweir }
689cdf0e10cSrcweir 
getAttrAny(void)690cdf0e10cSrcweir Sequence< Any > SAL_CALL OComponent::getAttrAny(void) throw( RuntimeException)
691cdf0e10cSrcweir {
692cdf0e10cSrcweir 	return m_seqAny;
693cdf0e10cSrcweir }
setAttrAny(const Sequence<Any> & AttrAny_)694cdf0e10cSrcweir void SAL_CALL OComponent::setAttrAny(const Sequence< Any >& AttrAny_) throw( RuntimeException )
695cdf0e10cSrcweir {
696cdf0e10cSrcweir 	m_seqAny= AttrAny_;
697cdf0e10cSrcweir }
698cdf0e10cSrcweir 
getAttrType(void)699cdf0e10cSrcweir Sequence< Type > SAL_CALL OComponent::getAttrType(void)  throw( RuntimeException )
700cdf0e10cSrcweir {
701cdf0e10cSrcweir     return m_seqType;
702cdf0e10cSrcweir }
703cdf0e10cSrcweir 
setAttrType(const Sequence<Type> & AttrType_)704cdf0e10cSrcweir void SAL_CALL OComponent::setAttrType( const Sequence< Type >& AttrType_) throw( RuntimeException )
705cdf0e10cSrcweir {
706cdf0e10cSrcweir     m_seqType = AttrType_;
707cdf0e10cSrcweir }
708cdf0e10cSrcweir 
709cdf0e10cSrcweir 
getAttrSequence(void)710cdf0e10cSrcweir Sequence< Sequence< sal_Int32 > > SAL_CALL OComponent::getAttrSequence(void)  throw( RuntimeException)
711cdf0e10cSrcweir {
712cdf0e10cSrcweir 	return m_seq1;
713cdf0e10cSrcweir }
setAttrSequence(const Sequence<Sequence<sal_Int32>> & AttrSequence)714cdf0e10cSrcweir void SAL_CALL OComponent::setAttrSequence(const Sequence< Sequence< sal_Int32 > >& AttrSequence) throw(RuntimeException )
715cdf0e10cSrcweir {
716cdf0e10cSrcweir 	sal_Int32 x= 0;
717cdf0e10cSrcweir 	for( sal_Int32 i=0; i < AttrSequence.getLength(); i++)
718cdf0e10cSrcweir 	{
719cdf0e10cSrcweir 		 Sequence< sal_Int32 > seq= AttrSequence[i];
720cdf0e10cSrcweir 
721cdf0e10cSrcweir 		for ( sal_Int32 j=0; j < seq.getLength(); j++)
722cdf0e10cSrcweir 		{
723cdf0e10cSrcweir 			x= seq[j];
724cdf0e10cSrcweir 		}
725cdf0e10cSrcweir 	}
726cdf0e10cSrcweir 
727cdf0e10cSrcweir 	m_seq1= AttrSequence;
728cdf0e10cSrcweir }
729cdf0e10cSrcweir 
getAttrSequence2(void)730cdf0e10cSrcweir Sequence< Sequence< Sequence< sal_Int32 > > > SAL_CALL OComponent::getAttrSequence2(void)  throw( RuntimeException )
731cdf0e10cSrcweir {
732cdf0e10cSrcweir 	return m_seq2;
733cdf0e10cSrcweir }
setAttrSequence2(const Sequence<Sequence<Sequence<sal_Int32>>> & AttrSequence2_)734cdf0e10cSrcweir void SAL_CALL OComponent::setAttrSequence2(const Sequence< Sequence< Sequence< sal_Int32 > > >& AttrSequence2_)
735cdf0e10cSrcweir 	throw( RuntimeException )
736cdf0e10cSrcweir {
737cdf0e10cSrcweir 	m_seq2= AttrSequence2_;
738cdf0e10cSrcweir }
739cdf0e10cSrcweir 
getAttrXInterface()740cdf0e10cSrcweir Sequence< Reference< XInterface > > SAL_CALL OComponent::getAttrXInterface() throw(RuntimeException)
741cdf0e10cSrcweir {
742cdf0e10cSrcweir 	return m_seqxInterface;
743cdf0e10cSrcweir }
setAttrXInterface(const Sequence<Reference<XInterface>> & _attrxinterface)744cdf0e10cSrcweir void SAL_CALL OComponent::setAttrXInterface( const Sequence< Reference< XInterface > >& _attrxinterface ) throw(RuntimeException)
745cdf0e10cSrcweir {
746cdf0e10cSrcweir 	m_seqxInterface= _attrxinterface;
747cdf0e10cSrcweir }
748cdf0e10cSrcweir 
749cdf0e10cSrcweir // ----------------------------------------------------------------------------
750cdf0e10cSrcweir 
getAByte()751cdf0e10cSrcweir ::sal_Int8 SAL_CALL OComponent::getAByte() throw (RuntimeException)
752cdf0e10cSrcweir {
753cdf0e10cSrcweir     return m_attr_int8;
754cdf0e10cSrcweir }
755cdf0e10cSrcweir 
setAByte(::sal_Int8 _abyte)756cdf0e10cSrcweir void SAL_CALL OComponent::setAByte( ::sal_Int8 _abyte ) throw (RuntimeException)
757cdf0e10cSrcweir {
758cdf0e10cSrcweir     m_attr_int8 = _abyte;
759cdf0e10cSrcweir }
760cdf0e10cSrcweir 
getAFloat()761cdf0e10cSrcweir float SAL_CALL OComponent::getAFloat() throw (RuntimeException)
762cdf0e10cSrcweir {
763cdf0e10cSrcweir     return m_attr_float;
764cdf0e10cSrcweir }
765cdf0e10cSrcweir 
setAFloat(float _afloat)766cdf0e10cSrcweir void SAL_CALL OComponent::setAFloat( float _afloat ) throw (RuntimeException)
767cdf0e10cSrcweir {
768cdf0e10cSrcweir     m_attr_float = _afloat;
769cdf0e10cSrcweir }
770cdf0e10cSrcweir 
getADouble()771cdf0e10cSrcweir double SAL_CALL OComponent::getADouble() throw (RuntimeException)
772cdf0e10cSrcweir {
773cdf0e10cSrcweir     return m_attr_double;
774cdf0e10cSrcweir }
775cdf0e10cSrcweir 
setADouble(double _adouble)776cdf0e10cSrcweir void SAL_CALL OComponent::setADouble( double _adouble ) throw (RuntimeException)
777cdf0e10cSrcweir {
778cdf0e10cSrcweir     m_attr_double = _adouble;
779cdf0e10cSrcweir }
780cdf0e10cSrcweir 
getABool()781cdf0e10cSrcweir ::sal_Bool SAL_CALL OComponent::getABool() throw (RuntimeException)
782cdf0e10cSrcweir {
783cdf0e10cSrcweir     return m_attr_bool;
784cdf0e10cSrcweir }
785cdf0e10cSrcweir 
setABool(::sal_Bool _abool)786cdf0e10cSrcweir void SAL_CALL OComponent::setABool( ::sal_Bool _abool ) throw (RuntimeException)
787cdf0e10cSrcweir {
788cdf0e10cSrcweir     m_attr_bool = _abool;
789cdf0e10cSrcweir }
790cdf0e10cSrcweir 
getAShort()791cdf0e10cSrcweir ::sal_Int16 SAL_CALL OComponent::getAShort() throw (RuntimeException)
792cdf0e10cSrcweir {
793cdf0e10cSrcweir     return m_attr_int16;
794cdf0e10cSrcweir }
795cdf0e10cSrcweir 
setAShort(::sal_Int16 _ashort)796cdf0e10cSrcweir void SAL_CALL OComponent::setAShort( ::sal_Int16 _ashort ) throw (RuntimeException)
797cdf0e10cSrcweir {
798cdf0e10cSrcweir     m_attr_int16 = _ashort;
799cdf0e10cSrcweir }
800cdf0e10cSrcweir 
getAUShort()801cdf0e10cSrcweir ::sal_uInt16 SAL_CALL OComponent::getAUShort() throw (RuntimeException)
802cdf0e10cSrcweir {
803cdf0e10cSrcweir     return m_attr_uint16;
804cdf0e10cSrcweir }
805cdf0e10cSrcweir 
setAUShort(::sal_uInt16 _aushort)806cdf0e10cSrcweir void SAL_CALL OComponent::setAUShort( ::sal_uInt16 _aushort ) throw (RuntimeException)
807cdf0e10cSrcweir {
808cdf0e10cSrcweir     m_attr_uint16 = _aushort;
809cdf0e10cSrcweir }
810cdf0e10cSrcweir 
getALong()811cdf0e10cSrcweir ::sal_Int32 SAL_CALL OComponent::getALong() throw (RuntimeException)
812cdf0e10cSrcweir {
813cdf0e10cSrcweir     return m_attr_int32;
814cdf0e10cSrcweir }
815cdf0e10cSrcweir 
setALong(::sal_Int32 _along)816cdf0e10cSrcweir void SAL_CALL OComponent::setALong( ::sal_Int32 _along ) throw (RuntimeException)
817cdf0e10cSrcweir {
818cdf0e10cSrcweir     m_attr_int32 = _along;
819cdf0e10cSrcweir }
820cdf0e10cSrcweir 
getAULong()821cdf0e10cSrcweir ::sal_uInt32 SAL_CALL OComponent::getAULong() throw (RuntimeException)
822cdf0e10cSrcweir {
823cdf0e10cSrcweir     return m_attr_uint32;;
824cdf0e10cSrcweir }
825cdf0e10cSrcweir 
setAULong(::sal_uInt32 _aulong)826cdf0e10cSrcweir void SAL_CALL OComponent::setAULong( ::sal_uInt32 _aulong ) throw (RuntimeException)
827cdf0e10cSrcweir {
828cdf0e10cSrcweir     m_attr_uint32 = _aulong;
829cdf0e10cSrcweir }
830cdf0e10cSrcweir 
getAString()831cdf0e10cSrcweir ::rtl::OUString SAL_CALL OComponent::getAString() throw (RuntimeException)
832cdf0e10cSrcweir {
833cdf0e10cSrcweir     return m_attr_string;
834cdf0e10cSrcweir }
835cdf0e10cSrcweir 
setAString(const::rtl::OUString & _astring)836cdf0e10cSrcweir void SAL_CALL OComponent::setAString( const ::rtl::OUString& _astring ) throw (RuntimeException)
837cdf0e10cSrcweir {
838cdf0e10cSrcweir     m_attr_string = _astring;
839cdf0e10cSrcweir }
840cdf0e10cSrcweir 
getAChar()841cdf0e10cSrcweir ::sal_Unicode SAL_CALL OComponent::getAChar() throw (RuntimeException)
842cdf0e10cSrcweir {
843cdf0e10cSrcweir     return m_attr_char;
844cdf0e10cSrcweir }
845cdf0e10cSrcweir 
setAChar(::sal_Unicode _achar)846cdf0e10cSrcweir void SAL_CALL OComponent::setAChar( ::sal_Unicode _achar ) throw (RuntimeException)
847cdf0e10cSrcweir {
848cdf0e10cSrcweir     m_attr_char = _achar;
849cdf0e10cSrcweir }
850cdf0e10cSrcweir 
getAAny()851cdf0e10cSrcweir Any SAL_CALL OComponent::getAAny() throw (RuntimeException)
852cdf0e10cSrcweir {
853cdf0e10cSrcweir     return m_attr_any;
854cdf0e10cSrcweir }
855cdf0e10cSrcweir 
setAAny(const Any & _aany)856cdf0e10cSrcweir void SAL_CALL OComponent::setAAny( const Any& _aany ) throw (RuntimeException)
857cdf0e10cSrcweir {
858cdf0e10cSrcweir     m_attr_any = _aany;
859cdf0e10cSrcweir }
860cdf0e10cSrcweir 
getAType()861cdf0e10cSrcweir Type SAL_CALL OComponent::getAType() throw (RuntimeException)
862cdf0e10cSrcweir {
863cdf0e10cSrcweir     return m_attr_type;
864cdf0e10cSrcweir }
865cdf0e10cSrcweir 
setAType(const Type & _atype)866cdf0e10cSrcweir void SAL_CALL OComponent::setAType( const Type& _atype ) throw (RuntimeException)
867cdf0e10cSrcweir {
868cdf0e10cSrcweir     m_attr_type = _atype;
869cdf0e10cSrcweir }
870cdf0e10cSrcweir 
getAXInterface()871cdf0e10cSrcweir Reference< XInterface > SAL_CALL OComponent::getAXInterface() throw (RuntimeException)
872cdf0e10cSrcweir {
873cdf0e10cSrcweir     return m_attr_xinterface;
874cdf0e10cSrcweir }
875cdf0e10cSrcweir 
setAXInterface(const Reference<XInterface> & _axinterface)876cdf0e10cSrcweir void SAL_CALL OComponent::setAXInterface( const Reference<XInterface >& _axinterface ) throw (RuntimeException)
877cdf0e10cSrcweir {
878cdf0e10cSrcweir     m_attr_xinterface = _axinterface;
879cdf0e10cSrcweir }
880cdf0e10cSrcweir 
getAXInvocation()881cdf0e10cSrcweir Reference<XInvocation > SAL_CALL OComponent::getAXInvocation() throw (RuntimeException)
882cdf0e10cSrcweir {
883cdf0e10cSrcweir     return m_attr_xinvocation;
884cdf0e10cSrcweir }
885cdf0e10cSrcweir 
setAXInvocation(const Reference<XInvocation> & _axinvocation)886cdf0e10cSrcweir void SAL_CALL OComponent::setAXInvocation( const Reference< XInvocation >& _axinvocation ) throw (RuntimeException)
887cdf0e10cSrcweir {
888cdf0e10cSrcweir     m_attr_xinvocation = _axinvocation;
889cdf0e10cSrcweir }
890cdf0e10cSrcweir //-----------------------------------------------------------------------------------
testout_methodByte(sal_Int8 & rOut)891cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodByte(sal_Int8& rOut) throw( RuntimeException )
892cdf0e10cSrcweir {
893cdf0e10cSrcweir 	rOut= m_int8;
894cdf0e10cSrcweir }
testout_methodFloat(float & rOut)895cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodFloat(float& rOut) throw( RuntimeException )
896cdf0e10cSrcweir {
897cdf0e10cSrcweir 	rOut= m_float;
898cdf0e10cSrcweir }
testout_methodDouble(double & rOut)899cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodDouble(double& rOut) throw( RuntimeException )
900cdf0e10cSrcweir {
901cdf0e10cSrcweir 	rOut= m_double;
902cdf0e10cSrcweir }
903cdf0e10cSrcweir 
testout_methodBool(sal_Bool & rOut)904cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodBool(sal_Bool& rOut) throw( RuntimeException )
905cdf0e10cSrcweir {
906cdf0e10cSrcweir 	rOut= m_bool;
907cdf0e10cSrcweir }
testout_methodShort(sal_Int16 & rOut)908cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodShort(sal_Int16& rOut) throw( RuntimeException )
909cdf0e10cSrcweir {
910cdf0e10cSrcweir 	rOut= m_int16;
911cdf0e10cSrcweir }
testout_methodUShort(sal_uInt16 & rOut)912cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodUShort(sal_uInt16& rOut) throw( RuntimeException )
913cdf0e10cSrcweir {
914cdf0e10cSrcweir 	rOut= m_uint16;
915cdf0e10cSrcweir }
testout_methodLong(sal_Int32 & rOut)916cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodLong(sal_Int32& rOut) throw( RuntimeException )
917cdf0e10cSrcweir {
918cdf0e10cSrcweir 	rOut = m_int32;
919cdf0e10cSrcweir }
testout_methodULong(sal_uInt32 & rOut)920cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodULong(sal_uInt32& rOut) throw( RuntimeException )
921cdf0e10cSrcweir {
922cdf0e10cSrcweir 	rOut= m_uint32;
923cdf0e10cSrcweir }
testout_methodHyper(sal_Int64 & rOut)924cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodHyper(sal_Int64& rOut) throw( RuntimeException )
925cdf0e10cSrcweir {
926cdf0e10cSrcweir     rOut = m_int64;
927cdf0e10cSrcweir }
928cdf0e10cSrcweir 
testout_methodUHyper(sal_uInt64 & rOut)929cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodUHyper(sal_uInt64& rOut) throw( RuntimeException )
930cdf0e10cSrcweir {
931cdf0e10cSrcweir     rOut = m_uint64;
932cdf0e10cSrcweir }
933cdf0e10cSrcweir 
testout_methodString(OUString & rOut)934cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodString(OUString& rOut) throw( RuntimeException )
935cdf0e10cSrcweir {
936cdf0e10cSrcweir 	rOut= m_string;
937cdf0e10cSrcweir }
testout_methodChar(sal_Unicode & rOut)938cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodChar(sal_Unicode& rOut) throw( RuntimeException )
939cdf0e10cSrcweir {
940cdf0e10cSrcweir 	rOut= m_char;
941cdf0e10cSrcweir }
testout_methodAny(Any & rOut)942cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodAny(Any& rOut) throw( RuntimeException)
943cdf0e10cSrcweir {
944cdf0e10cSrcweir 	rOut = m_any;
945cdf0e10cSrcweir }
946cdf0e10cSrcweir 
testout_methodType(Type & rOut)947cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodType(Type& rOut) throw( RuntimeException )
948cdf0e10cSrcweir {
949cdf0e10cSrcweir     rOut = m_type;
950cdf0e10cSrcweir }
951cdf0e10cSrcweir 
testout_methodSequence(Sequence<sal_Int32> & rOut)952cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException)
953cdf0e10cSrcweir {
954cdf0e10cSrcweir 	rOut.realloc(10);
955cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < rOut.getLength(); i++) rOut.getArray()[i]= i;
956cdf0e10cSrcweir }
testout_methodSequence2(Sequence<Sequence<sal_Int32>> & rOut)957cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException )
958cdf0e10cSrcweir {
959cdf0e10cSrcweir 	rOut.realloc( 10);
960cdf0e10cSrcweir 	for( sal_Int16 i= 0; i < rOut.getLength(); i++){
961cdf0e10cSrcweir 		Sequence<sal_Int32>& rseq2= rOut.getArray()[i];
962cdf0e10cSrcweir 		rseq2.realloc( 10);
963cdf0e10cSrcweir 		for (sal_Int16 j= 0; j < rseq2.getLength(); j++){
964cdf0e10cSrcweir 			rseq2.getArray()[j]= j;
965cdf0e10cSrcweir 		}
966cdf0e10cSrcweir 	}
967cdf0e10cSrcweir }
testout_methodMulParams1(sal_Int32 & rout1,sal_Int32 & rout2)968cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException )
969cdf0e10cSrcweir {
970cdf0e10cSrcweir 	rout1= 999;
971cdf0e10cSrcweir 	rout2= 1111;
972cdf0e10cSrcweir }
testout_methodMulParams2(sal_Int32 & rout1,sal_Int32 & rout2,OUString & rout3)973cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException )
974cdf0e10cSrcweir {
975cdf0e10cSrcweir 	rout1= 1111;
976cdf0e10cSrcweir 	rout2= 1222;
977cdf0e10cSrcweir 	rout3= L" another string";
978cdf0e10cSrcweir }
testout_methodMulParams3(const OUString &,OUString & sout)979cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodMulParams3(const OUString&, OUString& sout) throw( RuntimeException )
980cdf0e10cSrcweir {
981cdf0e10cSrcweir 	sout= L"Out Hallo!";
982cdf0e10cSrcweir }
testout_methodMulParams4(float in1,float & out1,sal_Int32 in2,sal_Int32 & out2,sal_Int32)983cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodMulParams4( float in1, float& out1, sal_Int32 in2, sal_Int32& out2, sal_Int32 ) throw(RuntimeException)
984cdf0e10cSrcweir {
985cdf0e10cSrcweir 	out1= in1 + 1;
986cdf0e10cSrcweir 	out2= in2 + 1;
987cdf0e10cSrcweir }
988cdf0e10cSrcweir 
testout_methodXInterface(Reference<XInterface> & rOut)989cdf0e10cSrcweir void SAL_CALL OComponent::testout_methodXInterface( Reference< XInterface >& rOut ) throw(RuntimeException)
990cdf0e10cSrcweir {
991cdf0e10cSrcweir     rOut = m_xinterface;
992cdf0e10cSrcweir // 	OUString string( L"Property Any");
993cdf0e10cSrcweir // 	m_any <<= string;
994cdf0e10cSrcweir // 	rOut=  Reference<XInterface> (static_cast<XTestSequence*>(this), UNO_QUERY);
995cdf0e10cSrcweir }
996cdf0e10cSrcweir 
997cdf0e10cSrcweir // XTestInParameters ------------------------------------------------------------
in_methodByte(sal_Int8 rIn)998cdf0e10cSrcweir sal_Int8 SAL_CALL OComponent::in_methodByte( sal_Int8 rIn ) throw (RuntimeException)
999cdf0e10cSrcweir {
1000cdf0e10cSrcweir     m_int8 = rIn;
1001cdf0e10cSrcweir 	return rIn;
1002cdf0e10cSrcweir }
in_methodFloat(float rIn)1003cdf0e10cSrcweir float SAL_CALL OComponent::in_methodFloat( float rIn ) throw (RuntimeException)
1004cdf0e10cSrcweir {
1005cdf0e10cSrcweir     m_float = rIn;
1006cdf0e10cSrcweir 	return rIn;
1007cdf0e10cSrcweir }
in_methodDouble(double rIn)1008cdf0e10cSrcweir double SAL_CALL OComponent::in_methodDouble( double rIn ) throw (RuntimeException)
1009cdf0e10cSrcweir {
1010cdf0e10cSrcweir     m_double = rIn;
1011cdf0e10cSrcweir 	return rIn;
1012cdf0e10cSrcweir }
in_methodBool(sal_Bool rIn)1013cdf0e10cSrcweir sal_Bool SAL_CALL OComponent::in_methodBool( sal_Bool rIn ) throw (RuntimeException)
1014cdf0e10cSrcweir {
1015cdf0e10cSrcweir     m_bool = rIn;
1016cdf0e10cSrcweir 	return rIn;
1017cdf0e10cSrcweir }
in_methodShort(sal_Int16 rIn)1018cdf0e10cSrcweir sal_Int16 SAL_CALL OComponent::in_methodShort( sal_Int16 rIn ) throw (RuntimeException)
1019cdf0e10cSrcweir {
1020cdf0e10cSrcweir     m_int16 = rIn;
1021cdf0e10cSrcweir 	return rIn;
1022cdf0e10cSrcweir }
in_methodUShort(sal_uInt16 rIn)1023cdf0e10cSrcweir sal_uInt16 SAL_CALL OComponent::in_methodUShort( sal_uInt16 rIn ) throw (RuntimeException)
1024cdf0e10cSrcweir {
1025cdf0e10cSrcweir     m_uint16 = rIn;
1026cdf0e10cSrcweir 	return rIn;
1027cdf0e10cSrcweir }
in_methodLong(sal_Int32 rIn)1028cdf0e10cSrcweir sal_Int32 SAL_CALL OComponent::in_methodLong( sal_Int32 rIn ) throw (RuntimeException)
1029cdf0e10cSrcweir {
1030cdf0e10cSrcweir     m_int32 = rIn;
1031cdf0e10cSrcweir 	return rIn;
1032cdf0e10cSrcweir }
in_methodULong(sal_uInt32 rIn)1033cdf0e10cSrcweir sal_uInt32 SAL_CALL OComponent::in_methodULong( sal_uInt32 rIn ) throw (RuntimeException)
1034cdf0e10cSrcweir {
1035cdf0e10cSrcweir     m_uint32 = rIn;
1036cdf0e10cSrcweir 	return rIn;
1037cdf0e10cSrcweir }
in_methodHyper(sal_Int64 rIn)1038cdf0e10cSrcweir sal_Int64 SAL_CALL OComponent::in_methodHyper( sal_Int64 rIn ) throw (RuntimeException)
1039cdf0e10cSrcweir {
1040cdf0e10cSrcweir     m_int64 = rIn;
1041cdf0e10cSrcweir     return rIn;
1042cdf0e10cSrcweir }
1043cdf0e10cSrcweir 
in_methodUHyper(sal_uInt64 rIn)1044cdf0e10cSrcweir sal_uInt64 SAL_CALL OComponent::in_methodUHyper( sal_uInt64 rIn ) throw (RuntimeException)
1045cdf0e10cSrcweir {
1046cdf0e10cSrcweir     m_uint64 = rIn;
1047cdf0e10cSrcweir     return rIn;
1048cdf0e10cSrcweir }
1049cdf0e10cSrcweir 
in_methodString(const OUString & rIn)1050cdf0e10cSrcweir OUString SAL_CALL OComponent::in_methodString( const OUString& rIn ) throw (RuntimeException)
1051cdf0e10cSrcweir {
1052cdf0e10cSrcweir     m_string = rIn;
1053cdf0e10cSrcweir 	return rIn;
1054cdf0e10cSrcweir }
in_methodChar(sal_Unicode rIn)1055cdf0e10cSrcweir sal_Unicode SAL_CALL OComponent::in_methodChar( sal_Unicode rIn ) throw (RuntimeException)
1056cdf0e10cSrcweir {
1057cdf0e10cSrcweir     m_char = rIn;
1058cdf0e10cSrcweir 	return rIn;
1059cdf0e10cSrcweir }
in_methodAny(const Any & rIn)1060cdf0e10cSrcweir Any SAL_CALL OComponent::in_methodAny( const Any& rIn ) throw (RuntimeException)
1061cdf0e10cSrcweir {
1062cdf0e10cSrcweir     m_any = rIn;
1063cdf0e10cSrcweir 	return rIn;
1064cdf0e10cSrcweir }
1065cdf0e10cSrcweir 
in_methodType(const Type & rIn)1066cdf0e10cSrcweir Type SAL_CALL OComponent::in_methodType( const Type& rIn ) throw (RuntimeException)
1067cdf0e10cSrcweir {
1068cdf0e10cSrcweir     m_type = rIn;
1069cdf0e10cSrcweir 	return rIn;
1070cdf0e10cSrcweir }
1071cdf0e10cSrcweir 
in_methodInvocation(const Reference<XInvocation> & inv)1072cdf0e10cSrcweir Reference<XInvocation > SAL_CALL OComponent::in_methodInvocation( const Reference< XInvocation >& inv )
1073cdf0e10cSrcweir 		throw (RuntimeException)
1074cdf0e10cSrcweir {
1075cdf0e10cSrcweir 	//We expect the invocation results from a conversion of VBasicEventListener.VBEventListener
1076cdf0e10cSrcweir //which implements XEventListener
1077cdf0e10cSrcweir 	// extensions/test/ole/EventListenerSample
1078cdf0e10cSrcweir 	EventObject event( Reference<XInterface>(static_cast<XTestInParameters*>(this),UNO_QUERY));
1079cdf0e10cSrcweir 	Any anyParam;
1080cdf0e10cSrcweir 	anyParam <<= event;
1081cdf0e10cSrcweir 	Sequence<Any> params( &anyParam, 1);
1082cdf0e10cSrcweir 	Sequence<sal_Int16> outIndex;
1083cdf0e10cSrcweir 	Sequence<Any> outParams;
1084cdf0e10cSrcweir 	try{
1085cdf0e10cSrcweir 	inv->invoke( OUString(RTL_CONSTASCII_USTRINGPARAM("disposing")),
1086cdf0e10cSrcweir 				params, outIndex, outParams);
1087cdf0e10cSrcweir 	}catch(IllegalArgumentException &) {
1088cdf0e10cSrcweir 	}
1089cdf0e10cSrcweir 	catch(CannotConvertException &){
1090cdf0e10cSrcweir 	}
1091cdf0e10cSrcweir 	catch(InvocationTargetException&) {
1092cdf0e10cSrcweir 	}
1093cdf0e10cSrcweir 	return inv;
1094cdf0e10cSrcweir }
in_methodXInterface(const Reference<XInterface> & rIn)1095cdf0e10cSrcweir Reference<XInterface> SAL_CALL OComponent::in_methodXInterface( const Reference<XInterface >& rIn ) throw (RuntimeException)
1096cdf0e10cSrcweir {
1097cdf0e10cSrcweir     m_xinterface = rIn;
1098cdf0e10cSrcweir     return rIn;
1099cdf0e10cSrcweir }
1100cdf0e10cSrcweir 
in_methodStruct(const SimpleStruct & aStruct)1101cdf0e10cSrcweir SimpleStruct SAL_CALL OComponent::in_methodStruct( const SimpleStruct& aStruct )
1102cdf0e10cSrcweir 		throw (RuntimeException)
1103cdf0e10cSrcweir {
1104cdf0e10cSrcweir 	SimpleStruct& s= const_cast<SimpleStruct&>(aStruct);
1105cdf0e10cSrcweir 	s.message= s.message + OUString(RTL_CONSTASCII_USTRINGPARAM(
1106cdf0e10cSrcweir 		"This string was set in OleTest"));
1107cdf0e10cSrcweir 	return aStruct;
1108cdf0e10cSrcweir }
in_methodAll(sal_Int8,float,double,sal_Bool,sal_Int16,sal_uInt16,sal_Int32,sal_uInt32,const OUString &,sal_Unicode,const Any &,const Type &,const Reference<XInvocation> &)1109cdf0e10cSrcweir void SAL_CALL OComponent::in_methodAll(
1110cdf0e10cSrcweir     sal_Int8, float, double, sal_Bool, sal_Int16, sal_uInt16,
1111cdf0e10cSrcweir     sal_Int32, sal_uInt32, const OUString&, sal_Unicode,
1112cdf0e10cSrcweir     const Any&, const Type&, const Reference<XInvocation>&) throw (RuntimeException)
1113cdf0e10cSrcweir {
1114cdf0e10cSrcweir }
1115cdf0e10cSrcweir 
1116cdf0e10cSrcweir // INOUT -----------------------------------------------------------------------------------
testinout_methodByte(sal_Int8 & rOut)1117cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodByte(sal_Int8& rOut) throw( RuntimeException )
1118cdf0e10cSrcweir {
1119cdf0e10cSrcweir     sal_Int8 tmp = rOut;
1120cdf0e10cSrcweir 	rOut = m_int8;
1121cdf0e10cSrcweir     m_int8 = tmp;
1122cdf0e10cSrcweir }
testinout_methodFloat(float & rOut)1123cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodFloat(float& rOut) throw( RuntimeException )
1124cdf0e10cSrcweir {
1125cdf0e10cSrcweir     float tmp = rOut;
1126cdf0e10cSrcweir     rOut = m_float;
1127cdf0e10cSrcweir     m_float = tmp;
1128cdf0e10cSrcweir }
1129cdf0e10cSrcweir 
testinout_methodDouble(double & rOut)1130cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodDouble(double& rOut) throw( RuntimeException )
1131cdf0e10cSrcweir {
1132cdf0e10cSrcweir 	double tmp = rOut;
1133cdf0e10cSrcweir     rOut = m_double;
1134cdf0e10cSrcweir     m_double = tmp;
1135cdf0e10cSrcweir }
testinout_methodBool(sal_Bool & rOut)1136cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodBool(sal_Bool& rOut) throw( RuntimeException )
1137cdf0e10cSrcweir {
1138cdf0e10cSrcweir     sal_Bool tmp = rOut;
1139cdf0e10cSrcweir     rOut = m_bool;
1140cdf0e10cSrcweir     m_bool = tmp;
1141cdf0e10cSrcweir }
testinout_methodShort(sal_Int16 & rOut)1142cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodShort(sal_Int16& rOut) throw( RuntimeException )
1143cdf0e10cSrcweir {
1144cdf0e10cSrcweir 	sal_Int16 tmp= rOut;
1145cdf0e10cSrcweir     rOut = m_int16;
1146cdf0e10cSrcweir     m_int16 = tmp;
1147cdf0e10cSrcweir }
testinout_methodUShort(sal_uInt16 & rOut)1148cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodUShort(sal_uInt16& rOut) throw( RuntimeException )
1149cdf0e10cSrcweir {
1150cdf0e10cSrcweir     sal_uInt16 tmp = rOut;
1151cdf0e10cSrcweir     rOut = m_uint16;
1152cdf0e10cSrcweir     m_uint16 = tmp;
1153cdf0e10cSrcweir }
testinout_methodLong(sal_Int32 & rOut)1154cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodLong(sal_Int32& rOut) throw( RuntimeException )
1155cdf0e10cSrcweir {
1156cdf0e10cSrcweir     sal_Int32 tmp = rOut;
1157cdf0e10cSrcweir     rOut = m_int32;
1158cdf0e10cSrcweir     m_int32 = tmp;
1159cdf0e10cSrcweir }
testinout_methodULong(sal_uInt32 & rOut)1160cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodULong(sal_uInt32& rOut) throw( RuntimeException )
1161cdf0e10cSrcweir {
1162cdf0e10cSrcweir     sal_uInt32 tmp = rOut;
1163cdf0e10cSrcweir     rOut = m_uint32;
1164cdf0e10cSrcweir     m_uint32 = tmp;
1165cdf0e10cSrcweir }
testinout_methodHyper(sal_Int64 & rOut)1166cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodHyper(sal_Int64& rOut) throw( RuntimeException )
1167cdf0e10cSrcweir {
1168cdf0e10cSrcweir     sal_Int64 tmp = rOut;
1169cdf0e10cSrcweir     rOut = m_int64;
1170cdf0e10cSrcweir     m_int64 = tmp;
1171cdf0e10cSrcweir }
1172cdf0e10cSrcweir 
testinout_methodUHyper(sal_uInt64 & rOut)1173cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodUHyper(sal_uInt64& rOut) throw( RuntimeException )
1174cdf0e10cSrcweir {
1175cdf0e10cSrcweir     sal_uInt64 tmp = rOut;
1176cdf0e10cSrcweir     rOut = m_uint64;
1177cdf0e10cSrcweir     m_uint64 = tmp;
1178cdf0e10cSrcweir }
1179cdf0e10cSrcweir 
testinout_methodString(OUString & rOut)1180cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodString(OUString& rOut) throw( RuntimeException )
1181cdf0e10cSrcweir {
1182cdf0e10cSrcweir     OUString tmp = rOut;
1183cdf0e10cSrcweir     rOut = m_string;
1184cdf0e10cSrcweir     m_string = tmp;
1185cdf0e10cSrcweir }
testinout_methodChar(sal_Unicode & rOut)1186cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodChar(sal_Unicode& rOut) throw( RuntimeException)
1187cdf0e10cSrcweir {
1188cdf0e10cSrcweir     sal_Unicode tmp = rOut;
1189cdf0e10cSrcweir     rOut = m_char;
1190cdf0e10cSrcweir     m_char = tmp;
1191cdf0e10cSrcweir }
testinout_methodAny(Any & rOut)1192cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodAny(Any& rOut) throw( RuntimeException)
1193cdf0e10cSrcweir {
1194cdf0e10cSrcweir     Any tmp = rOut;
1195cdf0e10cSrcweir     rOut = m_any;
1196cdf0e10cSrcweir     m_any = tmp;
1197cdf0e10cSrcweir }
testinout_methodType(Type & rOut)1198cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodType(Type& rOut) throw( RuntimeException)
1199cdf0e10cSrcweir {
1200cdf0e10cSrcweir     Type tmp = rOut;
1201cdf0e10cSrcweir     rOut = m_type;
1202cdf0e10cSrcweir     m_type = tmp;
1203cdf0e10cSrcweir }
1204cdf0e10cSrcweir 
1205cdf0e10cSrcweir 
testinout_methodSequence(Sequence<sal_Int32> & rOut)1206cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException)
1207cdf0e10cSrcweir {
1208cdf0e10cSrcweir 
1209cdf0e10cSrcweir 	sal_Int32* arr= rOut.getArray();
1210cdf0e10cSrcweir 	for ( sal_Int32 i=0; i < rOut.getLength(); i++)
1211cdf0e10cSrcweir 	{
1212cdf0e10cSrcweir 		rOut.getArray()[i] += 1;
1213cdf0e10cSrcweir 	}
1214cdf0e10cSrcweir }
testinout_methodSequence2(Sequence<Sequence<sal_Int32>> & rOut)1215cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException )
1216cdf0e10cSrcweir {
1217cdf0e10cSrcweir 	for( sal_Int32 i=0; i < rOut.getLength(); i++)
1218cdf0e10cSrcweir 	{
1219cdf0e10cSrcweir 		Sequence< sal_Int32 >& seq= rOut.getArray()[i];
1220cdf0e10cSrcweir 
1221cdf0e10cSrcweir 		for ( sal_Int32 j=0; j < seq.getLength(); j++)
1222cdf0e10cSrcweir 		{
1223cdf0e10cSrcweir 			seq.getArray()[j] += seq.getArray()[j];
1224cdf0e10cSrcweir 		}
1225cdf0e10cSrcweir 	}
1226cdf0e10cSrcweir }
1227cdf0e10cSrcweir 
1228cdf0e10cSrcweir // The parameter should implement XInvocation and a Property "value"
testinout_methodXInterface(Reference<XInvocation> & rOut)1229cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodXInterface( Reference< XInvocation >& rOut ) throw(RuntimeException)
1230cdf0e10cSrcweir {
1231cdf0e10cSrcweir 		Any any;
1232cdf0e10cSrcweir 		any= rOut->getValue( OUString( L"value"));
1233cdf0e10cSrcweir 		OUString _s;
1234cdf0e10cSrcweir 		any >>= _s;
1235cdf0e10cSrcweir 		OUString string(L"out");
1236cdf0e10cSrcweir 		any <<= string;
1237cdf0e10cSrcweir 		rOut->setValue( OUString(L"value"), any);
1238cdf0e10cSrcweir 
1239cdf0e10cSrcweir 		any= rOut->getValue( OUString( L"value"));
1240cdf0e10cSrcweir 		any >>= _s;
1241cdf0e10cSrcweir 
1242cdf0e10cSrcweir }
1243cdf0e10cSrcweir 
testinout_methodXInterface2(Reference<XInterface> & rOut)1244cdf0e10cSrcweir void SAL_CALL OComponent::testinout_methodXInterface2( Reference< XInterface > & rOut) throw( RuntimeException)
1245cdf0e10cSrcweir {
1246cdf0e10cSrcweir     Reference<XInterface> tmp = rOut;
1247cdf0e10cSrcweir     rOut = m_xinterface;
1248cdf0e10cSrcweir     m_xinterface = tmp;
1249cdf0e10cSrcweir // 	Reference<XTestSequence> xTest( rOut, UNO_QUERY);
1250cdf0e10cSrcweir // 	if( xTest.is())
1251cdf0e10cSrcweir // 	{
1252cdf0e10cSrcweir // 		Any any= xTest->getAttrAny2();
1253cdf0e10cSrcweir // 		OUString _s;
1254cdf0e10cSrcweir // 		any >>= _s;
1255cdf0e10cSrcweir // 		OUString string= _s + OUString((L" this string was written in the UNO component to the inout pararmeter"));
1256cdf0e10cSrcweir // 		any <<= string;
1257cdf0e10cSrcweir // 		xTest->setAttrAny2( any);
1258cdf0e10cSrcweir // 	}
1259cdf0e10cSrcweir 
1260cdf0e10cSrcweir }
methodAnyTest1(const Any & rIn)1261cdf0e10cSrcweir Any SAL_CALL OComponent::methodAnyTest1(const Any& rIn) throw( RuntimeException )
1262cdf0e10cSrcweir {
1263cdf0e10cSrcweir 	return rIn;
1264cdf0e10cSrcweir }
getAttrAny2(void)1265cdf0e10cSrcweir Any SAL_CALL OComponent::getAttrAny2(void)  throw( RuntimeException )
1266cdf0e10cSrcweir {
1267cdf0e10cSrcweir 	return m_any;
1268cdf0e10cSrcweir }
setAttrAny2(const Any & AttrAny2_)1269cdf0e10cSrcweir void SAL_CALL OComponent::setAttrAny2(const Any& AttrAny2_) throw( RuntimeException )
1270cdf0e10cSrcweir {
1271cdf0e10cSrcweir 	m_any= AttrAny2_;
1272cdf0e10cSrcweir }
1273cdf0e10cSrcweir 
1274cdf0e10cSrcweir 
1275cdf0e10cSrcweir 
1276cdf0e10cSrcweir // XTestStruct =======================================================================================
1277cdf0e10cSrcweir 
methodStruct(const Property & aProp)1278cdf0e10cSrcweir void SAL_CALL OComponent::methodStruct(const Property& aProp) throw( RuntimeException )
1279cdf0e10cSrcweir {
1280cdf0e10cSrcweir 	char buff[1024];
1281cdf0e10cSrcweir 	buff[0]= 0;
1282cdf0e10cSrcweir 	sprintf( buff,"Property::Attribute : %d \n Property::Handle : %d \n Property::Name : %S",
1283cdf0e10cSrcweir 		aProp.Attributes, aProp.Handle, (const sal_Unicode*)aProp.Name);
1284cdf0e10cSrcweir 	MessageBox( NULL, A2T(buff), _T("OleTest: methodStruct"), MB_OK);
1285cdf0e10cSrcweir }
1286cdf0e10cSrcweir 
retMethodStruct(void)1287cdf0e10cSrcweir Property SAL_CALL OComponent::retMethodStruct(void) throw( RuntimeException )
1288cdf0e10cSrcweir {
1289cdf0e10cSrcweir 	Property a(L"OleTest_Property", 255, getCppuType( (Reference<XInterface>*)0), PropertyAttribute::MAYBEVOID |
1290cdf0e10cSrcweir 		PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED |
1291cdf0e10cSrcweir 		PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY |
1292cdf0e10cSrcweir 		PropertyAttribute::MAYBEAMBIGUOUS | PropertyAttribute::MAYBEDEFAULT );
1293cdf0e10cSrcweir 	return a;
1294cdf0e10cSrcweir }
1295cdf0e10cSrcweir 
getAttrStruct(void)1296cdf0e10cSrcweir Property SAL_CALL OComponent::getAttrStruct(void) throw( RuntimeException)
1297cdf0e10cSrcweir {
1298cdf0e10cSrcweir 	Property a(L"OleTest_Property", 255, getCppuType( (Reference<XInterface>*)0), PropertyAttribute::MAYBEVOID |
1299cdf0e10cSrcweir 		PropertyAttribute::BOUND | PropertyAttribute::CONSTRAINED |
1300cdf0e10cSrcweir 		PropertyAttribute::TRANSIENT | PropertyAttribute::READONLY |
1301cdf0e10cSrcweir 		PropertyAttribute::MAYBEAMBIGUOUS | PropertyAttribute::MAYBEDEFAULT );
1302cdf0e10cSrcweir 	return a;
1303cdf0e10cSrcweir 
1304cdf0e10cSrcweir }
1305cdf0e10cSrcweir 
setAttrStruct(const Property & AttrStruct_)1306cdf0e10cSrcweir void SAL_CALL OComponent::setAttrStruct(const Property& AttrStruct_) throw( RuntimeException )
1307cdf0e10cSrcweir {
1308cdf0e10cSrcweir 	char buff[1024];
1309cdf0e10cSrcweir 	buff[0]= 0;
1310cdf0e10cSrcweir 	sprintf( buff,"Property::Attribute : %d \n Property::Handle : %d \n Property::Name : %S",
1311cdf0e10cSrcweir 		AttrStruct_.Attributes, AttrStruct_.Handle, (const sal_Unicode*)AttrStruct_.Name);
1312cdf0e10cSrcweir //	MessageBox( NULL, A2T(buff), _T("OleTest: setAttrStruct"), MB_OK);
1313cdf0e10cSrcweir }
1314cdf0e10cSrcweir 
methodStruct2(const Property & aProp)1315cdf0e10cSrcweir Property SAL_CALL OComponent::methodStruct2( const Property& aProp ) throw (RuntimeException)
1316cdf0e10cSrcweir {
1317cdf0e10cSrcweir     return aProp;
1318cdf0e10cSrcweir }
1319cdf0e10cSrcweir 
1320cdf0e10cSrcweir // XTestOther ==================================================================================
other_methodAnyIn(const Any &)1321cdf0e10cSrcweir void SAL_CALL OComponent::other_methodAnyIn(const Any& ) throw( RuntimeException )
1322cdf0e10cSrcweir {
1323cdf0e10cSrcweir }
other_methodAnyOut(Any & rAny)1324cdf0e10cSrcweir void SAL_CALL OComponent::other_methodAnyOut(Any& rAny) throw( RuntimeException )
1325cdf0e10cSrcweir {
1326cdf0e10cSrcweir 	rAny <<= OUString(L"Ein Any");
1327cdf0e10cSrcweir }
1328cdf0e10cSrcweir 
other_methodAnyRet(void)1329cdf0e10cSrcweir Any SAL_CALL OComponent::other_methodAnyRet(void) throw(RuntimeException )
1330cdf0e10cSrcweir {
1331cdf0e10cSrcweir 	Any a;
1332cdf0e10cSrcweir 	a <<= OUString(L"Ein Any");
1333cdf0e10cSrcweir 	return a;
1334cdf0e10cSrcweir }
in_float(float val)1335cdf0e10cSrcweir void SAL_CALL OComponent::in_float( float val) throw ( RuntimeException)
1336cdf0e10cSrcweir {
1337cdf0e10cSrcweir 	USES_CONVERSION;
1338cdf0e10cSrcweir 	char buff[256];
1339cdf0e10cSrcweir 	sprintf( buff, "parameter : %f", val);
1340cdf0e10cSrcweir 	MessageBox( NULL, A2T(buff), _T("OleTest"), MB_OK);
1341cdf0e10cSrcweir }
other_methodAny(const Any & rAny,const OUString & typeInAny)1342cdf0e10cSrcweir Any SAL_CALL OComponent::other_methodAny( const Any& rAny, const OUString& typeInAny )
1343cdf0e10cSrcweir         throw (RuntimeException)
1344cdf0e10cSrcweir {
1345cdf0e10cSrcweir     Type expectedType;
1346cdf0e10cSrcweir 	typelib_TypeDescription	* pDesc= NULL;
1347cdf0e10cSrcweir 	typelib_typedescription_getByName( &pDesc, typeInAny.pData );
1348cdf0e10cSrcweir 	if( pDesc)
1349cdf0e10cSrcweir 	{
1350cdf0e10cSrcweir 		expectedType = Type( pDesc->pWeakRef );
1351cdf0e10cSrcweir 		typelib_typedescription_release( pDesc);
1352cdf0e10cSrcweir 	}
1353cdf0e10cSrcweir     if (rAny.getValueType() != expectedType)
1354cdf0e10cSrcweir         throw RuntimeException();
1355cdf0e10cSrcweir 
1356cdf0e10cSrcweir     return rAny;
1357cdf0e10cSrcweir }
1358cdf0e10cSrcweir 
1359cdf0e10cSrcweir // XTestOutParameters ============================================================================
1360cdf0e10cSrcweir // void SAL_CALL OComponent::out_test(sal_Int8 rIn) throw( RuntimeException )
1361cdf0e10cSrcweir // {
1362cdf0e10cSrcweir // }
1363cdf0e10cSrcweir 
1364cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodByte(sal_Int8& rOut) throw( RuntimeException )
1365cdf0e10cSrcweir // {
1366cdf0e10cSrcweir // 	rOut= 100;
1367cdf0e10cSrcweir // }
1368cdf0e10cSrcweir 
1369cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodDouble(double& rOut) throw( RuntimeException )
1370cdf0e10cSrcweir // {
1371cdf0e10cSrcweir // 	rOut= 3.14;
1372cdf0e10cSrcweir // }
1373cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodFloat(float& rOut) throw( RuntimeException )
1374cdf0e10cSrcweir // {
1375cdf0e10cSrcweir // 	rOut= 3.14;
1376cdf0e10cSrcweir // }
1377cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodBool(sal_Bool& rOut) throw( RuntimeException )
1378cdf0e10cSrcweir // {
1379cdf0e10cSrcweir // 	rOut= sal_True;
1380cdf0e10cSrcweir // }
1381cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodShort(sal_Int16& rOut) throw( RuntimeException )
1382cdf0e10cSrcweir // {
1383cdf0e10cSrcweir // 	rOut= -100;
1384cdf0e10cSrcweir // }
1385cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodUShort(sal_uInt16& rOut) throw( RuntimeException )
1386cdf0e10cSrcweir // {
1387cdf0e10cSrcweir // 	rOut= 100;
1388cdf0e10cSrcweir // }
1389cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodLong(sal_Int32& rOut) throw( RuntimeException )
1390cdf0e10cSrcweir // {
1391cdf0e10cSrcweir // 	rOut= -100;
1392cdf0e10cSrcweir // }
1393cdf0e10cSrcweir 
1394cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodULong(sal_uInt32& rOut) throw( RuntimeException )
1395cdf0e10cSrcweir // {
1396cdf0e10cSrcweir // 	rOut= 100;
1397cdf0e10cSrcweir // }
1398cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodHyper(sal_Int64& rOut) throw( RuntimeException )
1399cdf0e10cSrcweir // {
1400cdf0e10cSrcweir 
1401cdf0e10cSrcweir // }
1402cdf0e10cSrcweir 
1403cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodUHyper(sal_uInt64& rOut) throw( RuntimeException )
1404cdf0e10cSrcweir // {
1405cdf0e10cSrcweir // }
1406cdf0e10cSrcweir 
1407cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodString(OUString& rOut) throw( RuntimeException )
1408cdf0e10cSrcweir // {
1409cdf0e10cSrcweir // 	rOut= L"I'm a string";
1410cdf0e10cSrcweir // }
1411cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodChar(sal_Unicode& rOut) throw( RuntimeException )
1412cdf0e10cSrcweir // {
1413cdf0e10cSrcweir // 	rOut= 'A';
1414cdf0e10cSrcweir // }
1415cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodAny(Any& rOut) throw( RuntimeException)
1416cdf0e10cSrcweir // {
1417cdf0e10cSrcweir // 	Any a;
1418cdf0e10cSrcweir //     a <<= OUString( L"Hi");
1419cdf0e10cSrcweir // 	rOut= a;
1420cdf0e10cSrcweir // }
1421cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodSequence(Sequence< sal_Int32 >& rOut) throw( RuntimeException )
1422cdf0e10cSrcweir // {
1423cdf0e10cSrcweir // 	Sequence< sal_Int32 > aseq(10);
1424cdf0e10cSrcweir // 	for( sal_Int16 i= 0; i < aseq.getLength(); i++) aseq.getArray()[i]= i;
1425cdf0e10cSrcweir // 	rOut= aseq;
1426cdf0e10cSrcweir // }
1427cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodSequence2(Sequence< Sequence< sal_Int32 > >& rOut) throw( RuntimeException )
1428cdf0e10cSrcweir // {
1429cdf0e10cSrcweir // 	rOut= Sequence< Sequence< sal_Int32 > >();
1430cdf0e10cSrcweir // }
1431cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodMulParams1(sal_Int32& rout1, sal_Int32& rout2) throw( RuntimeException )
1432cdf0e10cSrcweir // {
1433cdf0e10cSrcweir // 	rout1= 111;
1434cdf0e10cSrcweir // 	rout2= 222;
1435cdf0e10cSrcweir // }
1436cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodMulParams2(sal_Int32& rout1, sal_Int32& rout2, OUString& rout3) throw( RuntimeException )
1437cdf0e10cSrcweir // {
1438cdf0e10cSrcweir // 	rout1= 111;
1439cdf0e10cSrcweir // 	rout2= 222;
1440cdf0e10cSrcweir // 	rout3= L"this is a neet little string";
1441cdf0e10cSrcweir // }
1442cdf0e10cSrcweir // void SAL_CALL OComponent::out_methodMulParams3(const OUString& sin, OUString& sout) throw( RuntimeException )
1443cdf0e10cSrcweir // {
1444cdf0e10cSrcweir // 	sout= L"this is a neet little string";
1445cdf0e10cSrcweir // }
1446cdf0e10cSrcweir 
1447cdf0e10cSrcweir // XTestInterfaces -------------------------------------------------------------------------------------
testInterface(const Reference<XCallback> & xCallback,sal_Int32 mode)1448cdf0e10cSrcweir void SAL_CALL OComponent::testInterface(  const Reference< XCallback >& xCallback, sal_Int32 mode ) throw(RuntimeException)
1449cdf0e10cSrcweir {
1450cdf0e10cSrcweir 	USES_CONVERSION;
1451cdf0e10cSrcweir 	sal_Int32 i=0;
1452cdf0e10cSrcweir 	OUString aString;
1453cdf0e10cSrcweir 	char buff[1024];
1454cdf0e10cSrcweir 
1455cdf0e10cSrcweir 	Reference<XSimple> xSimple;
1456cdf0e10cSrcweir 	SimpleStruct aSimpleStruct;
1457cdf0e10cSrcweir 	SimpleEnum aSimpleEnum;
1458cdf0e10cSrcweir 	Sequence<Any> seqAny;
1459cdf0e10cSrcweir 	Sequence< sal_Int8 > seqByte;
1460cdf0e10cSrcweir 	Any outAny;
1461cdf0e10cSrcweir 	sal_Bool aBool;
1462cdf0e10cSrcweir 	sal_Unicode aChar;
1463cdf0e10cSrcweir 	float aFloat;
1464cdf0e10cSrcweir 	double aDouble;
1465cdf0e10cSrcweir 	sal_Int8 aByte;
1466cdf0e10cSrcweir 	sal_Int16 aShort;
1467cdf0e10cSrcweir 	sal_Int32 aLong;
1468cdf0e10cSrcweir // 	sal_uInt16 aUShort;
1469cdf0e10cSrcweir // 	sal_uInt32 aULong;
1470cdf0e10cSrcweir 
1471cdf0e10cSrcweir 	switch( mode)
1472cdf0e10cSrcweir 	{
1473cdf0e10cSrcweir 	case 1:
1474cdf0e10cSrcweir 		 xCallback->func1(); break;
1475cdf0e10cSrcweir 	case 2:
1476cdf0e10cSrcweir 		xSimple=	xCallback->returnInterface();
1477cdf0e10cSrcweir 		xSimple->func(L"XCallback::returnInterface");
1478cdf0e10cSrcweir 		break;
1479cdf0e10cSrcweir 
1480cdf0e10cSrcweir 
1481cdf0e10cSrcweir 	case 3:
1482cdf0e10cSrcweir 		xCallback->outInterface( xSimple);
1483cdf0e10cSrcweir 		sprintf( buff, "XCallback::outInterface, value: %x", xSimple.get());
1484cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1485cdf0e10cSrcweir 		xSimple->func(L"XCallback::outInterface works");
1486cdf0e10cSrcweir 		break;
1487cdf0e10cSrcweir 	case 4:
1488cdf0e10cSrcweir 		 xCallback->outStruct( aSimpleStruct);
1489cdf0e10cSrcweir 		 sprintf( buff,"XCallback::outStruct, SimpleStruct::message: %s", OLE2A( aSimpleStruct.message));
1490cdf0e10cSrcweir 		 MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1491cdf0e10cSrcweir 		 break;
1492cdf0e10cSrcweir 	case 5:
1493cdf0e10cSrcweir 		xCallback->outEnum( aSimpleEnum);
1494cdf0e10cSrcweir 		sprintf( buff,"XCallback::outEnum, SimpleEnum: %d", aSimpleEnum);
1495cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1496cdf0e10cSrcweir 		break;
1497cdf0e10cSrcweir 	case 6:
1498cdf0e10cSrcweir 		xCallback->outSeqAny( seqAny);
1499cdf0e10cSrcweir 		sprintf( buff,"XCallback::outSeqAny, length: %d )", seqAny.getLength());
1500cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1501cdf0e10cSrcweir 		for( i=0; i < seqAny.getLength(); i++)
1502cdf0e10cSrcweir 		{
1503cdf0e10cSrcweir 			Any any= seqAny[i];
1504cdf0e10cSrcweir 			if( any.getValueTypeClass() == TypeClass_STRING)
1505cdf0e10cSrcweir 			{
1506cdf0e10cSrcweir 				any >>= aString;
1507cdf0e10cSrcweir 				OutputDebugStringW( aString);
1508cdf0e10cSrcweir 			}
1509cdf0e10cSrcweir 
1510cdf0e10cSrcweir 		}
1511cdf0e10cSrcweir 		break;
1512cdf0e10cSrcweir 	case 7:
1513cdf0e10cSrcweir 		xCallback->outAny( outAny);
1514cdf0e10cSrcweir 		if( outAny.getValueTypeClass() == TypeClass_STRING)
1515cdf0e10cSrcweir 			outAny >>= aString;
1516cdf0e10cSrcweir 		sprintf( buff,"XCallback::outAny, Any : %s", W2A( aString));
1517cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1518cdf0e10cSrcweir 		break;
1519cdf0e10cSrcweir 	case 8:
1520cdf0e10cSrcweir 		xCallback->outBool( aBool);
1521cdf0e10cSrcweir 		sprintf( buff,"XCallback::outBool, value: %d", aBool);
1522cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1523cdf0e10cSrcweir 		break;
1524cdf0e10cSrcweir 	case 9:
1525cdf0e10cSrcweir 		xCallback->outChar( aChar);
1526cdf0e10cSrcweir 		sprintf( buff,"XCallback::outChar, value: %C", aChar);
1527cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1528cdf0e10cSrcweir 		break;
1529cdf0e10cSrcweir 	case 10:
1530cdf0e10cSrcweir 		xCallback->outString( aString);
1531cdf0e10cSrcweir 		sprintf( buff,"XCallback::outString, value: %s", W2A( aString));
1532cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1533cdf0e10cSrcweir 		break;
1534cdf0e10cSrcweir 	case 11:
1535cdf0e10cSrcweir 		xCallback->outFloat( aFloat);
1536cdf0e10cSrcweir 		sprintf( buff,"XCallback::outFloat, value: %f", aFloat);
1537cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1538cdf0e10cSrcweir 		break;
1539cdf0e10cSrcweir 	case 12:
1540cdf0e10cSrcweir 		xCallback->outDouble( aDouble);
1541cdf0e10cSrcweir 		sprintf( buff,"XCallback::outDouble, value: %f", aDouble);
1542cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1543cdf0e10cSrcweir 		break;
1544cdf0e10cSrcweir 	case 13:
1545cdf0e10cSrcweir 		xCallback->outByte( aByte);
1546cdf0e10cSrcweir 		sprintf( buff,"XCallback::outByte, value: %d", aByte);
1547cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1548cdf0e10cSrcweir 		break;
1549cdf0e10cSrcweir 	case 14:
1550cdf0e10cSrcweir 		xCallback->outShort( aShort);
1551cdf0e10cSrcweir 		sprintf( buff,"XCallback::outShort, value: %d", aShort);
1552cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1553cdf0e10cSrcweir 		break;
1554cdf0e10cSrcweir 	case 15:
1555cdf0e10cSrcweir 		xCallback->outLong( aLong);
1556cdf0e10cSrcweir 		sprintf( buff,"XCallback::outLong, value: %d", aLong);
1557cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1558cdf0e10cSrcweir 		break;
1559cdf0e10cSrcweir 	case 18:
1560cdf0e10cSrcweir 	case 19:
1561cdf0e10cSrcweir 	case 30:
1562cdf0e10cSrcweir 		{
1563cdf0e10cSrcweir 
1564cdf0e10cSrcweir 			long outLong= 0;
1565cdf0e10cSrcweir 			xCallback->outValuesMixed( 1111, outLong, OUString( L"in string") );
1566cdf0e10cSrcweir 
1567cdf0e10cSrcweir 			sprintf( buff, "oletest.testInterface: outValue: %d", outLong);
1568cdf0e10cSrcweir 			MessageBox( NULL, A2T(buff), _T("OleTest"), MB_OK);
1569cdf0e10cSrcweir 			break;
1570cdf0e10cSrcweir 		}
1571cdf0e10cSrcweir 
1572cdf0e10cSrcweir 	case 31:
1573cdf0e10cSrcweir 		{
1574cdf0e10cSrcweir 			Reference< XSimple > xSimple;
1575cdf0e10cSrcweir 			SimpleStruct aSimpleStruct;
1576cdf0e10cSrcweir 			SimpleEnum aSimpleEnum;
1577cdf0e10cSrcweir 			Sequence<Any> seqAny;
1578cdf0e10cSrcweir 			Any			aAny;
1579cdf0e10cSrcweir 			sal_Bool	aBool;
1580cdf0e10cSrcweir 			sal_Unicode aChar;
1581cdf0e10cSrcweir 			OUString	aString;
1582cdf0e10cSrcweir 			float		aFloat;
1583cdf0e10cSrcweir 			double		aDouble;
1584cdf0e10cSrcweir 			sal_Int8	aByte;
1585cdf0e10cSrcweir 			sal_Int16	aShort;
1586cdf0e10cSrcweir 			sal_Int32	aLong;
1587cdf0e10cSrcweir //			sal_uInt16	aUShort;
1588cdf0e10cSrcweir //			sal_uInt32	aULong;
1589cdf0e10cSrcweir 			xCallback->outValuesAll( xSimple, aSimpleStruct, aSimpleEnum, seqAny, aAny, aBool,
1590cdf0e10cSrcweir 				aChar, aString,
1591cdf0e10cSrcweir 			aFloat, aDouble,
1592cdf0e10cSrcweir 			aByte,
1593cdf0e10cSrcweir 			aShort, aLong);
1594cdf0e10cSrcweir 
1595cdf0e10cSrcweir 			MessageBox( NULL, _T("XCallback::outValuesAll returned"), _T("OleTest::testInterface"), MB_OK);
1596cdf0e10cSrcweir 			break;
1597cdf0e10cSrcweir 		}
1598cdf0e10cSrcweir 	case 32:
1599cdf0e10cSrcweir 		{
1600cdf0e10cSrcweir 
1601cdf0e10cSrcweir 			xCallback->outSeqByte( seqByte);
1602cdf0e10cSrcweir 			sprintf( buff,"XCallback::outSeqAny, length: %d )", seqAny.getLength());
1603cdf0e10cSrcweir 			MessageBox( NULL, A2T(buff), _T("OleTest out parameter"), MB_OK);
1604cdf0e10cSrcweir 			for( i=0; i < seqAny.getLength(); i++)
1605cdf0e10cSrcweir 			{
1606cdf0e10cSrcweir 				Any any= seqAny[i];
1607cdf0e10cSrcweir 				if( any.getValueTypeClass() == TypeClass_STRING)
1608cdf0e10cSrcweir 				{
1609cdf0e10cSrcweir 					any >>= aString;
1610cdf0e10cSrcweir 					OutputDebugStringW( aString);
1611cdf0e10cSrcweir 				}
1612cdf0e10cSrcweir 			}
1613cdf0e10cSrcweir 			break;
1614cdf0e10cSrcweir 		}
1615cdf0e10cSrcweir 		// ############################################################################
1616cdf0e10cSrcweir 		// IN OUT parameter
1617cdf0e10cSrcweir 		// ############################################################################
1618cdf0e10cSrcweir 	case 100:
1619cdf0e10cSrcweir 		{
1620cdf0e10cSrcweir 			Reference<XSimple> xSimple= static_cast<XSimple*>(this);
1621cdf0e10cSrcweir 			xCallback->inoutInterface( xSimple);
1622cdf0e10cSrcweir 			xSimple->func(L"XSimple called from OleTest");
1623cdf0e10cSrcweir 			break;
1624cdf0e10cSrcweir 		}
1625cdf0e10cSrcweir 	case 101:
1626cdf0e10cSrcweir 		{
1627cdf0e10cSrcweir 		Reference<XIdlReflection> xRefl( m_rFactory->createInstance(L"com.sun.star.reflection.CoreReflection"), UNO_QUERY);
1628cdf0e10cSrcweir 		if( xRefl.is())
1629cdf0e10cSrcweir 		{
1630cdf0e10cSrcweir 			Reference<XIdlClass> xClass= xRefl->forName(L"oletest.SimpleStruct");
1631cdf0e10cSrcweir 			Any any;
1632cdf0e10cSrcweir 			if( xClass.is())
1633cdf0e10cSrcweir 				xClass->createObject( any);
1634cdf0e10cSrcweir 
1635cdf0e10cSrcweir 			if( any.getValueTypeClass() == TypeClass_STRUCT)
1636cdf0e10cSrcweir 			{
1637cdf0e10cSrcweir 				SimpleStruct* pStruct= ( SimpleStruct*) any.getValue();
1638cdf0e10cSrcweir 				pStruct->message= OUString::createFromAscii("This struct was created in OleTest");
1639cdf0e10cSrcweir 
1640cdf0e10cSrcweir 				SimpleStruct aStruct;
1641cdf0e10cSrcweir 				any >>= aStruct;
1642cdf0e10cSrcweir 				xCallback->inoutStruct( aStruct);
1643cdf0e10cSrcweir 				// a Struct should now contain a different message
1644cdf0e10cSrcweir 				MessageBox( NULL, W2T(aStruct.message), _T("OleTest in out parameter"), MB_OK);
1645cdf0e10cSrcweir 			}
1646cdf0e10cSrcweir 
1647cdf0e10cSrcweir 		}
1648cdf0e10cSrcweir 		break;
1649cdf0e10cSrcweir 		}
1650cdf0e10cSrcweir 	case 102:
1651cdf0e10cSrcweir 		{
1652cdf0e10cSrcweir 		SimpleEnum aEnum= SimpleEnum_B;
1653cdf0e10cSrcweir 		xCallback->inoutEnum( aEnum);
1654cdf0e10cSrcweir 		char buff[1024];
1655cdf0e10cSrcweir 		sprintf( buff, "Enum: %d", aEnum);
1656cdf0e10cSrcweir 		MessageBox( NULL, A2T(buff), _T("OleTest in out parameter"), MB_OK);
1657cdf0e10cSrcweir 		break;
1658cdf0e10cSrcweir 		}
1659cdf0e10cSrcweir 	case 103:
1660cdf0e10cSrcweir 		{
1661cdf0e10cSrcweir 			Any arAny[3];
1662cdf0e10cSrcweir 			arAny[0] <<= OUString( L"string 0");
1663cdf0e10cSrcweir 			arAny[1] <<= OUString( L"string 1");
1664cdf0e10cSrcweir 			arAny[2] <<= OUString( L"string 2");
1665cdf0e10cSrcweir 
1666cdf0e10cSrcweir 			Sequence< Any >seqAny( arAny, 3);
1667cdf0e10cSrcweir 			xCallback->inoutSeqAny( seqAny);
1668cdf0e10cSrcweir 			char buff[1023];
1669cdf0e10cSrcweir 			sprintf( buff, "Sequence length: %d", seqAny.getLength());
1670cdf0e10cSrcweir 			MessageBox( NULL,A2T(buff) , _T("OleTest in out parameter"), MB_OK);
1671cdf0e10cSrcweir 
1672cdf0e10cSrcweir 			for( int i=0; i < seqAny.getLength(); i++)
1673cdf0e10cSrcweir 			{
1674cdf0e10cSrcweir 				Any any;
1675cdf0e10cSrcweir 				any <<= seqAny[i];
1676cdf0e10cSrcweir 				if(any.getValueTypeClass() == TypeClass_STRING)
1677cdf0e10cSrcweir 				{
1678cdf0e10cSrcweir 					OUString str;
1679cdf0e10cSrcweir 					any >>= str;
1680cdf0e10cSrcweir 
1681cdf0e10cSrcweir 				}
1682cdf0e10cSrcweir 			}
1683cdf0e10cSrcweir 
1684cdf0e10cSrcweir 		break;
1685cdf0e10cSrcweir 		}
1686cdf0e10cSrcweir 	case 104:
1687cdf0e10cSrcweir 		{
1688cdf0e10cSrcweir 			Any any;
1689cdf0e10cSrcweir 			OUString s(L" OleTest");
1690cdf0e10cSrcweir 			any <<= s;
1691cdf0e10cSrcweir 			xCallback->inoutAny(any);
1692cdf0e10cSrcweir 			if( any.getValueTypeClass() == TypeClass_STRING)
1693cdf0e10cSrcweir 			{
1694cdf0e10cSrcweir 				OUString s= *( rtl_uString**) any.getValue();
1695cdf0e10cSrcweir 				MessageBox( NULL, W2T( s), _T("OleTest: inout value any"), MB_OK);
1696cdf0e10cSrcweir 			}
1697cdf0e10cSrcweir 		break;
1698cdf0e10cSrcweir 		}
1699cdf0e10cSrcweir 	case 105:
1700cdf0e10cSrcweir 		{
1701cdf0e10cSrcweir 		sal_Bool b= sal_True;
1702cdf0e10cSrcweir 		xCallback->inoutBool( b);
1703cdf0e10cSrcweir 		char buff[1024];
1704cdf0e10cSrcweir 		sprintf( buff, "out value bool: %d", b);
1705cdf0e10cSrcweir 		MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1706cdf0e10cSrcweir 			break;
1707cdf0e10cSrcweir 		}
1708cdf0e10cSrcweir 	case 106:
1709cdf0e10cSrcweir 		{
1710cdf0e10cSrcweir 			sal_Unicode uc= L'A';
1711cdf0e10cSrcweir 			xCallback->inoutChar( uc);
1712cdf0e10cSrcweir 			char buff[1024];
1713cdf0e10cSrcweir 			sprintf( buff, "out value sal_Unicode: %C", uc);
1714cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1715cdf0e10cSrcweir 			break;
1716cdf0e10cSrcweir 		}
1717cdf0e10cSrcweir 	case 107:
1718cdf0e10cSrcweir 		{
1719cdf0e10cSrcweir 			OUString s(L"OleTest");
1720cdf0e10cSrcweir 			xCallback->inoutString( s);
1721cdf0e10cSrcweir 			char buff[1024];
1722cdf0e10cSrcweir 			sprintf( buff, "out value string: %S", s.getStr());
1723cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1724cdf0e10cSrcweir 			break;
1725cdf0e10cSrcweir 		}
1726cdf0e10cSrcweir 	case 108:
1727cdf0e10cSrcweir 		{
1728cdf0e10cSrcweir 			float f= 3.14f;
1729cdf0e10cSrcweir 			xCallback->inoutFloat(f);
1730cdf0e10cSrcweir 			char buff[1024];
1731cdf0e10cSrcweir 			sprintf( buff, "out value float: %f", f);
1732cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1733cdf0e10cSrcweir 			break;
1734cdf0e10cSrcweir 		}
1735cdf0e10cSrcweir 	case 109:
1736cdf0e10cSrcweir 		{
1737cdf0e10cSrcweir 			double f= 3.145;
1738cdf0e10cSrcweir 			xCallback->inoutDouble( f);
1739cdf0e10cSrcweir 			char buff[1024];
1740cdf0e10cSrcweir 			sprintf( buff, "out value double: %g", f);
1741cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1742cdf0e10cSrcweir 			break;
1743cdf0e10cSrcweir 		}
1744cdf0e10cSrcweir 	case 110:
1745cdf0e10cSrcweir 		{
1746cdf0e10cSrcweir 			sal_Int8 aByte= 0xf;
1747cdf0e10cSrcweir 			xCallback->inoutByte( aByte);
1748cdf0e10cSrcweir 			char buff[1024];
1749cdf0e10cSrcweir 			sprintf( buff, "out value sal_Int8: %d", aByte);
1750cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1751cdf0e10cSrcweir 			break;
1752cdf0e10cSrcweir 		}
1753cdf0e10cSrcweir 	case 111:
1754cdf0e10cSrcweir 		{
1755cdf0e10cSrcweir 			sal_Int16 aShort= 0xff;
1756cdf0e10cSrcweir 			xCallback->inoutShort( aShort);
1757cdf0e10cSrcweir 			char buff[1024];
1758cdf0e10cSrcweir 			sprintf( buff, "out value sal_Int16: %d", aShort);
1759cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1760cdf0e10cSrcweir 			break;
1761cdf0e10cSrcweir 		}
1762cdf0e10cSrcweir 	case 112:
1763cdf0e10cSrcweir 		{
1764cdf0e10cSrcweir 			sal_Int32 aLong= 0xfffe;
1765cdf0e10cSrcweir 			xCallback->inoutLong( aLong);
1766cdf0e10cSrcweir 			char buff[1024];
1767cdf0e10cSrcweir 			sprintf( buff, "out value sal_Int32: %d", aLong);
1768cdf0e10cSrcweir 			MessageBox( NULL, A2T( buff), _T("OleTest in out parameter"), MB_OK);
1769cdf0e10cSrcweir 			break;
1770cdf0e10cSrcweir 		}
1771cdf0e10cSrcweir 	case 120:
1772cdf0e10cSrcweir 		{
1773cdf0e10cSrcweir 		Reference<XSimple> aXSimple= static_cast<XSimple*>(this);
1774cdf0e10cSrcweir 
1775cdf0e10cSrcweir 		SimpleStruct aStruct;
1776cdf0e10cSrcweir 		Reference<XIdlReflection> xRefl( m_rFactory->createInstance(L"com.sun.star.reflection.CoreReflection"), UNO_QUERY);
1777cdf0e10cSrcweir 		if( xRefl.is())
1778cdf0e10cSrcweir 		{
1779cdf0e10cSrcweir 			Reference<XIdlClass> xClass= xRefl->forName(L"oletest.SimpleStruct");
1780cdf0e10cSrcweir 			Any any;
1781cdf0e10cSrcweir 			if( xClass.is())
1782cdf0e10cSrcweir 				xClass->createObject( any);
1783cdf0e10cSrcweir 
1784cdf0e10cSrcweir 			if( any.getValueTypeClass() == TypeClass_STRUCT)
1785cdf0e10cSrcweir 			{
1786cdf0e10cSrcweir 				SimpleStruct* pStruct= ( SimpleStruct*) any.getValue();
1787cdf0e10cSrcweir 				pStruct->message= OUString::createFromAscii("This struct was created in OleTest");
1788cdf0e10cSrcweir 				any >>= aStruct;
1789cdf0e10cSrcweir 			}
1790cdf0e10cSrcweir 		}
1791cdf0e10cSrcweir 
1792cdf0e10cSrcweir 		SimpleEnum aEnum= SimpleEnum_B;
1793cdf0e10cSrcweir 
1794cdf0e10cSrcweir 		Sequence< Any > aSeq;
1795cdf0e10cSrcweir 		Any arAny[3];
1796cdf0e10cSrcweir 		arAny[0] <<= OUString( L"string 0");
1797cdf0e10cSrcweir 		arAny[1] <<= OUString( L"string 1");
1798cdf0e10cSrcweir 		arAny[2] <<= OUString( L"string 2");
1799cdf0e10cSrcweir 		aSeq = Sequence< Any >( arAny, 3);
1800cdf0e10cSrcweir 
1801cdf0e10cSrcweir 		Any aAny;
1802cdf0e10cSrcweir 		OUString s(L" OleTest");
1803cdf0e10cSrcweir 		aAny <<= s;
1804cdf0e10cSrcweir 
1805cdf0e10cSrcweir 		sal_Bool aBool= sal_True;
1806cdf0e10cSrcweir 		sal_Unicode aChar= L'A';
1807cdf0e10cSrcweir 		OUString aString( L"OleTest");
1808cdf0e10cSrcweir 		float aFloat=3.14f;
1809cdf0e10cSrcweir 		double aDouble= 3.145;
1810cdf0e10cSrcweir 		sal_Int8 aByte= 0xf;
1811cdf0e10cSrcweir 		sal_Int16 aShort= 0xff;
1812cdf0e10cSrcweir 		sal_Int32 aLong= 0xffe;
1813cdf0e10cSrcweir 
1814cdf0e10cSrcweir 		xCallback->inoutValuesAll( aXSimple, aStruct, aEnum, aSeq,
1815cdf0e10cSrcweir 			aAny, aBool, aChar, aString,  aFloat, aDouble,
1816cdf0e10cSrcweir 			aByte, aShort,  aLong );
1817cdf0e10cSrcweir 
1818cdf0e10cSrcweir 		aXSimple->func(L"XSimple called from OleTest");
1819cdf0e10cSrcweir 		MessageBox( NULL, W2T(aStruct.message), _T("OleTest"), MB_OK);
1820cdf0e10cSrcweir 
1821cdf0e10cSrcweir 		for( int i=0; i < aSeq.getLength(); i++)
1822cdf0e10cSrcweir 		{
1823cdf0e10cSrcweir 			Any any;
1824cdf0e10cSrcweir 			any <<= aSeq[i];
1825cdf0e10cSrcweir 			if(any.getValueTypeClass() == TypeClass_STRING)
1826cdf0e10cSrcweir 			{
1827cdf0e10cSrcweir 				OUString str;
1828cdf0e10cSrcweir 				any >>= str;
1829cdf0e10cSrcweir 
1830cdf0e10cSrcweir 			}
1831cdf0e10cSrcweir 		}
1832cdf0e10cSrcweir 		break;
1833cdf0e10cSrcweir 		}
1834cdf0e10cSrcweir 
1835cdf0e10cSrcweir 	// ############################################################################
1836cdf0e10cSrcweir 	// IN parameter
1837cdf0e10cSrcweir 	// ############################################################################
1838cdf0e10cSrcweir 
1839cdf0e10cSrcweir 	case 200:
1840cdf0e10cSrcweir 
1841cdf0e10cSrcweir 		xCallback->inValues( L'a', 0xffffL, OUString(L" a string from OleTest"));
1842cdf0e10cSrcweir 		break;
1843cdf0e10cSrcweir 	case 201:
1844cdf0e10cSrcweir     {
1845cdf0e10cSrcweir         sal_Int8 arbyte[3]= { 1,2,3};
1846cdf0e10cSrcweir         Sequence< sal_Int8 > seq( arbyte, 3);
1847cdf0e10cSrcweir         xCallback->inSeqByte( seq);
1848cdf0e10cSrcweir         break;
1849cdf0e10cSrcweir     }
1850cdf0e10cSrcweir     case 202:
1851cdf0e10cSrcweir     {
1852cdf0e10cSrcweir         const int LISTENERS= 3;
1853cdf0e10cSrcweir         Reference<XEventListener> arListeners[LISTENERS];
1854cdf0e10cSrcweir         EventObject arEvents[LISTENERS];
1855cdf0e10cSrcweir 
1856cdf0e10cSrcweir         for( int i= 0; i < LISTENERS; i++)
1857cdf0e10cSrcweir         {
1858cdf0e10cSrcweir             Reference<XInterface> aList= static_cast<XWeak*>( new EventListener());
1859cdf0e10cSrcweir             arListeners[i]= Reference<XEventListener>( aList, UNO_QUERY);
1860cdf0e10cSrcweir         }
1861cdf0e10cSrcweir 
1862cdf0e10cSrcweir         xCallback->inSeqXEventListener(Sequence<Reference<XEventListener> > (arListeners, LISTENERS),
1863cdf0e10cSrcweir                                        Sequence<EventObject>(arEvents, LISTENERS));
1864cdf0e10cSrcweir         break;
1865cdf0e10cSrcweir     }
1866cdf0e10cSrcweir 
1867cdf0e10cSrcweir 	// ############################################################################
1868cdf0e10cSrcweir 	// Call a COM object that has not been passed as parameter to a UNO component and
1869cdf0e10cSrcweir 	// hence no type information are available in the COM wrapper
1870cdf0e10cSrcweir 	// ############################################################################
1871cdf0e10cSrcweir 	case 300:
1872cdf0e10cSrcweir 		{
1873cdf0e10cSrcweir 			Reference<XInterface> xIntFact = m_rFactory->createInstance(L"com.sun.star.bridge.oleautomation.Factory");
1874cdf0e10cSrcweir 
1875cdf0e10cSrcweir 			Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY);
1876cdf0e10cSrcweir 
1877cdf0e10cSrcweir 			Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback");
1878cdf0e10cSrcweir 			Reference<XInvocation> xInv( xIntCallback, UNO_QUERY);
1879cdf0e10cSrcweir //Any SAL_CALL invoke( const OUString& aFunctionName, const Sequence<Any >& aParams,Sequence< sal_Int16 >& aOutParamIndex,
1880cdf0e10cSrcweir //			Sequence<Any >& aOutParam );
1881cdf0e10cSrcweir 			Sequence<sal_Int16> seqIndizes;
1882cdf0e10cSrcweir 			Sequence<Any> seqOutParams;
1883cdf0e10cSrcweir 			xInv->invoke( OUString( L"outValuesAll"), Sequence<Any>(), seqIndizes, seqOutParams);
1884cdf0e10cSrcweir 
1885cdf0e10cSrcweir //			void outValuesAll( [out] oletest::XSimple outInterface,
1886cdf0e10cSrcweir //					   [out] SimpleStruct outStruct ,
1887cdf0e10cSrcweir //					   [out] SimpleEnum outEnum,
1888cdf0e10cSrcweir //					   [out] sequence<any> outSeqAny,
1889cdf0e10cSrcweir //					   [out] any outAny,
1890cdf0e10cSrcweir //					   [out] boolean outBool,
1891cdf0e10cSrcweir //					   [out] char outChar,
1892cdf0e10cSrcweir //					   [out] string outString,
1893cdf0e10cSrcweir //					   [out] float outFloat,
1894cdf0e10cSrcweir //					   [out] double outDouble,
1895cdf0e10cSrcweir //					   [out] byte	outByte,
1896cdf0e10cSrcweir //					   [out] short outShort,
1897cdf0e10cSrcweir //					   [out] long outLong);
1898cdf0e10cSrcweir 			if( seqOutParams.getLength() == 12)
1899cdf0e10cSrcweir 			{
1900cdf0e10cSrcweir 				Reference<XSimple> xSimple= *(XSimple**)seqOutParams[0].getValue();
1901cdf0e10cSrcweir 				xSimple->func( L"Call from OleTest on XSimple");
1902cdf0e10cSrcweir 				SimpleStruct aStruct;
1903cdf0e10cSrcweir 				seqOutParams[1] >>= aStruct;
1904cdf0e10cSrcweir 				SimpleEnum aEnum= *(SimpleEnum*)seqOutParams[2].getValue();
1905cdf0e10cSrcweir 
1906cdf0e10cSrcweir 				Sequence<Any> seqAny;
1907cdf0e10cSrcweir 				seqOutParams[3] >>= seqAny;
1908cdf0e10cSrcweir 				for( int i=0; i<seqAny.getLength(); i++)
1909cdf0e10cSrcweir 				{
1910cdf0e10cSrcweir 					OUString _s;
1911cdf0e10cSrcweir 					seqAny[i] >>= _s;
1912cdf0e10cSrcweir 				}
1913cdf0e10cSrcweir 
1914cdf0e10cSrcweir 				Any _any= *(Any*)seqOutParams[4].getValue();
1915cdf0e10cSrcweir 				sal_Bool _bool= *(sal_Bool*)seqOutParams[5].getValue();
1916cdf0e10cSrcweir 				sal_Unicode _char= *( sal_Unicode*) seqOutParams[6].getValue();
1917cdf0e10cSrcweir 				OUString _str= *( rtl_uString**)seqOutParams[7].getValue();
1918cdf0e10cSrcweir 
1919cdf0e10cSrcweir 				float _f= *( float*)seqOutParams[8].getValue();
1920cdf0e10cSrcweir 				double _d= *( double*) seqOutParams[9].getValue();
1921cdf0e10cSrcweir 				sal_Int8 _byte= *( sal_Int8*) seqOutParams[10].getValue();
1922cdf0e10cSrcweir 				sal_Int16 _short= *( sal_Int16*) seqOutParams[11].getValue();
1923cdf0e10cSrcweir 
1924cdf0e10cSrcweir 				sal_Int32 _long= *( sal_Int32*) seqOutParams[12].getValue();
1925cdf0e10cSrcweir 
1926cdf0e10cSrcweir 			}
1927cdf0e10cSrcweir 			break;
1928cdf0e10cSrcweir 		}
1929cdf0e10cSrcweir 	case 301:
1930cdf0e10cSrcweir 		// in / out parameter
1931cdf0e10cSrcweir 		{
1932cdf0e10cSrcweir 			Reference<XInterface> xIntFact = m_rFactory->createInstance(L"com.sun.star.bridge.oleautomation.Factory");
1933cdf0e10cSrcweir 
1934cdf0e10cSrcweir 			Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY);
1935cdf0e10cSrcweir 
1936cdf0e10cSrcweir 			Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback");
1937cdf0e10cSrcweir 			Reference<XInvocation> xInv( xIntCallback, UNO_QUERY);
1938cdf0e10cSrcweir 			Sequence<sal_Int16> seqIndizes;
1939cdf0e10cSrcweir 			Sequence<Any> seqOutParams;
1940cdf0e10cSrcweir 
1941cdf0e10cSrcweir 
1942cdf0e10cSrcweir 			Any arAny[13];
1943cdf0e10cSrcweir 			Reference<XSimple> xSimple= static_cast<XSimple*>( this);
1944cdf0e10cSrcweir 
1945cdf0e10cSrcweir 			arAny[0] <<=  xSimple;
1946cdf0e10cSrcweir 			SimpleStruct aStruct;
1947cdf0e10cSrcweir 			Reference<XIdlReflection> xRefl( m_rFactory->createInstance(L"com.sun.star.reflection.CoreReflection"), UNO_QUERY);
1948cdf0e10cSrcweir 			if( xRefl.is())
1949cdf0e10cSrcweir 			{
1950cdf0e10cSrcweir 				Reference<XIdlClass> xClass= xRefl->forName(L"oletest.SimpleStruct");
1951cdf0e10cSrcweir 				Any any;
1952cdf0e10cSrcweir 				if( xClass.is())
1953cdf0e10cSrcweir 					xClass->createObject( any);
1954cdf0e10cSrcweir 
1955cdf0e10cSrcweir 				if( any.getValueTypeClass() == TypeClass_STRUCT)
1956cdf0e10cSrcweir 				{
1957cdf0e10cSrcweir 					SimpleStruct* pStruct= ( SimpleStruct*) any.getValue();
1958cdf0e10cSrcweir 					pStruct->message= OUString::createFromAscii("This struct was created in OleTest");
1959cdf0e10cSrcweir 					any >>= aStruct;
1960cdf0e10cSrcweir 				}
1961cdf0e10cSrcweir 			}
1962cdf0e10cSrcweir 			arAny[1] <<= aStruct;
1963cdf0e10cSrcweir 			arAny[2] <<= SimpleEnum_C;
1964cdf0e10cSrcweir 
1965cdf0e10cSrcweir 			Any arSeqAny[3];
1966cdf0e10cSrcweir 			arSeqAny[0] <<= OUString( L"string 0");
1967cdf0e10cSrcweir 			arSeqAny[1] <<= OUString( L"string 1");
1968cdf0e10cSrcweir 			arSeqAny[2] <<= OUString( L"string 2");
1969cdf0e10cSrcweir 
1970cdf0e10cSrcweir 			arAny[3] <<=  Sequence< Any >( arAny, 3);
1971cdf0e10cSrcweir 
1972cdf0e10cSrcweir 			OUString str(L" Ein Any param");
1973cdf0e10cSrcweir 			arAny[4] <<= str;
1974cdf0e10cSrcweir 			arAny[5] <<= sal_False;
1975cdf0e10cSrcweir 			arAny[6] <<= L'B';
1976cdf0e10cSrcweir 			OUString stringParam(L" a string parameter");
1977cdf0e10cSrcweir 			arAny[7] <<= stringParam;
1978cdf0e10cSrcweir 			float _float= 3.14f;
1979cdf0e10cSrcweir 			arAny[8] <<= _float;
1980cdf0e10cSrcweir 			double _double= 3.145;
1981cdf0e10cSrcweir 			arAny[9] <<= _double;
1982cdf0e10cSrcweir 			sal_Int8 _byte= -1;
1983cdf0e10cSrcweir 			arAny[10] <<= _byte;
1984cdf0e10cSrcweir 			sal_Int16 _short= -1;
1985cdf0e10cSrcweir 			arAny[11] <<= _short;
1986cdf0e10cSrcweir 			sal_Int32 _long= -1;
1987cdf0e10cSrcweir 			arAny[12] <<= _long;
1988cdf0e10cSrcweir //
1989cdf0e10cSrcweir 			Sequence<Any> params( arAny, 13);
1990cdf0e10cSrcweir 
1991cdf0e10cSrcweir 			xInv->invoke( OUString( L"inoutValuesAll"), params, seqIndizes, seqOutParams);
1992cdf0e10cSrcweir 
1993cdf0e10cSrcweir 			if( seqOutParams.getLength() == 12)
1994cdf0e10cSrcweir 			{
1995cdf0e10cSrcweir 				Reference<XSimple> xSimple= *(XSimple**)seqOutParams[0].getValue();
1996cdf0e10cSrcweir 				xSimple->func( L"Call from OleTest on XSimple");
1997cdf0e10cSrcweir 				SimpleStruct aStruct;
1998cdf0e10cSrcweir 				seqOutParams[1] >>= aStruct;
1999cdf0e10cSrcweir 				SimpleEnum aEnum= *(SimpleEnum*)seqOutParams[2].getValue();
2000cdf0e10cSrcweir 
2001cdf0e10cSrcweir 				Sequence<Any> seqAny;
2002cdf0e10cSrcweir 				seqOutParams[3] >>= seqAny;
2003cdf0e10cSrcweir 				for( int i=0; i<seqAny.getLength(); i++)
2004cdf0e10cSrcweir 				{
2005cdf0e10cSrcweir 					OUString _s;
2006cdf0e10cSrcweir 					seqAny[i] >>= _s;
2007cdf0e10cSrcweir 				}
2008cdf0e10cSrcweir 
2009cdf0e10cSrcweir 				Any _any= *(Any*)seqOutParams[4].getValue();
2010cdf0e10cSrcweir 				sal_Bool _bool= *(sal_Bool*)seqOutParams[5].getValue();
2011cdf0e10cSrcweir 				sal_Unicode _char= *( sal_Unicode*) seqOutParams[6].getValue();
2012cdf0e10cSrcweir 				OUString _str= *( rtl_uString**)seqOutParams[7].getValue();
2013cdf0e10cSrcweir 
2014cdf0e10cSrcweir 				float _f= *( float*)seqOutParams[8].getValue();
2015cdf0e10cSrcweir 				double _d= *( double*) seqOutParams[9].getValue();
2016cdf0e10cSrcweir 				sal_Int8 _byte= *( sal_Int8*) seqOutParams[10].getValue();
2017cdf0e10cSrcweir 				sal_Int16 _short= *( sal_Int16*) seqOutParams[11].getValue();
2018cdf0e10cSrcweir 
2019cdf0e10cSrcweir 				sal_Int32 _long= *( sal_Int32*) seqOutParams[12].getValue();
2020cdf0e10cSrcweir 
2021cdf0e10cSrcweir 			}
2022cdf0e10cSrcweir 			break;
2023cdf0e10cSrcweir 		}
2024cdf0e10cSrcweir 	case 303:
2025cdf0e10cSrcweir 		// in parameter
2026cdf0e10cSrcweir //	void inValues( [in] char aChar, [in] long aLong, [in] string aString);
2027cdf0e10cSrcweir 		{
2028cdf0e10cSrcweir 			Reference<XInterface> xIntFact = m_rFactory->createInstance(
2029cdf0e10cSrcweir 				L"com.sun.star.bridge.oleautomation.Factory");
2030cdf0e10cSrcweir 
2031cdf0e10cSrcweir 			Reference<XMultiServiceFactory> oleFact(xIntFact, UNO_QUERY);
2032cdf0e10cSrcweir 
2033cdf0e10cSrcweir 			Reference<XInterface> xIntCallback= oleFact->createInstance(L"XCallback_Impl.Callback");
2034cdf0e10cSrcweir 			Reference<XInvocation> xInv( xIntCallback, UNO_QUERY);
2035cdf0e10cSrcweir 			Sequence<sal_Int16> seqIndizes;
2036cdf0e10cSrcweir 			Sequence<Any> seqOutParams;
2037cdf0e10cSrcweir 
2038cdf0e10cSrcweir 			Any arAny[3];
2039cdf0e10cSrcweir 			sal_Unicode aChar=L'a';
2040cdf0e10cSrcweir 			arAny[0] <<= aChar;
2041cdf0e10cSrcweir 			sal_Int32 aLong= 0xffffffff;
2042cdf0e10cSrcweir 			arAny[1] <<= aLong;
2043cdf0e10cSrcweir 			OUString aString(L" a string parameter");
2044cdf0e10cSrcweir 			arAny[2] <<= aString;
2045cdf0e10cSrcweir 
2046cdf0e10cSrcweir 			xInv->invoke( OUString( L"inValues"), Sequence<Any>(arAny,3), seqIndizes, seqOutParams);
2047cdf0e10cSrcweir 
2048cdf0e10cSrcweir 			break;
2049cdf0e10cSrcweir 		}
2050cdf0e10cSrcweir 	// ############################################################################
2051cdf0e10cSrcweir 	// Attributes
2052cdf0e10cSrcweir 	// ############################################################################
2053cdf0e10cSrcweir 
2054cdf0e10cSrcweir 	case 400:
2055cdf0e10cSrcweir 		Reference<XSimple> simple=	xCallback->getsimple();
2056cdf0e10cSrcweir 		simple->func(L"OleTest calls on XSimple");
2057cdf0e10cSrcweir 		break;
2058cdf0e10cSrcweir 
2059cdf0e10cSrcweir 
2060cdf0e10cSrcweir 
2061cdf0e10cSrcweir 
2062cdf0e10cSrcweir 	}
2063cdf0e10cSrcweir 
2064cdf0e10cSrcweir }
2065cdf0e10cSrcweir 
setObject(const Reference<XInterface> & val)2066cdf0e10cSrcweir void SAL_CALL OComponent::setObject( const Reference< XInterface >& val ) throw (RuntimeException)
2067cdf0e10cSrcweir {
2068cdf0e10cSrcweir     m_xIntIdentity= val;
2069cdf0e10cSrcweir }
2070cdf0e10cSrcweir 
isSame(const Reference<XInterface> & val)2071cdf0e10cSrcweir sal_Bool SAL_CALL OComponent::isSame( const Reference< XInterface >& val ) throw (RuntimeException)
2072cdf0e10cSrcweir {
2073cdf0e10cSrcweir     if( m_xIntIdentity == val)
2074cdf0e10cSrcweir         return sal_True;
2075cdf0e10cSrcweir     else
2076cdf0e10cSrcweir         return sal_False;
2077cdf0e10cSrcweir }
2078cdf0e10cSrcweir 
getThis()2079cdf0e10cSrcweir Reference< XInterface > SAL_CALL OComponent::getThis(  ) throw (RuntimeException)
2080cdf0e10cSrcweir {
2081cdf0e10cSrcweir //    return Reference<XInterface>(static_cast<XIdentity*>(this), UNO_QUERY);
2082cdf0e10cSrcweir 	Reference<XInterface> ret(static_cast<XIdentity*>(this), UNO_QUERY);
2083cdf0e10cSrcweir 	return ret;
2084cdf0e10cSrcweir }
2085cdf0e10cSrcweir 
disposing(const::com::sun::star::lang::EventObject &)2086cdf0e10cSrcweir void SAL_CALL EventListener::disposing( const ::com::sun::star::lang::EventObject& ) throw (RuntimeException)
2087cdf0e10cSrcweir {
2088cdf0e10cSrcweir     bCalled= sal_True;
2089cdf0e10cSrcweir }
2090cdf0e10cSrcweir 
2091cdf0e10cSrcweir // XSimple --------------------------------------------------------------------------
func(const OUString & message)2092cdf0e10cSrcweir void SAL_CALL OComponent::func( const OUString &message)throw(::com::sun::star::uno::RuntimeException)
2093cdf0e10cSrcweir {
2094cdf0e10cSrcweir 	USES_CONVERSION;
2095cdf0e10cSrcweir 
2096cdf0e10cSrcweir 	MessageBox( NULL, W2T( message.getStr()), _T("OleTest: XSimple::func"), MB_OK);
2097cdf0e10cSrcweir }
2098cdf0e10cSrcweir // XSimple --------------------------------------------------------------------------
getName()2099cdf0e10cSrcweir OUString SAL_CALL OComponent::getName()throw(::com::sun::star::uno::RuntimeException)
2100cdf0e10cSrcweir {
2101cdf0e10cSrcweir 	return L"XSimple";
2102cdf0e10cSrcweir }
testInterface2(const Reference<XSimple> & xSimple,sal_Int32 mode)2103cdf0e10cSrcweir void SAL_CALL OComponent::testInterface2(  const Reference< XSimple >& xSimple, sal_Int32 mode ) throw(RuntimeException)
2104cdf0e10cSrcweir {
2105cdf0e10cSrcweir 	switch( mode)
2106cdf0e10cSrcweir 	{
2107cdf0e10cSrcweir 	case 0:
2108cdf0e10cSrcweir 		{
2109cdf0e10cSrcweir 		xSimple->func( L"OleTest is calling XSimple");
2110cdf0e10cSrcweir 		Reference<XSimple2> xSimple2( xSimple, UNO_QUERY);
2111cdf0e10cSrcweir 		if( xSimple2.is())
2112cdf0e10cSrcweir 			xSimple2->func2( L"OleTest is calling XSimple2");
2113cdf0e10cSrcweir 		Reference<XSimple3> xSimple3( xSimple, UNO_QUERY);
2114cdf0e10cSrcweir 		if( xSimple3.is())
2115cdf0e10cSrcweir 			xSimple3->func3( L"OleTest is calling XSimple3");
2116cdf0e10cSrcweir 
2117cdf0e10cSrcweir 		break;
2118cdf0e10cSrcweir 		}
2119cdf0e10cSrcweir 	}
2120cdf0e10cSrcweir }
2121