fixed macos x linking problem

This commit is contained in:
Daniel Boelzle
2000-10-10 13:30:11 +00:00
parent 93056047ce
commit e439acf0a7
2 changed files with 26 additions and 8 deletions

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: Sequence.h,v $
*
* $Revision: 1.3 $
* $Revision: 1.4 $
*
* last change: $Author: dbo $ $Date: 2000-10-04 15:31:09 $
* last change: $Author: dbo $ $Date: 2000-10-10 14:30:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -124,8 +124,10 @@ public:
inline static void SAL_CALL operator delete( void *, void * ) throw()
{}
#if ! (defined(__GNUC__) && defined(__APPLE__))
// static pointer to typelib type
static typelib_TypeDescriptionReference * s_pType;
#endif
/** typedefs the element type of the sequence
<br>
@@ -269,7 +271,11 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
@return type of IDL sequence
*/
template< class S >
#if (defined(__GNUC__) && defined(__APPLE__))
inline ::com::sun::star::uno::Type
#else
inline const ::com::sun::star::uno::Type &
#endif
SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * );
/** Gets the meta type of IDL <b>sequence< char ></b>.
@@ -278,7 +284,6 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * );
@param dummy typed pointer for function signature
@return type of IDL <b>sequence< char ></b>
*/
inline const ::com::sun::star::uno::Type &
SAL_CALL getCharSequenceCppuType();
inline const ::com::sun::star::uno::Type & SAL_CALL getCharSequenceCppuType();
#endif

View File

@@ -2,9 +2,9 @@
*
* $RCSfile: Sequence.hxx,v $
*
* $Revision: 1.4 $
* $Revision: 1.5 $
*
* last change: $Author: dbo $ $Date: 2000-10-04 15:31:09 $
* last change: $Author: dbo $ $Date: 2000-10-10 14:30:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -97,9 +97,11 @@ namespace star
/** */ //for docpp
namespace uno
{
#if ! (defined(__GNUC__) && defined(__APPLE__))
//__________________________________________________________________________________________________
template< class E >
typelib_TypeDescriptionReference * Sequence< E >::s_pType = 0;
#endif
//__________________________________________________________________________________________________
template< class E >
@@ -203,6 +205,17 @@ inline ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL toUnoSequence(
// generic sequence template
template< class S >
#if (defined(__GNUC__) && defined(__APPLE__))
inline ::com::sun::star::uno::Type
SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * )
{
typelib_TypeDescriptionReference * pType = 0;
const ::com::sun::star::uno::Type & rElementType = ::getCppuType(
(::com::sun::star::uno::Sequence< S >::ElementType *)0 );
::typelib_static_sequence_type_init( &pType, rElementType.getTypeLibType() );
return ::com::sun::star::uno::Type( pType );
}
#else
inline const ::com::sun::star::uno::Type &
SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * )
{
@@ -217,14 +230,14 @@ SAL_CALL getCppuType( const ::com::sun::star::uno::Sequence< S > * )
return * reinterpret_cast< const ::com::sun::star::uno::Type * >(
& ::com::sun::star::uno::Sequence< S >::s_pType );
}
#endif
#if ((defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__)))
static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0;
#endif
// char sequence
inline const ::com::sun::star::uno::Type &
SAL_CALL getCharSequenceCppuType()
inline const ::com::sun::star::uno::Type & SAL_CALL getCharSequenceCppuType()
{
#if !( (defined(__SUNPRO_CC) && (__SUNPRO_CC == 0x500)) || (defined(__GNUC__) && defined(__APPLE__)) )
static typelib_TypeDescriptionReference * s_pType_com_sun_star_uno_Sequence_Char = 0;