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