diff options
Diffstat (limited to 'cppu')
92 files changed, 471 insertions, 212 deletions
diff --git a/cppu/inc/com/sun/star/uno/Any.h b/cppu/inc/com/sun/star/uno/Any.h index c9e8aed205e1..eb29273c16aa 100644 --- a/cppu/inc/com/sun/star/uno/Any.h +++ b/cppu/inc/com/sun/star/uno/Any.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -381,3 +382,5 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType( const ::com::su } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Any.hxx b/cppu/inc/com/sun/star/uno/Any.hxx index 44508556698c..8ea8c437dde2 100644 --- a/cppu/inc/com/sun/star/uno/Any.hxx +++ b/cppu/inc/com/sun/star/uno/Any.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -234,7 +235,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, { if (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass) { - value = (* reinterpret_cast< const sal_Bool * >( &rAny.pReserved ) != sal_False); + value = (* reinterpret_cast< const sal_Bool * >( rAny.pData ) != sal_False); return sal_True; } return sal_False; @@ -243,7 +244,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, inline sal_Bool SAL_CALL operator == ( const Any & rAny, const sal_Bool & value ) SAL_THROW( () ) { return (typelib_TypeClass_BOOLEAN == rAny.pType->eTypeClass && - (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( &rAny.pReserved ) != sal_False)); + (value != sal_False) == (* reinterpret_cast< const sal_Bool * >( rAny.pData ) != sal_False)); } //______________________________________________________________________________ @@ -254,7 +255,7 @@ inline sal_Bool SAL_CALL operator >>= ( Any const & rAny, bool & value ) if (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN) { value = *reinterpret_cast< sal_Bool const * >( - &rAny.pReserved ) != sal_False; + rAny.pData ) != sal_False; return true; } return false; @@ -267,7 +268,7 @@ inline sal_Bool SAL_CALL operator == ( Any const & rAny, bool const & value ) { return (rAny.pType->eTypeClass == typelib_TypeClass_BOOLEAN && (value == - (*reinterpret_cast< sal_Bool const * >( &rAny.pReserved ) + (*reinterpret_cast< sal_Bool const * >( rAny.pData ) != sal_False))); } @@ -277,7 +278,7 @@ inline sal_Bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & rAny, { if (typelib_TypeClass_BYTE == rAny.pType->eTypeClass) { - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; } return sal_False; @@ -289,11 +290,11 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int16 & value ) SA switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; default: return sal_False; @@ -305,11 +306,11 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt16 & value ) S switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; default: return sal_False; @@ -322,17 +323,17 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int32 & value ) SA switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_LONG: case typelib_TypeClass_UNSIGNED_LONG: - value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int32 * >( rAny.pData ); return sal_True; default: return sal_False; @@ -344,17 +345,17 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt32 & value ) S switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_LONG: case typelib_TypeClass_UNSIGNED_LONG: - value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData ); return sal_True; default: return sal_False; @@ -367,26 +368,24 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_Int64 & value ) SA switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_LONG: - value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int32 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_LONG: - value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData ); return sal_True; case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: - value = * reinterpret_cast< const sal_Int64 * >( - (sizeof(void *) >= sizeof(sal_Int64)) ? (void *)&rAny.pReserved : rAny.pData ); + value = * reinterpret_cast< const sal_Int64 * >( rAny.pData ); return sal_True; - default: return sal_False; } @@ -397,26 +396,24 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, sal_uInt64 & value ) S switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_LONG: - value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int32 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_LONG: - value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData ); return sal_True; case typelib_TypeClass_HYPER: case typelib_TypeClass_UNSIGNED_HYPER: - value = * reinterpret_cast< const sal_uInt64 * >( - (sizeof(void *) >= sizeof(sal_uInt64)) ? (void *)&rAny.pReserved : rAny.pData ); + value = * reinterpret_cast< const sal_uInt64 * >( rAny.pData ); return sal_True; - default: return sal_False; } @@ -428,19 +425,17 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, float & value ) SAL_TH switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_FLOAT: - value = * reinterpret_cast< const float * >( - (sizeof(void *) >= sizeof(float)) ? (void *)&rAny.pReserved : rAny.pData ); + value = * reinterpret_cast< const float * >( rAny.pData ); return sal_True; - default: return sal_False; } @@ -452,29 +447,26 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, double & value ) SAL_T switch (rAny.pType->eTypeClass) { case typelib_TypeClass_BYTE: - value = * reinterpret_cast< const sal_Int8 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int8 * >( rAny.pData ); return sal_True; case typelib_TypeClass_SHORT: - value = * reinterpret_cast< const sal_Int16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_SHORT: - value = * reinterpret_cast< const sal_uInt16 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt16 * >( rAny.pData ); return sal_True; case typelib_TypeClass_LONG: - value = * reinterpret_cast< const sal_Int32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_Int32 * >( rAny.pData ); return sal_True; case typelib_TypeClass_UNSIGNED_LONG: - value = * reinterpret_cast< const sal_uInt32 * >( &rAny.pReserved ); + value = * reinterpret_cast< const sal_uInt32 * >( rAny.pData ); return sal_True; case typelib_TypeClass_FLOAT: - value = * reinterpret_cast< const float * >( - (sizeof(void *) >= sizeof(float)) ? (void *)&rAny.pReserved : rAny.pData ); + value = * reinterpret_cast< const float * >( rAny.pData ); return sal_True; case typelib_TypeClass_DOUBLE: - value = * reinterpret_cast< const double * >( - (sizeof(void *) >= sizeof(double)) ? (void *)&rAny.pReserved : rAny.pData ); + value = * reinterpret_cast< const double * >( rAny.pData ); return sal_True; - default: return sal_False; } @@ -485,7 +477,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & valu { if (typelib_TypeClass_STRING == rAny.pType->eTypeClass) { - value = * reinterpret_cast< const ::rtl::OUString * >( &rAny.pReserved ); + value = * reinterpret_cast< const ::rtl::OUString * >( rAny.pData ); return sal_True; } return sal_False; @@ -494,7 +486,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, ::rtl::OUString & valu inline sal_Bool SAL_CALL operator == ( const Any & rAny, const ::rtl::OUString & value ) SAL_THROW( () ) { return (typelib_TypeClass_STRING == rAny.pType->eTypeClass && - value.equals( * reinterpret_cast< const ::rtl::OUString * >( &rAny.pReserved ) )); + value.equals( * reinterpret_cast< const ::rtl::OUString * >( rAny.pData ) )); } // type //__________________________________________________________________________________________________ @@ -502,7 +494,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THR { if (typelib_TypeClass_TYPE == rAny.pType->eTypeClass) { - value = * reinterpret_cast< const Type * >( &rAny.pReserved ); + value = * reinterpret_cast< const Type * >( rAny.pData ); return sal_True; } return sal_False; @@ -511,7 +503,7 @@ inline sal_Bool SAL_CALL operator >>= ( const Any & rAny, Type & value ) SAL_THR inline sal_Bool SAL_CALL operator == ( const Any & rAny, const Type & value ) SAL_THROW( () ) { return (typelib_TypeClass_TYPE == rAny.pType->eTypeClass && - value.equals( * reinterpret_cast< const Type * >( &rAny.pReserved ) )); + value.equals( * reinterpret_cast< const Type * >( rAny.pData ) )); } // any //__________________________________________________________________________________________________ @@ -531,7 +523,7 @@ inline sal_Bool SAL_CALL operator == ( const Any & rAny, const BaseReference & v { if (typelib_TypeClass_INTERFACE == rAny.pType->eTypeClass) { - return reinterpret_cast< const BaseReference * >( &rAny.pReserved )->operator == ( value ); + return reinterpret_cast< const BaseReference * >( rAny.pData )->operator == ( value ); } return sal_False; } @@ -587,3 +579,5 @@ sal_uInt16 Any::get<sal_uInt16>() const; } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Reference.h b/cppu/inc/com/sun/star/uno/Reference.h index f792556dcb57..071cadcfde7b 100644 --- a/cppu/inc/com/sun/star/uno/Reference.h +++ b/cppu/inc/com/sun/star/uno/Reference.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -239,13 +240,13 @@ class Reference : public BaseReference public: // these are here to force memory de/allocation to sal lib. /** @internal */ - inline static void * SAL_CALL operator new ( size_t nSize ) SAL_THROW( () ) + inline static void * SAL_CALL operator new ( ::size_t nSize ) SAL_THROW( () ) { return ::rtl_allocateMemory( nSize ); } /** @internal */ inline static void SAL_CALL operator delete ( void * pMem ) SAL_THROW( () ) { ::rtl_freeMemory( pMem ); } /** @internal */ - inline static void * SAL_CALL operator new ( size_t, void * pMem ) SAL_THROW( () ) + inline static void * SAL_CALL operator new ( ::size_t, void * pMem ) SAL_THROW( () ) { return pMem; } /** @internal */ inline static void SAL_CALL operator delete ( void *, void * ) SAL_THROW( () ) @@ -531,3 +532,5 @@ inline T * get_pointer( Reference<T> const& r ) } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Reference.hxx b/cppu/inc/com/sun/star/uno/Reference.hxx index 4223cc277c37..39e9614f20d8 100644 --- a/cppu/inc/com/sun/star/uno/Reference.hxx +++ b/cppu/inc/com/sun/star/uno/Reference.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -29,9 +30,7 @@ #include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/RuntimeException.hpp> -#ifndef _COM_SUN_STAR_UNO_XINTERFACE_HDL_ #include <com/sun/star/uno/XInterface.hdl> -#endif #include <com/sun/star/uno/genfunc.hxx> namespace com @@ -429,3 +428,5 @@ inline sal_Bool BaseReference::operator != ( const BaseReference & rRef ) const } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Sequence.h b/cppu/inc/com/sun/star/uno/Sequence.h index 71bb42c7413b..68abc9d24748 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.h +++ b/cppu/inc/com/sun/star/uno/Sequence.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,7 +70,7 @@ class Sequence public: // these are here to force memory de/allocation to sal lib. /** @internal */ - inline static void * SAL_CALL operator new ( size_t nSize ) + inline static void * SAL_CALL operator new ( ::size_t nSize ) SAL_THROW( () ) { return ::rtl_allocateMemory( nSize ); } /** @internal */ @@ -77,7 +78,7 @@ public: SAL_THROW( () ) { ::rtl_freeMemory( pMem ); } /** @internal */ - inline static void * SAL_CALL operator new ( size_t, void * pMem ) + inline static void * SAL_CALL operator new ( ::size_t, void * pMem ) SAL_THROW( () ) { return pMem; } /** @internal */ @@ -286,3 +287,5 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCharSequenceCppuType() SAL_THROW( () ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Sequence.hxx b/cppu/inc/com/sun/star/uno/Sequence.hxx index bca6a1c44211..8a9b43d1339e 100644 --- a/cppu/inc/com/sun/star/uno/Sequence.hxx +++ b/cppu/inc/com/sun/star/uno/Sequence.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -305,3 +306,5 @@ SAL_CALL getCharSequenceCppuType() SAL_THROW( () ) } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Type.h b/cppu/inc/com/sun/star/uno/Type.h index 61829c2c790d..6490fa4ab7f1 100644 --- a/cppu/inc/com/sun/star/uno/Type.h +++ b/cppu/inc/com/sun/star/uno/Type.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -456,3 +457,5 @@ template<> inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType< sal_Unicode >() SAL_THROW(()); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/Type.hxx b/cppu/inc/com/sun/star/uno/Type.hxx index 33eba298e188..46fd86329424 100644 --- a/cppu/inc/com/sun/star/uno/Type.hxx +++ b/cppu/inc/com/sun/star/uno/Type.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -325,3 +326,5 @@ inline const ::com::sun::star::uno::Type & SAL_CALL getCppuType< sal_Unicode >() } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/genfunc.h b/cppu/inc/com/sun/star/uno/genfunc.h index 41fdebf47a31..1b0dbd2c4cce 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.h +++ b/cppu/inc/com/sun/star/uno/genfunc.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -67,3 +68,5 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/com/sun/star/uno/genfunc.hxx b/cppu/inc/com/sun/star/uno/genfunc.hxx index b2299a35cd3d..88234bd81389 100644 --- a/cppu/inc/com/sun/star/uno/genfunc.hxx +++ b/cppu/inc/com/sun/star/uno/genfunc.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -86,3 +87,5 @@ inline void * SAL_CALL cpp_queryInterface( void * pCppI, typelib_TypeDescription } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/Enterable.hxx b/cppu/inc/cppu/Enterable.hxx index c8bbfb49d382..5ccfb9c4e2fb 100644 --- a/cppu/inc/cppu/Enterable.hxx +++ b/cppu/inc/cppu/Enterable.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,16 +51,16 @@ public: virtual void v_callOut_v (uno_EnvCallee * pCallee, va_list * pParam) = 0; virtual int v_isValid (rtl::OUString * pReason) = 0; - virtual ~Enterable() {}; + virtual ~Enterable() {} public: inline explicit Enterable(void); - inline void enter(void) {m_enter(this);}; - inline void leave(void) {m_leave(this);}; + inline void enter(void) {m_enter(this);} + inline void leave(void) {m_leave(this);} - inline void callInto_v(uno_EnvCallee * pCallee, va_list * pParam) {m_callInto_v(this, pCallee, pParam);}; - inline void callOut_v (uno_EnvCallee * pCallee, va_list * pParam) {m_callOut_v (this, pCallee, pParam);}; + inline void callInto_v(uno_EnvCallee * pCallee, va_list * pParam) {m_callInto_v(this, pCallee, pParam);} + inline void callOut_v (uno_EnvCallee * pCallee, va_list * pParam) {m_callOut_v (this, pCallee, pParam);} inline void callInto(uno_EnvCallee * pCallee, ...); inline void callOut (uno_EnvCallee * pCallee, ...); @@ -71,12 +72,12 @@ private: Enterable & operator = (Enterable const &); }; -extern "C" inline void Enterable_call_enter (void * context) { ((Enterable *)context)->v_enter(); }; -extern "C" inline void Enterable_call_leave (void * context) { ((Enterable *)context)->v_leave(); }; +extern "C" inline void Enterable_call_enter (void * context) { ((Enterable *)context)->v_enter(); } +extern "C" inline void Enterable_call_leave (void * context) { ((Enterable *)context)->v_leave(); } extern "C" inline void Enterable_call_callInto_v(void * context, uno_EnvCallee * pCallee, va_list * pParam) - { ((Enterable *)context)->v_callInto_v(pCallee, pParam); }; + { ((Enterable *)context)->v_callInto_v(pCallee, pParam); } extern "C" inline void Enterable_call_callOut_v (void * context, uno_EnvCallee * pCallee, va_list * pParam) - { ((Enterable *)context)->v_callOut_v(pCallee, pParam); }; + { ((Enterable *)context)->v_callOut_v(pCallee, pParam); } extern "C" inline int Enterable_call_isValid (void * context, rtl_uString ** pReason) {return ((Enterable *)context)->v_isValid((rtl::OUString *)pReason);} @@ -112,3 +113,5 @@ void Enterable::callOut(uno_EnvCallee * pCallee, ...) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/EnvDcp.hxx b/cppu/inc/cppu/EnvDcp.hxx index c4e394b98460..68adf63017c3 100644 --- a/cppu/inc/cppu/EnvDcp.hxx +++ b/cppu/inc/cppu/EnvDcp.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -73,3 +74,5 @@ inline rtl::OUString getPurpose(rtl::OUString const & rEnvDcp) #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/EnvGuards.hxx b/cppu/inc/cppu/EnvGuards.hxx index c7408f01cfd1..07f65b2aced9 100644 --- a/cppu/inc/cppu/EnvGuards.hxx +++ b/cppu/inc/cppu/EnvGuards.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ namespace cppu } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/FreeReference.hxx b/cppu/inc/cppu/FreeReference.hxx index e2d60775c0b3..5a8d22175921 100644 --- a/cppu/inc/cppu/FreeReference.hxx +++ b/cppu/inc/cppu/FreeReference.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -164,3 +165,5 @@ namespace cppu } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/Map.hxx b/cppu/inc/cppu/Map.hxx index 455bee6e5fbd..a5922f830b5d 100644 --- a/cppu/inc/cppu/Map.hxx +++ b/cppu/inc/cppu/Map.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -111,3 +112,5 @@ namespace cppu } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/Shield.hxx b/cppu/inc/cppu/Shield.hxx index 46cdaeacea06..1e7221a210d3 100644 --- a/cppu/inc/cppu/Shield.hxx +++ b/cppu/inc/cppu/Shield.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -88,3 +89,5 @@ namespace cppu } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/helper/purpenv/Environment.hxx b/cppu/inc/cppu/helper/purpenv/Environment.hxx index ba56c22e53cf..25c9de8e8a6e 100644 --- a/cppu/inc/cppu/helper/purpenv/Environment.hxx +++ b/cppu/inc/cppu/helper/purpenv/Environment.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -44,3 +45,5 @@ void Environment_initWithEnterable(uno_Environment * pEnvironment, cppu::Enterab }}} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/helper/purpenv/Mapping.hxx b/cppu/inc/cppu/helper/purpenv/Mapping.hxx index c20309e7a180..6bdcd207987f 100644 --- a/cppu/inc/cppu/helper/purpenv/Mapping.hxx +++ b/cppu/inc/cppu/helper/purpenv/Mapping.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,5 @@ void createMapping(uno_Mapping ** ppMapping, }}} #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/macros.hxx b/cppu/inc/cppu/macros.hxx index fd64d1c767df..5c123e7aecd9 100644 --- a/cppu/inc/cppu/macros.hxx +++ b/cppu/inc/cppu/macros.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -63,3 +64,4 @@ #endif // _CPPU_MACROS_HXX_ +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/cppu/unotype.hxx b/cppu/inc/cppu/unotype.hxx index bef23d3cf38d..b8df4e07a1b0 100644 --- a/cppu/inc/cppu/unotype.hxx +++ b/cppu/inc/cppu/unotype.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -375,3 +376,5 @@ getTypeFavourChar(::com::sun::star::uno::Sequence< T > const *); } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/pch/precompiled_cppu.cxx b/cppu/inc/pch/precompiled_cppu.cxx index 5148aa6b5439..2a6a6cb94ae0 100644 --- a/cppu/inc/pch/precompiled_cppu.cxx +++ b/cppu/inc/pch/precompiled_cppu.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,3 +28,4 @@ #include "precompiled_cppu.hxx" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/pch/precompiled_cppu.hxx b/cppu/inc/pch/precompiled_cppu.hxx index 38ea1cc9fbf7..c6624e57b5ca 100644 --- a/cppu/inc/pch/precompiled_cppu.hxx +++ b/cppu/inc/pch/precompiled_cppu.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,3 +31,4 @@ #ifdef PRECOMPILED_HEADERS #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/typelib/typeclass.h b/cppu/inc/typelib/typeclass.h index da0ea9f37093..231c9d9f5fe3 100644 --- a/cppu/inc/typelib/typeclass.h +++ b/cppu/inc/typelib/typeclass.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -102,3 +103,5 @@ typedef enum _typelib_TypeClass } typelib_TypeClass; #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/typelib/typedescription.h b/cppu/inc/typelib/typedescription.h index cf42acac96b1..2758d0914ca9 100644 --- a/cppu/inc/typelib/typedescription.h +++ b/cppu/inc/typelib/typedescription.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1158,3 +1159,5 @@ sal_Bool SAL_CALL typelib_typedescription_complete( #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/typelib/typedescription.hxx b/cppu/inc/typelib/typedescription.hxx index 61a6531d3529..3997f3d9c14d 100644 --- a/cppu/inc/typelib/typedescription.hxx +++ b/cppu/inc/typelib/typedescription.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,7 @@ #include <rtl/alloc.h> #include <rtl/ustring.hxx> #include <com/sun/star/uno/Type.h> -#ifndef _TYPELIB_TYPEDESCRIPTION_H #include <typelib/typedescription.h> -#endif namespace com @@ -224,3 +223,5 @@ inline void TypeDescription::makeComplete() const SAL_THROW( () ) } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/typelib/uik.h b/cppu/inc/typelib/uik.h index 06eead24f8bb..026d376da9f2 100644 --- a/cppu/inc/typelib/uik.h +++ b/cppu/inc/typelib/uik.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -51,3 +52,5 @@ typedef struct _typelib_Uik #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/Enterable.h b/cppu/inc/uno/Enterable.h index d92013ec1404..a769ede987f2 100644 --- a/cppu/inc/uno/Enterable.h +++ b/cppu/inc/uno/Enterable.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -110,3 +111,5 @@ uno_Enterable; #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/EnvDcp.h b/cppu/inc/uno/EnvDcp.h index 17d65bc57d9c..a2471815c179 100644 --- a/cppu/inc/uno/EnvDcp.h +++ b/cppu/inc/uno/EnvDcp.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -61,3 +62,5 @@ void uno_EnvDcp_getPurpose (rtl_uString const * pEnvDcp, rtl_uString ** ppEnvPur #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/any2.h b/cppu/inc/uno/any2.h index 72af895115b3..b359339b4686 100644 --- a/cppu/inc/uno/any2.h +++ b/cppu/inc/uno/any2.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -176,3 +177,5 @@ void SAL_CALL uno_any_clear( #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/cuno.h b/cppu/inc/uno/cuno.h index dfe5edea7144..f71c56854dd1 100644 --- a/cppu/inc/uno/cuno.h +++ b/cppu/inc/uno/cuno.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,9 +43,10 @@ @param return_code return code of call */ -#define CUNO_EXCEPTION_OCCURED( return_code ) (0 != ((return_code) & CUNO_ERROR_EXCEPTION)) +#define CUNO_EXCEPTION_OCCURRED( return_code ) (0 != ((return_code) & CUNO_ERROR_EXCEPTION)) typedef sal_Int32 cuno_ErrorCode; #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/current_context.h b/cppu/inc/uno/current_context.h index 64edd60a4811..7abd2771df07 100644 --- a/cppu/inc/uno/current_context.h +++ b/cppu/inc/uno/current_context.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -66,3 +67,5 @@ sal_Bool SAL_CALL uno_setCurrentContext( #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/current_context.hxx b/cppu/inc/uno/current_context.hxx index 6cce6bc347a2..01d59a460eca 100644 --- a/cppu/inc/uno/current_context.hxx +++ b/cppu/inc/uno/current_context.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -125,3 +126,5 @@ inline ContextLayer::~ContextLayer() } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/data.h b/cppu/inc/uno/data.h index 31c3d57f3544..8a86b89841d7 100644 --- a/cppu/inc/uno/data.h +++ b/cppu/inc/uno/data.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -255,3 +256,5 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/dispatcher.h b/cppu/inc/uno/dispatcher.h index 55475868fd24..74b73d3f2127 100644 --- a/cppu/inc/uno/dispatcher.h +++ b/cppu/inc/uno/dispatcher.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -95,3 +96,5 @@ typedef struct _uno_Interface #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/dispatcher.hxx b/cppu/inc/uno/dispatcher.hxx index a4a845fc738f..90fdb3db6df7 100644 --- a/cppu/inc/uno/dispatcher.hxx +++ b/cppu/inc/uno/dispatcher.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -173,3 +174,4 @@ inline void UnoInterfaceReference::dispatch( #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/environment.h b/cppu/inc/uno/environment.h index f959aa2571f4..4a02c46abc28 100644 --- a/cppu/inc/uno/environment.h +++ b/cppu/inc/uno/environment.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -383,3 +384,5 @@ int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pRea #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/environment.hxx b/cppu/inc/uno/environment.hxx index c204b0a2dfa0..8fa4f3ea5063 100644 --- a/cppu/inc/uno/environment.hxx +++ b/cppu/inc/uno/environment.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -276,3 +277,5 @@ inline Environment Environment::getCurrent(rtl::OUString const & typeName) SAL_T } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/lbnames.h b/cppu/inc/uno/lbnames.h index 4bca6a8a9dd5..f9e32a957312 100644 --- a/cppu/inc/uno/lbnames.h +++ b/cppu/inc/uno/lbnames.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -56,3 +57,5 @@ provoking error here, because PP ignores #error #define UNO_LB_CLI "cli" #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/mapping.h b/cppu/inc/uno/mapping.h index 3254d3c7c47d..082b59907ad4 100644 --- a/cppu/inc/uno/mapping.h +++ b/cppu/inc/uno/mapping.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -201,3 +202,5 @@ typedef void (SAL_CALL * uno_ext_getMappingFunc)( #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/mapping.hxx b/cppu/inc/uno/mapping.hxx index 2bd669133670..a183cf089de3 100644 --- a/cppu/inc/uno/mapping.hxx +++ b/cppu/inc/uno/mapping.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -352,3 +353,5 @@ inline sal_Bool mapToUno( uno_Interface ** ppRet, const Reference< C > & x ) SAL } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/sequence2.h b/cppu/inc/uno/sequence2.h index f8db769f9359..d1a50a3743f5 100644 --- a/cppu/inc/uno/sequence2.h +++ b/cppu/inc/uno/sequence2.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -185,3 +186,5 @@ sal_Bool SAL_CALL uno_type_sequence_realloc( #endif #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/inc/uno/threadpool.h b/cppu/inc/uno/threadpool.h index 4938258a7ab9..0c647442e377 100644 --- a/cppu/inc/uno/threadpool.h +++ b/cppu/inc/uno/threadpool.h @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,3 +188,5 @@ uno_threadpool_destroy( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C(); #ifdef __cplusplus } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/prj/build.lst b/cppu/prj/build.lst index a22ca9ec8b66..4ded629ef0fd 100644 --- a/cppu/prj/build.lst +++ b/cppu/prj/build.lst @@ -10,3 +10,4 @@ cu cppu\source\UnsafeBridge nmake - all cu_UnsafeBridge cu_inc NULL cu cppu\source\AffineBridge nmake - all cu_AffineBridge cu_inc NULL cu cppu\source\LogBridge nmake - all cu_LogBridge cu_inc NULL cu cppu\util nmake - all cu_util cu_thpool cu_typelib cu_cppu cu_uno cu_helper_purpenv cu_UnsafeBridge cu_AffineBridge cu_LogBridge NULL +cd cppu\qa nmake - all cu_qa_cppunit cu_util NULL diff --git a/cppu/qa/makefile.mk b/cppu/qa/makefile.mk index b40d3512e575..1db4ed9eea8a 100644 --- a/cppu/qa/makefile.mk +++ b/cppu/qa/makefile.mk @@ -33,36 +33,36 @@ ENABLE_EXCEPTIONS := TRUE .INCLUDE: settings.mk -CFLAGSCXX += $(CPPUNIT_CFLAGS) +CFLAGSCXX+=$(CPPUNIT_CFLAGS) -DLLPRE = # no leading "lib" on .so files +DLLPRE=# no leading "lib" on .so files -INCPRE += $(MISC)$/$(TARGET)$/inc +INCPRE+=$(MISC)$/$(TARGET)$/inc SHL1TARGET = $(TARGET)_any SHL1OBJS = $(SLO)$/test_any.obj -SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) +SHL1STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) SHL1VERSIONMAP = version.map SHL1IMPLIB = i$(SHL1TARGET) DEF1NAME = $(SHL1TARGET) SHL2TARGET = $(TARGET)_unotype SHL2OBJS = $(SLO)$/test_unotype.obj -SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) +SHL2STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) SHL2VERSIONMAP = version.map SHL2IMPLIB = i$(SHL2TARGET) DEF2NAME = $(SHL2TARGET) SHL3TARGET = $(TARGET)_reference SHL3OBJS = $(SLO)$/test_reference.obj -SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) +SHL3STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) SHL3VERSIONMAP = version.map SHL3IMPLIB = i$(SHL3TARGET) DEF3NAME = $(SHL3TARGET) SHL4TARGET = $(TARGET)_recursion SHL4OBJS = $(SLO)$/test_recursion.obj -SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(TESTSHL2LIB) $(SALLIB) +SHL4STDLIBS = $(CPPULIB) $(CPPUNITLIB) $(SALLIB) SHL4VERSIONMAP = version.map SHL4IMPLIB = i$(SHL4TARGET) DEF4NAME = $(SHL4TARGET) @@ -71,10 +71,14 @@ SLOFILES = $(SHL1OBJS) $(SHL2OBJS) $(SHL3OBJS) $(SHL4OBJS) .INCLUDE: target.mk -ALLTAR: test - $(SHL1OBJS): $(MISC)$/$(TARGET).cppumaker.flag +$(SHL2OBJS): $(MISC)$/$(TARGET).cppumaker.flag + +$(SHL3OBJS): $(MISC)$/$(TARGET).cppumaker.flag + +$(SHL4OBJS): $(MISC)$/$(TARGET).cppumaker.flag + $(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb - $(MKDIRHIER) $(MISC)$/$(TARGET)$/inc $(CPPUMAKER) -O$(MISC)$/$(TARGET)$/inc -BUCR -C $< \ @@ -82,15 +86,11 @@ $(MISC)$/$(TARGET).cppumaker.flag: $(MISC)$/$(TARGET).rdb $(TOUCH) $@ $(MISC)$/$(TARGET).rdb: $(MISC)$/$(TARGET)$/types.urd - - rm $@ + - $(RM) $@ $(REGMERGE) $@ /UCR $< $(MISC)$/$(TARGET)$/types.urd: types.idl - $(MKDIR) $(MISC)$/$(TARGET) $(IDLC) -O$(MISC)$/$(TARGET) -I$(SOLARIDLDIR) -cid -we $< -test .PHONY: $(SHL1TARGETN) $(SHL2TARGETN) $(SHL3TARGETN) $(SHL4TARGETN) - $(TESTSHL2) $(SHL1TARGETN) - $(TESTSHL2) $(SHL2TARGETN) - $(TESTSHL2) $(SHL3TARGETN) - $(TESTSHL2) $(SHL4TARGETN) +.INCLUDE : _cppunit.mk diff --git a/cppu/qa/test_any.cxx b/cppu/qa/test_any.cxx index 1ab601b04c46..71afe9b31a5a 100644 --- a/cppu/qa/test_any.cxx +++ b/cppu/qa/test_any.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -32,6 +33,12 @@ #include <stdlib.h> // wntmsci10 does not like <cstdlib> +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> + #include "Enum1.hpp" #include "Enum2.hpp" #include "Exception1.hpp" @@ -55,7 +62,6 @@ #include "com/sun/star/uno/Sequence.hxx" #include "com/sun/star/uno/Type.hxx" #include "com/sun/star/uno/XInterface.hpp" -#include "testshl/simpleheader.hxx" #include "osl/diagnose.h" #include "osl/interlck.h" #include "rtl/string.h" @@ -197,45 +203,25 @@ public: class Test: public CppUnit::TestFixture { public: void testVoid(); - void testBoolean(); - void testByte(); - void testShort(); - void testUnsignedShort(); - void testLong(); - void testUnsignedLong(); - void testHyper(); - void testUnsignedHyper(); - void testFloat(); - void testDouble(); - void testChar(); - void testString(); - void testType(); - void testSequence(); - void testEnum(); - void testStruct(); - void testPoly(); - void testException(); - void testInterface(); - void testNull(); CPPUNIT_TEST_SUITE(Test); @@ -2323,8 +2309,10 @@ void Test::testNull() { } } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_recursion.cxx b/cppu/qa/test_recursion.cxx index c0bab3e30b95..81ee1f0664fa 100644 --- a/cppu/qa/test_recursion.cxx +++ b/cppu/qa/test_recursion.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,12 @@ #include "precompiled_cppu.hxx" #include "sal/config.h" -#include "testshl/simpleheader.hxx" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> + #include "sal/types.h" #include "Rec.hpp" @@ -50,8 +56,10 @@ void Test::testRecursion() { CPPUNIT_ASSERT_EQUAL(static_cast< sal_Int32 >(0), Rec().x.getLength()); } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "tests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_reference.cxx b/cppu/qa/test_reference.cxx index 88a24d8e361d..fbf7011deb67 100644 --- a/cppu/qa/test_reference.cxx +++ b/cppu/qa/test_reference.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,9 +31,14 @@ #include "sal/config.h" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> + #include "Interface1.hpp" -#include "testshl/simpleheader.hxx" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -149,8 +155,10 @@ void Test::testUnoSetThrow() CPPUNIT_ASSERT_EQUAL( false, bCaughtException ); } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } // namespace -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/test_unotype.cxx b/cppu/qa/test_unotype.cxx index eda5be571e7b..f85944ff1021 100644 --- a/cppu/qa/test_unotype.cxx +++ b/cppu/qa/test_unotype.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,6 +31,12 @@ #include "sal/config.h" +#include <cppunit/TestSuite.h> +#include <cppunit/TestFixture.h> +#include <cppunit/TestCase.h> +#include <cppunit/plugin/TestPlugIn.h> +#include <cppunit/extensions/HelperMacros.h> + #include <typeinfo> #include "com/sun/star/beans/Optional.hpp" @@ -44,7 +51,6 @@ #include "com/sun/star/uno/XComponentContext.hpp" #include "com/sun/star/uno/XInterface.hpp" #include "cppu/unotype.hxx" -#include "testshl/simpleheader.hxx" #include "rtl/ustring.h" #include "rtl/ustring.hxx" #include "sal/types.h" @@ -805,8 +811,10 @@ void Test::testGetTypeFavourChar() { #endif } -CPPUNIT_TEST_SUITE_NAMED_REGISTRATION(Test, "alltests"); +CPPUNIT_TEST_SUITE_REGISTRATION(Test); } -NOADDITIONAL; +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/qa/version.map b/cppu/qa/version.map index 7321bbca16ad..3308588ef6f8 100644 --- a/cppu/qa/version.map +++ b/cppu/qa/version.map @@ -27,7 +27,7 @@ UDK_3_0_0 { global: - registerAllTestFunction; + cppunitTestPlugIn; local: *; diff --git a/cppu/source/AffineBridge/AffineBridge.cxx b/cppu/source/AffineBridge/AffineBridge.cxx index 59f8213274a6..89647322ad6d 100644 --- a/cppu/source/AffineBridge/AffineBridge.cxx +++ b/cppu/source/AffineBridge/AffineBridge.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -362,3 +363,4 @@ extern "C" void SAL_DLLPUBLIC_EXPORT SAL_CALL uno_ext_getMapping(uno_Mapping cppu::helper::purpenv::createMapping(ppMapping, pFrom, pTo); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/LogBridge/LogBridge.cxx b/cppu/source/LogBridge/LogBridge.cxx index b57cd405c82b..8eb69cc23e4e 100755..100644 --- a/cppu/source/LogBridge/LogBridge.cxx +++ b/cppu/source/LogBridge/LogBridge.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -38,7 +39,7 @@ #include "rtl/logfile.hxx" #include "uno/environment.hxx" #include <com/sun/star/uno/Type.hxx> -#include <hash_map> +#include <boost/unordered_map.hpp> #include <memory> namespace @@ -246,7 +247,7 @@ void LogProbe( rtl_logfile_longTrace( "} LogBridge () %s",sTemp.getStr()); if ( ppException && *ppException ) { - rtl_logfile_trace( " excption occured : "); + rtl_logfile_trace( " excption occurred : "); typelib_TypeDescription * pElementTypeDescr = 0; TYPELIB_DANGER_GET( &pElementTypeDescr, (*ppException)->pType ); const ::rtl::OString sValue( ::rtl::OUStringToOString(pElementTypeDescr->pTypeName,osl_getThreadTextEncoding())); @@ -275,3 +276,5 @@ extern "C" void SAL_DLLPUBLIC_EXPORT SAL_CALL uno_ext_getMapping(uno_Mapping { cppu::helper::purpenv::createMapping(ppMapping, pFrom, pTo,LogProbe); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/UnsafeBridge/UnsafeBridge.cxx b/cppu/source/UnsafeBridge/UnsafeBridge.cxx index 5a531de47182..17ecb4646918 100644 --- a/cppu/source/UnsafeBridge/UnsafeBridge.cxx +++ b/cppu/source/UnsafeBridge/UnsafeBridge.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -161,3 +162,4 @@ extern "C" void SAL_DLLPUBLIC_EXPORT SAL_CALL uno_ext_getMapping(uno_Mapping cppu::helper::purpenv::createMapping(ppMapping, pFrom, pTo); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/cppu/cppu_opt.cxx b/cppu/source/cppu/cppu_opt.cxx index a4640fd6f945..6512bd567d71 100644 --- a/cppu/source/cppu/cppu_opt.cxx +++ b/cppu/source/cppu/cppu_opt.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -79,3 +80,5 @@ extern "C" rtl_uString * SAL_CALL cppu_Any_extraction_failure_msg( rtl_uString_acquire( ret.pData ); return ret.pData; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/helper/purpenv/Proxy.hxx b/cppu/source/helper/purpenv/Proxy.hxx index 570d7291b177..9db0182c2edc 100644 --- a/cppu/source/helper/purpenv/Proxy.hxx +++ b/cppu/source/helper/purpenv/Proxy.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -87,3 +88,5 @@ public: extern "C" SAL_DLLPRIVATE void SAL_CALL Proxy_free(uno_ExtEnvironment * pEnv, void * pProxy) SAL_THROW_EXTERN_C(); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx b/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx index 0fbed6739951..52e77785f1ea 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Environment.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -535,3 +536,5 @@ void Environment_initWithEnterable(uno_Environment * pEnvironment, cppu::Enterab } }}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx index 0b4b3c9e0786..9c87f82cf470 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -231,3 +232,5 @@ void createMapping(uno_Mapping ** ppMapping, } }}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx index 344203e38762..d3f4339a885a 100644 --- a/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx +++ b/cppu/source/helper/purpenv/helper_purpenv_Proxy.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -492,7 +493,7 @@ void Proxy::dispatch(typelib_TypeDescriptionReference * pReturnTypeRef, *ppException = 0; } - else // exception occured + else // exception occurred { for (sal_Int32 nPos = 0; nPos < nParams; ++ nPos) { @@ -528,3 +529,4 @@ void Proxy::dispatch(typelib_TypeDescriptionReference * pReturnTypeRef, ppException); } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/current.cxx b/cppu/source/threadpool/current.cxx index 23bd52ca1917..2ffabcbff014 100644 --- a/cppu/source/threadpool/current.cxx +++ b/cppu/source/threadpool/current.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -295,3 +296,5 @@ extern "C" sal_Bool SAL_CALL uno_getCurrentContext( return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/current.hxx b/cppu/source/threadpool/current.hxx index fbe0531cf178..45640220116d 100644 --- a/cppu/source/threadpool/current.hxx +++ b/cppu/source/threadpool/current.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,3 +47,5 @@ struct IdContainer IdContainer * getIdContainer() SAL_THROW( () ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/jobqueue.cxx b/cppu/source/threadpool/jobqueue.cxx index 333a350c0b23..9f629e43a457 100644 --- a/cppu/source/threadpool/jobqueue.cxx +++ b/cppu/source/threadpool/jobqueue.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -187,10 +188,12 @@ namespace cppu_threadpool { return m_lstCallstack.empty(); } - sal_Bool JobQueue::isBusy() + sal_Bool JobQueue::isBusy() const { return m_nToDo > 0; } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/jobqueue.hxx b/cppu/source/threadpool/jobqueue.hxx index 78202573403e..6bddcc73483f 100644 --- a/cppu/source/threadpool/jobqueue.hxx +++ b/cppu/source/threadpool/jobqueue.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -69,7 +70,7 @@ namespace cppu_threadpool sal_Bool isEmpty(); sal_Bool isCallstackEmpty(); - sal_Bool isBusy(); + sal_Bool isBusy() const; private: ::osl::Mutex m_mutex; @@ -83,3 +84,5 @@ namespace cppu_threadpool } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/thread.cxx b/cppu/source/threadpool/thread.cxx index 00c91500d1e5..c6035f0754c7 100644 --- a/cppu/source/threadpool/thread.cxx +++ b/cppu/source/threadpool/thread.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -217,3 +218,5 @@ namespace cppu_threadpool { } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/thread.hxx b/cppu/source/threadpool/thread.hxx index 2f7791daf7e5..bbef51eabca4 100644 --- a/cppu/source/threadpool/thread.hxx +++ b/cppu/source/threadpool/thread.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -89,3 +90,4 @@ namespace cppu_threadpool { #endif +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/threadident.cxx b/cppu/source/threadpool/threadident.cxx index 0fb6c1196185..50fef43f57b4 100644 --- a/cppu/source/threadpool/threadident.cxx +++ b/cppu/source/threadpool/threadident.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -133,3 +134,5 @@ extern "C" sal_Bool SAL_CALL uno_bindIdToCurrentThread( sal_Sequence *pThreadId } return sal_True; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx index b7df159a80b9..ec828d99fd0d 100644 --- a/cppu/source/threadpool/threadpool.cxx +++ b/cppu/source/threadpool/threadpool.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -27,7 +28,7 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cppu.hxx" -#include <hash_set> +#include <boost/unordered_map.hpp> #include <stdio.h> #include <osl/diagnose.h> @@ -118,7 +119,7 @@ namespace cppu_threadpool ThreadPool::ThreadPool() { - m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance(); + m_DisposedCallerAdmin = DisposedCallerAdmin::getInstance(); } ThreadPool::~ThreadPool() @@ -404,7 +405,7 @@ struct uno_ThreadPool_Hash -typedef ::std::hash_map< uno_ThreadPool, ThreadPoolHolder, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet; +typedef ::boost::unordered_map< uno_ThreadPool, ThreadPoolHolder, uno_ThreadPool_Hash, uno_ThreadPool_Equal > ThreadpoolHashSet; static ThreadpoolHashSet *g_pThreadpoolHashSet; @@ -504,3 +505,5 @@ uno_threadpool_destroy( uno_ThreadPool hPool ) SAL_THROW_EXTERN_C() } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/threadpool/threadpool.hxx b/cppu/source/threadpool/threadpool.hxx index e1c9a127fa55..273798c81f8a 100644 --- a/cppu/source/threadpool/threadpool.hxx +++ b/cppu/source/threadpool/threadpool.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -24,7 +25,7 @@ * for a copy of the LGPLv3 License. * ************************************************************************/ -#include <hash_map> +#include <boost/unordered_map.hpp> #include <osl/conditn.h> @@ -59,7 +60,7 @@ namespace cppu_threadpool { } }; - typedef ::std::hash_map + typedef ::boost::unordered_map < ByteSequence, // ThreadID ::std::pair < JobQueue * , JobQueue * >, @@ -138,3 +139,5 @@ namespace cppu_threadpool { }; } // end namespace cppu_threadpool + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx index 605bc5aadbdc..4af4fb1251c8 100644 --- a/cppu/source/typelib/static_types.cxx +++ b/cppu/source/typelib/static_types.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,7 +43,9 @@ using namespace osl; -using namespace rtl; + +using ::rtl::OUString; +using ::rtl::OUStringBuffer; extern "C" { @@ -79,8 +82,15 @@ void SAL_CALL typelib_typedescriptionreference_getByName( */ struct AlignSize_Impl { - sal_Int16 nInt16; - double dDouble; + sal_Int16 nInt16; +#ifdef AIX + //double: doubleword aligned if -qalign=natural/-malign=natural + //which isn't the default ABI. Otherwise word aligned, While a long long int + //is always doubleword aligned, so use that instead. + sal_Int64 dDouble; +#else + double dDouble; +#endif }; #ifdef SAL_W32 @@ -647,3 +657,5 @@ void SAL_CALL typelib_static_array_type_init( } // extern "C" } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx index aa0d18589a89..fc18050eb399 100644 --- a/cppu/source/typelib/typelib.cxx +++ b/cppu/source/typelib/typelib.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,7 +29,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_cppu.hxx" -#include <hash_map> +#if OSL_DEBUG_LEVEL > 1 +#include <stdio.h> +#endif + +#include <boost/unordered_map.hpp> #include <list> #include <set> #include <vector> @@ -48,13 +53,13 @@ #include <typelib/typedescription.h> #include <uno/any2.h> -using namespace rtl; using namespace std; using namespace osl; +using ::rtl::OUString; +using ::rtl::OUStringBuffer; +using ::rtl::OString; -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ #ifdef SAL_W32 #pragma pack(push, 8) #elif defined(SAL_OS2) @@ -69,8 +74,15 @@ using namespace osl; */ struct AlignSize_Impl { - sal_Int16 nInt16; - double dDouble; + sal_Int16 nInt16; +#ifdef AIX + //double: doubleword aligned if -qalign=natural/-malign=natural + //which isn't the default ABI. Otherwise word aligned, While a long long int + //is always doubleword aligned, so use that instead. + sal_Int64 dDouble; +#else + double dDouble; +#endif }; #ifdef SAL_W32 @@ -183,7 +195,7 @@ struct hashStr_Impl //----------------------------------------------------------------------------- // Heavy hack, the const sal_Unicode * is hold by the typedescription reference -typedef hash_map< const sal_Unicode *, typelib_TypeDescriptionReference *, +typedef boost::unordered_map< const sal_Unicode *, typelib_TypeDescriptionReference *, hashStr_Impl, equalStr_Impl > WeakMap_Impl; typedef pair< void *, typelib_typedescription_Callback > CallbackEntry; @@ -273,7 +285,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () ) while( aIt != pCache->end() ) { typelib_typedescription_release( (*aIt) ); - aIt++; + ++aIt; } delete pCache; pCache = 0; @@ -330,7 +342,21 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () ) delete pWeakMap; pWeakMap = 0; } +#ifndef CPPU_LEAK_STATIC_DATA #if OSL_DEBUG_LEVEL > 1 +#define MYASSERT(x) if (x != 0) fprintf(stderr, "### "#x" = %d, should be zero!!!\n", x); + MYASSERT (nTypeDescriptionCount ); + MYASSERT( nCompoundTypeDescriptionCount ); + MYASSERT( nUnionTypeDescriptionCount ); + MYASSERT( nIndirectTypeDescriptionCount ); + MYASSERT( nArrayTypeDescriptionCount ); + MYASSERT( nEnumTypeDescriptionCount ); + MYASSERT( nInterfaceMethodTypeDescriptionCount ); + MYASSERT( nInterfaceAttributeTypeDescriptionCount ); + MYASSERT( nInterfaceTypeDescriptionCount ); + MYASSERT( nTypeDescriptionReferenceCount ); +#undef MYASSERT + OSL_ASSERT( nTypeDescriptionCount == 0 ); OSL_ASSERT( nCompoundTypeDescriptionCount == 0 ); OSL_ASSERT( nUnionTypeDescriptionCount == 0 ); @@ -346,7 +372,7 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () ) #endif delete pCallbacks; pCallbacks = 0; - +#endif // CPPU_LEAK_STATIC_DATA if( pMutex ) { delete pMutex; @@ -356,10 +382,6 @@ TypeDescriptor_Init_Impl::~TypeDescriptor_Init_Impl() SAL_THROW( () ) namespace { struct Init : public rtl::Static< TypeDescriptor_Init_Impl, Init > {}; } -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ extern "C" void SAL_CALL typelib_typedescription_registerCallback( void * pContext, typelib_typedescription_Callback pCallback ) SAL_THROW_EXTERN_C() @@ -399,10 +421,6 @@ extern "C" void SAL_CALL typelib_typedescription_revokeCallback( } } - -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize( const typelib_TypeDescription * pTypeDescription, sal_Int32 nOffset, sal_Int32 & rMaxIntegralTypeSize ) @@ -1941,7 +1959,13 @@ extern "C" sal_Int32 SAL_CALL typelib_typedescription_getAlignedUnoSize( nSize = rMaxIntegralTypeSize = (sal_Int32)(sizeof( float )); break; case typelib_TypeClass_DOUBLE: +#ifdef AIX + //See previous AIX ifdef comment for an explanation + nSize = (sal_Int32)(sizeof(double)); + rMaxIntegralTypeSize = (sal_Int32)(sizeof(void*)); +#else nSize = rMaxIntegralTypeSize = (sal_Int32)(sizeof( double )); +#endif break; case typelib_TypeClass_BYTE: nSize = rMaxIntegralTypeSize = (sal_Int32)(sizeof( sal_Int8 )); @@ -2188,7 +2212,7 @@ extern "C" void SAL_CALL typelib_typedescription_getByName( { // Check for derived interface member type: sal_Int32 i1 = name.lastIndexOf( - rtl::OUString::createFromAscii(":@")); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(":@"))); if (i1 >= 0) { sal_Int32 i2 = i1 + RTL_CONSTASCII_LENGTH(":@"); sal_Int32 i3 = name.indexOf(',', i2); @@ -2268,10 +2292,6 @@ extern "C" void SAL_CALL typelib_typedescription_getByName( } } - -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ -//------------------------------------------------------------------------ extern "C" void SAL_CALL typelib_typedescriptionreference_newByAsciiName( typelib_TypeDescriptionReference ** ppTDR, typelib_TypeClass eTypeClass, @@ -2658,3 +2678,5 @@ extern "C" sal_Bool SAL_CALL typelib_typedescription_complete( { return complete(ppTypeDescr, true); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/EnvDcp.c b/cppu/source/uno/EnvDcp.c index 7fb9a0e0ee68..a9d6dc3d59c7 100644 --- a/cppu/source/uno/EnvDcp.c +++ b/cppu/source/uno/EnvDcp.c @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -47,3 +48,5 @@ void uno_EnvDcp_getPurpose(rtl_uString const * pEnvDcp, rtl_uString ** ppEnvPurp else rtl_uString_new(ppEnvPurpose); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/EnvStack.cxx b/cppu/source/uno/EnvStack.cxx index b7cefd42b4da..d1ff2922233a 100644 --- a/cppu/source/uno/EnvStack.cxx +++ b/cppu/source/uno/EnvStack.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,10 +31,12 @@ #include "cppu/EnvDcp.hxx" #include "cppu/Enterable.hxx" +#include "rtl/instance.hxx" + #include "osl/thread.h" #include "osl/mutex.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> using namespace com::sun::star; @@ -62,14 +65,16 @@ size_t oslThreadIdentifier_hash::operator()(oslThreadIdentifier s1) const return s1; } -typedef ::std::hash_map<oslThreadIdentifier, +typedef ::boost::unordered_map<oslThreadIdentifier, uno_Environment *, oslThreadIdentifier_hash, oslThreadIdentifier_equal> ThreadMap; -static osl::Mutex s_threadMap_mutex; -static ThreadMap s_threadMap; - +namespace +{ + struct s_threadMap_mutex : public rtl::Static< osl::Mutex, s_threadMap_mutex > {}; + struct s_threadMap : public rtl::Static< ThreadMap, s_threadMap > {}; +} static rtl::OUString s_uno_envDcp(RTL_CONSTASCII_USTRINGPARAM(UNO_LB_UNO)); @@ -77,15 +82,13 @@ static void s_setCurrent(uno_Environment * pEnv) { oslThreadIdentifier threadId = osl_getThreadIdentifier(NULL); - osl::MutexGuard guard(s_threadMap_mutex); + osl::MutexGuard guard(s_threadMap_mutex::get()); + ThreadMap &rThreadMap = s_threadMap::get(); if (pEnv) - s_threadMap[threadId] = pEnv; + rThreadMap[threadId] = pEnv; else - { - ThreadMap::iterator iEnv = s_threadMap.find(threadId); - s_threadMap.erase(iEnv); - } + rThreadMap.erase(threadId); } static uno_Environment * s_getCurrent(void) @@ -94,9 +97,10 @@ static uno_Environment * s_getCurrent(void) oslThreadIdentifier threadId = osl_getThreadIdentifier(NULL); - osl::MutexGuard guard(s_threadMap_mutex); - ThreadMap::iterator iEnv = s_threadMap.find(threadId); - if(iEnv != s_threadMap.end()) + osl::MutexGuard guard(s_threadMap_mutex::get()); + ThreadMap &rThreadMap = s_threadMap::get(); + ThreadMap::iterator iEnv = rThreadMap.find(threadId); + if(iEnv != rThreadMap.end()) pEnv = iEnv->second; return pEnv; @@ -378,3 +382,5 @@ int SAL_CALL uno_Environment_isValid(uno_Environment * pEnv, rtl_uString ** pRea return result; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/IdentityMapping.cxx b/cppu/source/uno/IdentityMapping.cxx index 64721e2993ca..868a4d7c5e3c 100644 --- a/cppu/source/uno/IdentityMapping.cxx +++ b/cppu/source/uno/IdentityMapping.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -104,3 +105,5 @@ uno_Mapping * createIdentityMapping(uno::Environment const & rEnv) SAL_THROW(()) { return new IdentityMapping(rEnv); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/IdentityMapping.hxx b/cppu/source/uno/IdentityMapping.hxx index cf95a30b203c..cd9760640656 100644 --- a/cppu/source/uno/IdentityMapping.hxx +++ b/cppu/source/uno/IdentityMapping.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,3 +38,5 @@ class Environment; uno_Mapping * createIdentityMapping(const ::com::sun::star::uno::Environment & rEnv); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/any.cxx b/cppu/source/uno/any.cxx index 29be833dfb86..f83373ce4d5c 100644 --- a/cppu/source/uno/any.cxx +++ b/cppu/source/uno/any.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -148,3 +149,5 @@ void SAL_CALL uno_any_clear( uno_Any * pValue, uno_ReleaseFunc release ) CONSTRUCT_EMPTY_ANY( pValue ); } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/assign.hxx b/cppu/source/uno/assign.hxx index 256bb31565db..42375832ab09 100644 --- a/cppu/source/uno/assign.hxx +++ b/cppu/source/uno/assign.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -633,3 +634,5 @@ inline sal_Bool _assignData( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/cascade_mapping.cxx b/cppu/source/uno/cascade_mapping.cxx index ee870a52e286..9e32c6db8bc5 100644 --- a/cppu/source/uno/cascade_mapping.cxx +++ b/cppu/source/uno/cascade_mapping.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -25,22 +26,17 @@ * ************************************************************************/ -#include <iostream> - #include "osl/interlck.h" #include "rtl/ustring.hxx" #include "uno/environment.hxx" #include "uno/mapping.hxx" #include "uno/dispatcher.h" -//#include "cascade_mappping.hxx" #include "cppu/EnvDcp.hxx" -//#define LOG_CALLING_named_purpose_getMapping - -//#define LOG_LIFECYLE_MediatorMapping #ifdef LOG_LIFECYLE_MediatorMapping +# include <iostream> # define LOG_LIFECYLE_MediatorMapping_emit(x) x #else @@ -339,3 +335,5 @@ void getCascadeMapping(uno_Mapping ** ppMapping, *ppMapping = pMapping; } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/cascade_mapping.hxx b/cppu/source/uno/cascade_mapping.hxx index 3b63e17198fb..9920fa05058d 100644 --- a/cppu/source/uno/cascade_mapping.hxx +++ b/cppu/source/uno/cascade_mapping.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,5 @@ void getCascadeMapping(uno_Mapping ** ppMapping, rtl_uString * pAddPurpose ); #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/constr.hxx b/cppu/source/uno/constr.hxx index 8e6d35e9db64..b8eb9b5cc5ce 100644 --- a/cppu/source/uno/constr.hxx +++ b/cppu/source/uno/constr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -265,3 +266,5 @@ inline void _defaultConstructData( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/copy.hxx b/cppu/source/uno/copy.hxx index 7999b5ae0d2b..7750a686b694 100644 --- a/cppu/source/uno/copy.hxx +++ b/cppu/source/uno/copy.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -884,3 +885,5 @@ inline void _copyConstructData( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/data.cxx b/cppu/source/uno/data.cxx index bb2869ca037f..7ba327b9f8b3 100644 --- a/cppu/source/uno/data.cxx +++ b/cppu/source/uno/data.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -108,7 +109,7 @@ void * binuno_queryInterface( void * pUnoI, typelib_TypeDescriptionReference * p #if OSL_DEBUG_LEVEL > 1 OUStringBuffer buf( 128 ); buf.appendAscii( - RTL_CONSTASCII_STRINGPARAM("### exception occured querying for interface ") ); + RTL_CONSTASCII_STRINGPARAM("### exception occurred querying for interface ") ); buf.append( * reinterpret_cast< OUString const * >( &pDestType->pTypeName ) ); buf.appendAscii( RTL_CONSTASCII_STRINGPARAM(": [") ); buf.append( * reinterpret_cast< OUString const * >( &pExc->pType->pTypeName ) ); @@ -276,7 +277,7 @@ sal_Bool SAL_CALL uno_type_equalData( { return _equalData( pVal1, pVal1Type, 0, - pVal2, pVal2Type, 0, + pVal2, pVal2Type, queryInterface, release ); } //################################################################################################## @@ -288,7 +289,7 @@ sal_Bool SAL_CALL uno_equalData( { return _equalData( pVal1, pVal1TD->pWeakRef, pVal1TD, - pVal2, pVal2TD->pWeakRef, pVal2TD, + pVal2, pVal2TD->pWeakRef, queryInterface, release ); } //################################################################################################## @@ -360,7 +361,8 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( #endif #if defined(INTEL) \ - && (defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD) || defined(OS2)) || defined(MACOSX) \ + && (defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD) || defined(OS2) \ + || defined(NETBSD) || defined(OPENBSD)) || defined(MACOSX) || defined(DRAGONFLY) \ || defined(__SUNPRO_CC) && defined(SOLARIS)) #define MAX_ALIGNMENT_4 #endif @@ -372,20 +374,8 @@ sal_Bool SAL_CALL uno_type_isAssignableFromData( #define BINTEST_VERIFYOFFSET( s, m, n ) \ if (OFFSET_OF(s, m) != n) { fprintf( stderr, "### OFFSET_OF(" #s ", " #m ") = %" SAL_PRI_SIZET "u instead of expected %d!!!\n", OFFSET_OF(s, m), n ); abort(); } -#if OSL_DEBUG_LEVEL > 1 -#if defined(__GNUC__) && (defined(LINUX) || defined(FREEBSD)) && (defined(INTEL) || defined(POWERPC) || defined(X86_64) || defined(S390)) -#define BINTEST_VERIFYSIZE( s, n ) \ - fprintf( stderr, "> sizeof(" #s ") = %d; __alignof__ (" #s ") = %d\n", sizeof(s), __alignof__ (s) ); \ - if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } -#else // ! GNUC -#define BINTEST_VERIFYSIZE( s, n ) \ - fprintf( stderr, "> sizeof(" #s ") = %d\n", sizeof(s) ); \ - if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } -#endif -#else // ! OSL_DEBUG_LEVEL #define BINTEST_VERIFYSIZE( s, n ) \ if (sizeof(s) != n) { fprintf( stderr, "### sizeof(" #s ") = %d instead of expected %d!!!\n", sizeof(s), n ); abort(); } -#endif struct C1 { @@ -616,3 +606,5 @@ static BinaryCompatible_Impl aTest; #endif } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/destr.hxx b/cppu/source/uno/destr.hxx index 8f156038ade5..0dc28386afed 100644 --- a/cppu/source/uno/destr.hxx +++ b/cppu/source/uno/destr.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -436,3 +437,5 @@ inline void _destructData( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/env_subst.cxx b/cppu/source/uno/env_subst.cxx index 4465a9e1815e..6d75a35b662b 100644 --- a/cppu/source/uno/env_subst.cxx +++ b/cppu/source/uno/env_subst.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -52,3 +53,5 @@ void SAL_CALL uno_getEnvironment(uno_Environment ** ppEnv, uno_direct_getEnvironment(ppEnv, envDcp.pData, pContext); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/env_subst.hxx b/cppu/source/uno/env_subst.hxx index 8ee8631ced84..b0118a532403 100644 --- a/cppu/source/uno/env_subst.hxx +++ b/cppu/source/uno/env_subst.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -39,3 +40,5 @@ extern "C" void SAL_CALL uno_direct_getEnvironment(uno_Environment ** ppEnv, #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/eq.hxx b/cppu/source/uno/eq.hxx index 45bc0e79cfaa..fef81033cfa5 100644 --- a/cppu/source/uno/eq.hxx +++ b/cppu/source/uno/eq.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -302,7 +303,7 @@ inline sal_Bool _equalData( void * pDest, typelib_TypeDescriptionReference * pDestType, typelib_TypeDescription * pDestTypeDescr, void * pSource, - typelib_TypeDescriptionReference * pSourceType, typelib_TypeDescription * pSourceTypeDescr, + typelib_TypeDescriptionReference * pSourceType, uno_QueryInterfaceFunc queryInterface, uno_ReleaseFunc release ) SAL_THROW( () ) { @@ -315,7 +316,6 @@ inline sal_Bool _equalData( } while (typelib_TypeClass_ANY == (eSourceTypeClass = pSourceType->eTypeClass)) { - pSourceTypeDescr = 0; pSourceType = ((uno_Any *)pSource)->pType; pSource = ((uno_Any *)pSource)->pData; } @@ -666,3 +666,5 @@ inline sal_Bool _equalData( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index f9e382d7e7a5..2cd834cec65b 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -50,7 +51,7 @@ #include "destr.hxx" #include "loadmodule.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> #include <vector> #include <stdio.h> @@ -119,16 +120,16 @@ struct FctOUStringHash : }; // mapping from environment name to environment -typedef ::std::hash_map< +typedef ::boost::unordered_map< OUString, uno_Environment *, FctOUStringHash, ::std::equal_to< OUString > > OUString2EnvironmentMap; // mapping from ptr to object entry -typedef ::std::hash_map< +typedef ::boost::unordered_map< void *, ObjectEntry *, FctPtrHash, ::std::equal_to< void * > > Ptr2ObjectMap; // mapping from oid to object entry -typedef ::std::hash_map< +typedef ::boost::unordered_map< OUString, ObjectEntry *, FctOUStringHash, ::std::equal_to< OUString > > OId2ObjectMap; @@ -1185,3 +1186,4 @@ void SAL_CALL uno_getRegisteredEnvironments( } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/lbmap.cxx b/cppu/source/uno/lbmap.cxx index d2c4a6f60641..0d3664c1a3da 100644 --- a/cppu/source/uno/lbmap.cxx +++ b/cppu/source/uno/lbmap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include "IdentityMapping.hxx" -#include <hash_map> +#include <boost/unordered_map.hpp> #include <set> #include <algorithm> @@ -56,9 +57,11 @@ using namespace std; using namespace osl; -using namespace rtl; using namespace com::sun::star::uno; - +using ::rtl::OUString; +using ::rtl::OUStringBuffer; +using ::rtl::OUStringToOString; +using ::rtl::OString; namespace cppu { @@ -68,7 +71,7 @@ class Mapping uno_Mapping * _pMapping; public: - inline Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW( () ); + inline explicit Mapping( uno_Mapping * pMapping = 0 ) SAL_THROW( () ); inline Mapping( const Mapping & rMapping ) SAL_THROW( () ); inline ~Mapping() SAL_THROW( () ); inline Mapping & SAL_CALL operator = ( uno_Mapping * pMapping ) SAL_THROW( () ); @@ -129,21 +132,21 @@ struct MappingEntry {} }; //-------------------------------------------------------------------------------------------------- -struct FctOUStringHash : public unary_function< const OUString &, size_t > +struct FctOUStringHash : public std::unary_function< const OUString &, size_t > { size_t operator()( const OUString & rKey ) const SAL_THROW( () ) { return (size_t)rKey.hashCode(); } }; //-------------------------------------------------------------------------------------------------- -struct FctPtrHash : public unary_function< uno_Mapping *, size_t > +struct FctPtrHash : public std::unary_function< uno_Mapping *, size_t > { size_t operator()( uno_Mapping * pKey ) const SAL_THROW( () ) { return (size_t)pKey; } }; -typedef hash_map< +typedef boost::unordered_map< OUString, MappingEntry *, FctOUStringHash, equal_to< OUString > > t_OUString2Entry; -typedef hash_map< +typedef boost::unordered_map< uno_Mapping *, MappingEntry *, FctPtrHash, equal_to< uno_Mapping * > > t_Mapping2Entry; typedef set< uno_getMappingFunc > t_CallbackSet; @@ -690,3 +693,4 @@ void SAL_CALL uno_revokeMappingCallback( } } // extern "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/loadmodule.cxx b/cppu/source/uno/loadmodule.cxx index e6858d247f04..fe2b9d0b1a59 100644 --- a/cppu/source/uno/loadmodule.cxx +++ b/cppu/source/uno/loadmodule.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -53,3 +54,5 @@ namespace cppu { namespace detail { } } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/loadmodule.hxx b/cppu/source/uno/loadmodule.hxx index 77a9bb8d6dc0..fc3ec6dbbbe3 100644 --- a/cppu/source/uno/loadmodule.hxx +++ b/cppu/source/uno/loadmodule.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -49,3 +50,5 @@ namespace cppu { namespace detail { } } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/prim.hxx b/cppu/source/uno/prim.hxx index 4acafd125d55..81f6f3148173 100644 --- a/cppu/source/uno/prim.hxx +++ b/cppu/source/uno/prim.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -28,22 +29,16 @@ #define PRIM_HXX #include "typelib/typedescription.h" -#ifndef _typelib_TypeClass_H_ #include "typelib/typeclass.h" -#endif #include "uno/sequence2.h" #include "uno/any2.h" #include "uno/data.h" #include "uno/mapping.h" #include "uno/dispatcher.h" -#ifndef _OSL_INTERLCK_H #include "osl/interlck.h" -#endif #include "osl/diagnose.h" -#ifndef _RTL_USTRING_HXX #include "rtl/ustring.hxx" -#endif #include "rtl/alloc.h" #if OSL_DEBUG_LEVEL > 1 @@ -204,3 +199,5 @@ inline sal_Bool _type_equals( } #endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/source/uno/sequence.cxx b/cppu/source/uno/sequence.cxx index 933d38fc6b4f..947e803cb76a 100644 --- a/cppu/source/uno/sequence.cxx +++ b/cppu/source/uno/sequence.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -1014,3 +1015,5 @@ void SAL_CALL uno_type_sequence_assign( } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppu/util/makefile.mk b/cppu/util/makefile.mk index 2e52c28b5193..8d1003bd4de6 100644 --- a/cppu/util/makefile.mk +++ b/cppu/util/makefile.mk @@ -60,7 +60,7 @@ SHL1STDLIBS = $(SALLIB) SHL1DEPN= SHL1IMPLIB=i$(TARGET) -.IF "$(OS)"!="FREEBSD" +.IF "$(OS)"!="FREEBSD" && "$(OS)"!="NETBSD" && "$(OS)"!="OPENBSD" && "$(OS)"!="DRAGONFLY" SHL1DEF=$(MISC)$/$(SHL1TARGET).def .ENDIF @@ -76,6 +76,8 @@ DEF2NAME := $(SHL2TARGET) SHL2VERSIONMAP:=uno_purpenvhelper$(COMID).map .ELIF "$(GUI)"=="OS2" SHL2VERSIONMAP:=uno_purpenvhelperwntgcc.map +.ELIF "$(COMNAME)"=="mscx" +SHL2VERSIONMAP:=$(SHL2TARGET)X.map .ELSE SHL2VERSIONMAP:=$(SHL2TARGET).map .ENDIF # "$(GUI)$(COM)"=="WNTGCC" diff --git a/cppu/util/purpenvhelper3MSCX.map b/cppu/util/purpenvhelper3MSCX.map new file mode 100644 index 000000000000..22485191c805 --- /dev/null +++ b/cppu/util/purpenvhelper3MSCX.map @@ -0,0 +1,8 @@ +UDK_3_0_0 { + global: + ?Environment_initWithEnterable@purpenv@helper@cppu@@YAXPEAU_uno_Environment@@PEAVEnterable@3@@Z; + ?createMapping@purpenv@helper@cppu@@YAXPEAPEAU_uno_Mapping@@PEAU_uno_Environment@@1P6AX_NPEAX3PEAU_typelib_TypeDescriptionReference@@PEAU_typelib_MethodParameter@@JPEBU_typelib_TypeDescription@@3QEAPEAXPEAPEAU_uno_Any@@@Z3@Z; + + local: + *; +}; diff --git a/cppu/util/target.pmk b/cppu/util/target.pmk index 3befcb154753..a94ea7c8dafe 100644 --- a/cppu/util/target.pmk +++ b/cppu/util/target.pmk @@ -51,3 +51,7 @@ CFLAGS += -Ob0 .ENDIF .ENDIF + +.IF "$(COM)$(CPU)" == "MSCX" +CFLAGS += -DCPPU_LEAK_STATIC_DATA +.ENDIF |