diff options
Diffstat (limited to 'include/com')
-rw-r--r-- | include/com/sun/star/uno/Type.h | 43 | ||||
-rw-r--r-- | include/com/sun/star/uno/Type.hxx | 117 |
2 files changed, 0 insertions, 160 deletions
diff --git a/include/com/sun/star/uno/Type.h b/include/com/sun/star/uno/Type.h index 0a6a21b83b6d..1b3775f259fb 100644 --- a/include/com/sun/star/uno/Type.h +++ b/include/com/sun/star/uno/Type.h @@ -377,49 +377,6 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const float * ) */ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const double * ) SAL_THROW(()); -/** Array template function to get meta type for one-dimensional arrays. - - @param pT array pointer - @return type of array -*/ -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType1( T * pT ) SAL_THROW(()); -/** Array template function to get meta type for two-dimensional arrays. - - @param pT array pointer - @return type of array -*/ -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType2( T * pT ) SAL_THROW(()); -/** Array template function to get meta type for three-dimensional arrays. - - @param pT array pointer - @return type of array -*/ -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType3( T * pT ) SAL_THROW(()); -/** Array template function to get meta type for four-dimensional arrays. - - @param pT array pointer - @return type of array -*/ -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType4( T * pT ) SAL_THROW(()); -/** Array template function to get meta type for five-dimensional arrays. - - @param pT array pointer - @return type of array -*/ -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType5( T * pT ) SAL_THROW(()); -/** Array template function to get meta type for six-dimensional arrays. - - @param pT array pointer - @return type of array -*/ -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType6( T * pT ) SAL_THROW(()); - /** Gets the meta type of an IDL type. The difference between this function template (with a type parameter) and diff --git a/include/com/sun/star/uno/Type.hxx b/include/com/sun/star/uno/Type.hxx index 7838c581ad22..e32a64594bdc 100644 --- a/include/com/sun/star/uno/Type.hxx +++ b/include/com/sun/star/uno/Type.hxx @@ -186,123 +186,6 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( SAL_UNUSED_PARA return ::cppu::UnoType< double >::get(); } -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType1( T * pT ) SAL_THROW(()) -{ - if (! ::com::sun::star::uno::Array< T >::s_pType) - { - const ::com::sun::star::uno::Type & rElementType = - ::cppu::getTypeFavourUnsigned( *pT ); - sal_Int32 size = sizeof( **pT ); - sal_Int32 dim1 = sizeof( *pT ) / size; - ::typelib_static_array_type_init( - & ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(), - 1, dim1 ); - } - return * reinterpret_cast< const ::com::sun::star::uno::Type * >( - & ::com::sun::star::uno::Array< T >::s_pType ); -} - -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType2( T * pT ) SAL_THROW(()) -{ - if (! ::com::sun::star::uno::Array< T >::s_pType) - { - const ::com::sun::star::uno::Type & rElementType = - ::cppu::getTypeFavourUnsigned( **pT ); - sal_Int32 size = sizeof( ***pT ); - sal_Int32 dim2 = sizeof( **pT ) / size; - sal_Int32 dim1 = sizeof( *pT ) / dim2 / size; - ::typelib_static_array_type_init( - & ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(), - 2, dim1, dim2 ); - } - return * reinterpret_cast< const ::com::sun::star::uno::Type * >( - & ::com::sun::star::uno::Array< T >::s_pType ); -} - -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType3( T * pT ) SAL_THROW(()) -{ - if (! ::com::sun::star::uno::Array< T >::s_pType) - { - const ::com::sun::star::uno::Type & rElementType = - ::cppu::getTypeFavourUnsigned( ***pT ); - sal_Int32 size = sizeof( ****pT ); - sal_Int32 dim3 = sizeof( ***pT ) / size; - sal_Int32 dim2 = sizeof( **pT ) / dim3 / size; - sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3)/ size; - ::typelib_static_array_type_init( - & ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(), - 3, dim1, dim2, dim3 ); - } - return * reinterpret_cast< const ::com::sun::star::uno::Type * >( - & ::com::sun::star::uno::Array< T >::s_pType ); -} - -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType4( T * pT ) SAL_THROW(()) -{ - if (! ::com::sun::star::uno::Array< T >::s_pType) - { - const ::com::sun::star::uno::Type & rElementType = - ::cppu::getTypeFavourUnsigned( ****pT ); - sal_Int32 size = sizeof( *****pT ); - sal_Int32 dim4 = sizeof( ****pT ) / size; - sal_Int32 dim3 = sizeof( ***pT ) / dim4 / size; - sal_Int32 dim2 = sizeof( **pT ) / (dim3 * dim4) / size; - sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3 * dim4) / size; - ::typelib_static_array_type_init( - & ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(), - 4, dim1, dim2, dim3, dim4 ); - } - return * reinterpret_cast< const ::com::sun::star::uno::Type * >( - & ::com::sun::star::uno::Array< T >::s_pType ); -} - -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType5( T * pT ) SAL_THROW(()) -{ - if (! ::com::sun::star::uno::Array< T >::s_pType) - { - const ::com::sun::star::uno::Type & rElementType = - ::cppu::getTypeFavourUnsigned( *****pT ); - sal_Int32 size = sizeof( ******pT ); - sal_Int32 dim5 = sizeof( *****pT ) / size; - sal_Int32 dim4 = sizeof( ****pT ) / dim5 / size; - sal_Int32 dim3 = sizeof( ***pT ) / (dim4 * dim5) / size; - sal_Int32 dim2 = sizeof( **pT ) / (dim3 * dim4 * dim5) / size; - sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3 * dim4 * dim5) / size; - ::typelib_static_array_type_init( - & ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(), - 5, dim1, dim2, dim3, dim4, dim5 ); - } - return * reinterpret_cast< const ::com::sun::star::uno::Type * >( - & ::com::sun::star::uno::Array< T >::s_pType ); -} - -template< class T > -inline const ::com::sun::star::uno::Type & SAL_CALL getCppuArrayType6( T * pT ) SAL_THROW(()) -{ - if (! ::com::sun::star::uno::Array< T >::s_pType) - { - const ::com::sun::star::uno::Type & rElementType = - ::cppu::getTypeFavourUnsigned( ******pT ); - sal_Int32 size = sizeof( *******pT ); - sal_Int32 dim6 = sizeof( ******pT ) / size; - sal_Int32 dim5 = sizeof( *****pT ) / dim6 / size; - sal_Int32 dim4 = sizeof( ****pT ) / (dim5 * dim6) / size; - sal_Int32 dim3 = sizeof( ***pT ) / (dim4 * dim5 * dim6) / size; - sal_Int32 dim2 = sizeof( **pT ) / (dim3 * dim4 * dim5 * dim6) / size; - sal_Int32 dim1 = sizeof( *pT ) / (dim2 * dim3 * dim4 * dim5 * dim6) / size; - ::typelib_static_array_type_init( - & ::com::sun::star::uno::Array< T >::s_pType, rElementType.getTypeLibType(), - 6, dim1, dim2, dim3, dim4, dim5, dim6 ); - } - return * reinterpret_cast< const ::com::sun::star::uno::Type * >( - & ::com::sun::star::uno::Array< T >::s_pType ); -} - template< typename T > inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType() SAL_THROW(()) { |