LCOV - code coverage report
Current view: top level - testtools/source/bridgetest - cppobj.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 469 483 97.1 %
Date: 2012-08-25 Functions: 111 114 97.4 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 434 872 49.8 %

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

Generated by: LCOV version 1.10