LCOV - code coverage report
Current view: top level - libreoffice/workdir/unxlngi6.pro/UnoApiHeadersTarget/bridgetest/normal/test/testtools/bridgetest - Constructors.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 51 65 78.5 %
Date: 2012-12-27 Functions: 2 2 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_TEST_TESTTOOLS_BRIDGETEST_CONSTRUCTORS_HPP
       2             : #define INCLUDED_TEST_TESTTOOLS_BRIDGETEST_CONSTRUCTORS_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include <cassert>
       7             : 
       8             : #include "com/sun/star/uno/Exception.hpp"
       9             : #include "com/sun/star/uno/XComponentContext.hpp"
      10             : #include "com/sun/star/uno/RuntimeException.hpp"
      11             : #include "test/testtools/bridgetest/TestPolyStruct.hpp"
      12             : #include "test/testtools/bridgetest/BadConstructorArguments.hpp"
      13             : #include "com/sun/star/uno/DeploymentException.hpp"
      14             : #include "test/testtools/bridgetest/TestStruct.hpp"
      15             : #include "com/sun/star/uno/XInterface.hpp"
      16             : #include "test/testtools/bridgetest/TestEnum.hpp"
      17             : #include "com/sun/star/uno/Any.hxx"
      18             : #include "com/sun/star/uno/Reference.hxx"
      19             : #include "com/sun/star/uno/Sequence.hxx"
      20             : #include "com/sun/star/uno/Type.hxx"
      21             : #include "cppu/unotype.hxx"
      22             : #include "rtl/ustring.h"
      23             : #include "rtl/ustring.hxx"
      24             : #include "sal/types.h"
      25             : 
      26             : namespace test { namespace testtools { namespace bridgetest {
      27             : 
      28             : class Constructors {
      29             : public:
      30           1 :     static ::com::sun::star::uno::Reference< css::uno::XInterface > create1(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context, ::sal_Bool arg0, ::sal_Int8 arg1, ::sal_Int16 arg2, ::sal_uInt16 arg3, ::sal_Int32 arg4, ::sal_uInt32 arg5, ::sal_Int64 arg6, ::sal_uInt64 arg7, float arg8, double arg9, ::sal_Unicode arg10, const ::rtl::OUString& arg11, const ::com::sun::star::uno::Type& arg12, const ::com::sun::star::uno::Any& arg13, const ::com::sun::star::uno::Sequence< ::sal_Bool >& arg14, const ::com::sun::star::uno::Sequence< ::sal_Int8 >& arg15, const ::com::sun::star::uno::Sequence< ::sal_Int16 >& arg16, const ::com::sun::star::uno::Sequence< ::sal_uInt16 >& arg17, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& arg18, const ::com::sun::star::uno::Sequence< ::sal_uInt32 >& arg19, const ::com::sun::star::uno::Sequence< ::sal_Int64 >& arg20, const ::com::sun::star::uno::Sequence< ::sal_uInt64 >& arg21, const ::com::sun::star::uno::Sequence< float >& arg22, const ::com::sun::star::uno::Sequence< double >& arg23, const ::com::sun::star::uno::Sequence< ::sal_Unicode >& arg24, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& arg25, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >& arg26, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& arg27, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::sal_Bool > >& arg28, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& arg29, const ::com::sun::star::uno::Sequence< ::test::testtools::bridgetest::TestEnum >& arg30, const ::com::sun::star::uno::Sequence< ::test::testtools::bridgetest::TestStruct >& arg31, const ::com::sun::star::uno::Sequence< ::test::testtools::bridgetest::TestPolyStruct< ::sal_Bool > >& arg32, const ::com::sun::star::uno::Sequence< ::test::testtools::bridgetest::TestPolyStruct< ::com::sun::star::uno::Any > >& arg33, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< css::uno::XInterface > >& arg34, ::test::testtools::bridgetest::TestEnum arg35, const ::test::testtools::bridgetest::TestStruct& arg36, const ::test::testtools::bridgetest::TestPolyStruct< ::sal_Bool >& arg37, const ::test::testtools::bridgetest::TestPolyStruct< ::com::sun::star::uno::Any >& arg38, const ::com::sun::star::uno::Reference< css::uno::XInterface >& arg39) {
      31             :         assert(the_context.is());
      32           1 :         ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > the_arguments(40);
      33           1 :         the_arguments[0] <<= arg0;
      34           1 :         the_arguments[1] <<= arg1;
      35           1 :         the_arguments[2] <<= arg2;
      36           1 :         the_arguments[3] <<= arg3;
      37           1 :         the_arguments[4] <<= arg4;
      38           1 :         the_arguments[5] <<= arg5;
      39           1 :         the_arguments[6] <<= arg6;
      40           1 :         the_arguments[7] <<= arg7;
      41           1 :         the_arguments[8] <<= arg8;
      42           1 :         the_arguments[9] <<= arg9;
      43           1 :         the_arguments[10] = ::com::sun::star::uno::Any(&arg10, ::cppu::UnoType< ::cppu::UnoCharType >::get());
      44           1 :         the_arguments[11] <<= arg11;
      45           1 :         the_arguments[12] <<= arg12;
      46           1 :         the_arguments[13] <<= arg13;
      47           1 :         the_arguments[14] <<= arg14;
      48           1 :         the_arguments[15] <<= arg15;
      49           1 :         the_arguments[16] <<= arg16;
      50           1 :         the_arguments[17] <<= arg17;
      51           1 :         the_arguments[18] <<= arg18;
      52           1 :         the_arguments[19] <<= arg19;
      53           1 :         the_arguments[20] <<= arg20;
      54           1 :         the_arguments[21] <<= arg21;
      55           1 :         the_arguments[22] <<= arg22;
      56           1 :         the_arguments[23] <<= arg23;
      57           1 :         the_arguments[24] = ::com::sun::star::uno::Any(&arg24, ::cppu::UnoType< ::cppu::UnoSequenceType< ::cppu::UnoCharType > >::get());
      58           1 :         the_arguments[25] <<= arg25;
      59           1 :         the_arguments[26] <<= arg26;
      60           1 :         the_arguments[27] <<= arg27;
      61           1 :         the_arguments[28] <<= arg28;
      62           1 :         the_arguments[29] <<= arg29;
      63           1 :         the_arguments[30] <<= arg30;
      64           1 :         the_arguments[31] <<= arg31;
      65           1 :         the_arguments[32] <<= arg32;
      66           1 :         the_arguments[33] <<= arg33;
      67           1 :         the_arguments[34] <<= arg34;
      68           1 :         the_arguments[35] <<= arg35;
      69           1 :         the_arguments[36] <<= arg36;
      70           1 :         the_arguments[37] <<= arg37;
      71           1 :         the_arguments[38] <<= arg38;
      72           1 :         the_arguments[39] <<= arg39;
      73           1 :         ::com::sun::star::uno::Reference< css::uno::XInterface > the_instance;
      74             :         try {
      75           1 :             the_instance = ::com::sun::star::uno::Reference< css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext(::rtl::OUString( "test.testtools.bridgetest.Constructors" ), the_arguments, the_context), ::com::sun::star::uno::UNO_QUERY);
      76           0 :         } catch (::com::sun::star::uno::RuntimeException &) {
      77           0 :             throw;
      78           0 :         } catch (::test::testtools::bridgetest::BadConstructorArguments &) {
      79           0 :             throw;
      80           0 :         } catch (::com::sun::star::uno::Exception & the_exception) {
      81           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service test.testtools.bridgetest.Constructors of type com.sun.star.uno.XInterface: " ) + the_exception.Message, the_context);
      82             :         }
      83           1 :         if (!the_instance.is()) {
      84           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service test.testtools.bridgetest.Constructors of type com.sun.star.uno.XInterface" ), the_context);
      85             :         }
      86           1 :         return the_instance;
      87             :     }
      88             : 
      89           1 :     static ::com::sun::star::uno::Reference< css::uno::XInterface > create2(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & the_context, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& args) {
      90             :         assert(the_context.is());
      91           1 :         ::com::sun::star::uno::Reference< css::uno::XInterface > the_instance;
      92             :         try {
      93           1 :             the_instance = ::com::sun::star::uno::Reference< css::uno::XInterface >(the_context->getServiceManager()->createInstanceWithArgumentsAndContext(::rtl::OUString( "test.testtools.bridgetest.Constructors" ), args, the_context), ::com::sun::star::uno::UNO_QUERY);
      94           0 :         } catch (::com::sun::star::uno::RuntimeException &) {
      95           0 :             throw;
      96           0 :         } catch (::test::testtools::bridgetest::BadConstructorArguments &) {
      97           0 :             throw;
      98           0 :         } catch (::com::sun::star::uno::Exception & the_exception) {
      99           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service test.testtools.bridgetest.Constructors of type com.sun.star.uno.XInterface: " ) + the_exception.Message, the_context);
     100             :         }
     101           1 :         if (!the_instance.is()) {
     102           0 :             throw ::com::sun::star::uno::DeploymentException(::rtl::OUString( "component context fails to supply service test.testtools.bridgetest.Constructors of type com.sun.star.uno.XInterface" ), the_context);
     103             :         }
     104           1 :         return the_instance;
     105             :     }
     106             : 
     107             : private:
     108             :     Constructors(); // not implemented
     109             :     Constructors(Constructors &); // not implemented
     110             :     ~Constructors(); // not implemented
     111             :     void operator =(Constructors); // not implemented
     112             : };
     113             : 
     114             : } } }
     115             : 
     116             : #endif // INCLUDED_TEST_TESTTOOLS_BRIDGETEST_CONSTRUCTORS_HPP

Generated by: LCOV version 1.10