LCOV - code coverage report
Current view: top level - libreoffice/solver/unxlngi6.pro/inc/udkapi/com/sun/star/beans - XPropertyAccess.hpp (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 58 58 100.0 %
Date: 2012-12-27 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : #ifndef INCLUDED_COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP
       2             : #define INCLUDED_COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP
       3             : 
       4             : #include "sal/config.h"
       5             : 
       6             : #include "com/sun/star/beans/XPropertyAccess.hdl"
       7             : 
       8             : #include "com/sun/star/lang/WrappedTargetException.hpp"
       9             : #include "com/sun/star/beans/UnknownPropertyException.hpp"
      10             : #include "com/sun/star/beans/PropertyVetoException.hpp"
      11             : #include "com/sun/star/uno/RuntimeException.hpp"
      12             : #include "com/sun/star/beans/PropertyValue.hpp"
      13             : #include "com/sun/star/lang/IllegalArgumentException.hpp"
      14             : #include "com/sun/star/uno/XInterface.hpp"
      15             : #include "com/sun/star/uno/Reference.hxx"
      16             : #include "com/sun/star/uno/Sequence.hxx"
      17             : #include "com/sun/star/uno/Type.hxx"
      18             : #include "cppu/unotype.hxx"
      19             : #include "osl/mutex.hxx"
      20             : #include "rtl/instance.hxx"
      21             : 
      22             : namespace com { namespace sun { namespace star { namespace beans { namespace detail {
      23             : 
      24             : struct theXPropertyAccessType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXPropertyAccessType >
      25             : {
      26          18 :     ::com::sun::star::uno::Type * operator()() const
      27             :     {
      28          18 :         ::rtl::OUString sTypeName( "com.sun.star.beans.XPropertyAccess" );
      29             : 
      30             :         // Start inline typedescription generation
      31          18 :         typelib_InterfaceTypeDescription * pTD = 0;
      32             : 
      33             :         typelib_TypeDescriptionReference * aSuperTypes[1];
      34          18 :         aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< css::uno::XInterface > >::get().getTypeLibType();
      35          18 :         typelib_TypeDescriptionReference * pMembers[2] = { 0,0 };
      36          18 :         ::rtl::OUString sMethodName0( "com.sun.star.beans.XPropertyAccess::getPropertyValues" );
      37             :         typelib_typedescriptionreference_new( &pMembers[0],
      38             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      39          18 :                                               sMethodName0.pData );
      40          18 :         ::rtl::OUString sMethodName1( "com.sun.star.beans.XPropertyAccess::setPropertyValues" );
      41             :         typelib_typedescriptionreference_new( &pMembers[1],
      42             :                                               (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
      43          18 :                                               sMethodName1.pData );
      44             : 
      45             :         typelib_typedescription_newMIInterface(
      46             :             &pTD,
      47             :             sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
      48             :             1, aSuperTypes,
      49             :             2,
      50          18 :             pMembers );
      51             : 
      52          18 :         typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
      53          18 :         typelib_typedescriptionreference_release( pMembers[0] );
      54          18 :         typelib_typedescriptionreference_release( pMembers[1] );
      55          18 :         typelib_typedescription_release( (typelib_TypeDescription*)pTD );
      56             : 
      57          18 :         return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
      58             :     }
      59             : };
      60             : 
      61             : } } } } }
      62             : 
      63             : namespace com { namespace sun { namespace star { namespace beans {
      64             : 
      65          21 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER css::beans::XPropertyAccess const *) {
      66          21 :     const ::com::sun::star::uno::Type &rRet = *detail::theXPropertyAccessType::get();
      67             :     // End inline typedescription generation
      68             :     static bool bInitStarted = false;
      69          21 :     if (!bInitStarted)
      70             :     {
      71          18 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
      72          18 :         if (!bInitStarted)
      73             :         {
      74             :             OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
      75          18 :             bInitStarted = true;
      76          18 :             ::cppu::UnoType< css::uno::RuntimeException >::get();
      77          18 :             ::cppu::UnoType< ::cppu::UnoSequenceType< css::beans::PropertyValue > >::get();
      78          18 :             ::cppu::UnoType< css::beans::UnknownPropertyException >::get();
      79          18 :             ::cppu::UnoType< css::beans::PropertyVetoException >::get();
      80          18 :             ::cppu::UnoType< css::lang::IllegalArgumentException >::get();
      81          18 :             ::cppu::UnoType< css::lang::WrappedTargetException >::get();
      82             : 
      83          18 :             typelib_InterfaceMethodTypeDescription * pMethod = 0;
      84             :             {
      85          18 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.uno.RuntimeException" );
      86          18 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
      87          18 :                 ::rtl::OUString sReturnType0( "[]com.sun.star.beans.PropertyValue" );
      88          18 :                 ::rtl::OUString sMethodName0( "com.sun.star.beans.XPropertyAccess::getPropertyValues" );
      89             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
      90             :                     3, sal_False,
      91             :                     sMethodName0.pData,
      92             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE, sReturnType0.pData,
      93             :                     0, 0,
      94          18 :                     1, the_Exceptions );
      95          18 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
      96             :             }
      97             :             {
      98             :                 typelib_Parameter_Init aParameters[1];
      99          18 :                 ::rtl::OUString sParamName0( "aProps" );
     100          18 :                 ::rtl::OUString sParamType0( "[]com.sun.star.beans.PropertyValue" );
     101          18 :                 aParameters[0].pParamName = sParamName0.pData;
     102          18 :                 aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_SEQUENCE;
     103          18 :                 aParameters[0].pTypeName = sParamType0.pData;
     104          18 :                 aParameters[0].bIn = sal_True;
     105          18 :                 aParameters[0].bOut = sal_False;
     106          18 :                 ::rtl::OUString the_ExceptionName0( "com.sun.star.beans.UnknownPropertyException" );
     107          18 :                 ::rtl::OUString the_ExceptionName1( "com.sun.star.beans.PropertyVetoException" );
     108          18 :                 ::rtl::OUString the_ExceptionName2( "com.sun.star.lang.IllegalArgumentException" );
     109          18 :                 ::rtl::OUString the_ExceptionName3( "com.sun.star.lang.WrappedTargetException" );
     110          18 :                 ::rtl::OUString the_ExceptionName4( "com.sun.star.uno.RuntimeException" );
     111          18 :                 rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData, the_ExceptionName3.pData, the_ExceptionName4.pData };
     112          18 :                 ::rtl::OUString sReturnType1( "void" );
     113          18 :                 ::rtl::OUString sMethodName1( "com.sun.star.beans.XPropertyAccess::setPropertyValues" );
     114             :                 typelib_typedescription_newInterfaceMethod( &pMethod,
     115             :                     4, sal_False,
     116             :                     sMethodName1.pData,
     117             :                     (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType1.pData,
     118             :                     1, aParameters,
     119          18 :                     5, the_Exceptions );
     120          18 :                 typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
     121             :             }
     122          18 :             typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
     123          18 :         }
     124             :     }
     125             :     else
     126             :     {
     127             :         OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
     128             :     }
     129          21 :     return rRet;
     130             : }
     131             : 
     132             : } } } }
     133             : 
     134          21 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< css::beans::XPropertyAccess > const *) SAL_THROW(()) {
     135          21 :     return ::cppu::UnoType< ::com::sun::star::uno::Reference< css::beans::XPropertyAccess > >::get();
     136             : }
     137             : 
     138          21 : ::com::sun::star::uno::Type const & css::beans::XPropertyAccess::static_type(SAL_UNUSED_PARAMETER void *) {
     139          21 :     return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< css::beans::XPropertyAccess > * >(0));
     140             : }
     141             : 
     142             : #endif // INCLUDED_COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP

Generated by: LCOV version 1.10