head 1.3; access; symbols pkgsrc-2013Q2:1.3.0.20 pkgsrc-2013Q2-base:1.3 pkgsrc-2012Q4:1.3.0.18 pkgsrc-2012Q4-base:1.3 pkgsrc-2011Q4:1.3.0.16 pkgsrc-2011Q4-base:1.3 pkgsrc-2011Q2:1.3.0.14 pkgsrc-2011Q2-base:1.3 pkgsrc-2009Q4:1.3.0.12 pkgsrc-2009Q4-base:1.3 pkgsrc-2008Q4:1.3.0.10 pkgsrc-2008Q4-base:1.3 pkgsrc-2008Q3:1.3.0.8 pkgsrc-2008Q3-base:1.3 cube-native-xorg:1.3.0.6 cube-native-xorg-base:1.3 pkgsrc-2008Q2:1.3.0.4 pkgsrc-2008Q2-base:1.3 pkgsrc-2008Q1:1.3.0.2 pkgsrc-2008Q1-base:1.3 pkgsrc-2007Q4:1.2.0.30 pkgsrc-2007Q4-base:1.2 pkgsrc-2007Q3:1.2.0.28 pkgsrc-2007Q3-base:1.2 pkgsrc-2007Q2:1.2.0.26 pkgsrc-2007Q2-base:1.2 pkgsrc-2007Q1:1.2.0.24 pkgsrc-2007Q1-base:1.2 pkgsrc-2006Q4:1.2.0.22 pkgsrc-2006Q4-base:1.2 pkgsrc-2006Q3:1.2.0.20 pkgsrc-2006Q3-base:1.2 pkgsrc-2006Q2:1.2.0.18 pkgsrc-2006Q2-base:1.2 pkgsrc-2006Q1:1.2.0.16 pkgsrc-2006Q1-base:1.2 pkgsrc-2005Q4:1.2.0.14 pkgsrc-2005Q4-base:1.2 pkgsrc-2005Q3:1.2.0.12 pkgsrc-2005Q3-base:1.2 pkgsrc-2005Q2:1.2.0.10 pkgsrc-2005Q2-base:1.2 pkgsrc-2005Q1:1.2.0.8 pkgsrc-2005Q1-base:1.2 pkgsrc-2004Q4:1.2.0.6 pkgsrc-2004Q4-base:1.2 pkgsrc-2004Q3:1.2.0.4 pkgsrc-2004Q3-base:1.2 pkgsrc-2004Q2:1.2.0.2 pkgsrc-2004Q2-base:1.2 pkgsrc-2004Q1:1.1.1.1.0.12 pkgsrc-2004Q1-base:1.1.1.1 pkgsrc-2003Q4:1.1.1.1.0.10 pkgsrc-2003Q4-base:1.1.1.1 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.3 date 2008.03.25.13.43.17; author wiz; state dead; branches; next 1.2; 1.2 date 2004.05.03.20.56.36; author mrauch; state Exp; branches; next 1.1; 1.1 date 2002.02.13.18.09.23; author mrauch; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2002.02.13.18.09.23; author mrauch; state Exp; branches; next ; desc @@ 1.3 log @Remove openoffice (1.x branch) packages. They have security problems and are not maintained. Removal was announced on pkgsrc-users on March 13. @ text @$NetBSD: patch-ai,v 1.2 2004/05/03 20:56:36 mrauch Exp $ --- ../solenv/inc/tg_app.mk.orig 2004-04-17 19:27:25.000000000 +0200 +++ ../solenv/inc/tg_app.mk @@@@ -172,7 +172,7 @@@@ $(APP$(TNR)TARGETN): $(APP$(TNR)OBJS) $( @@+-$(RM) $(MISC)$/$(@@:b).cmd @@+echo $(LINK) $(LINKFLAGS) $(LINKFLAGSAPP) -L$(PRJ)$/$(INPATH)$/lib $(SOLARLIB) $(STDSLO) \ -o $@@ $(APP$(TNR)OBJS:s/.obj/.o/) "\" > $(MISC)$/$(@@:b).cmd - @@cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(@@:b).cmd + @@cat $(mktmp /dev/null $(APP$(TNR)LIBS)) | sed -E 's#[[:space:]]+# #g' | xargs -n 1 cat | sed s\#$(ROUT)\#$(OUT)\#g | sed 's#$$# \\#' >> $(MISC)$/$(@@:b).cmd @@+echo $(APP_LINKTYPE) $(APP$(TNR)LIBSALCPPRT) $(APP$(TNR)STDLIBS) $(STDLIB) $(STDLIB$(TNR)) >> $(MISC)$/$(@@:b).cmd cat $(MISC)$/$(@@:b).cmd @@source $(MISC)$/$(@@:b).cmd @ 1.2 log @Update to version 1.1.1. New features include: * PDF, DocBook/XML, XHTML and Macromedia Flash (SWF) export * Accessibility * Support for Complex Text Layout (CTL) * User installation automated @ text @d1 1 a1 1 $NetBSD$ @ 1.1 log @Initial revision @ text @d3 11 a13 303 --- ../bridges/source/cpp_uno/gcc2_netbsd_powerpc/except.cxx.orig Sun Jan 6 11:42:57 2002 +++ ../bridges/source/cpp_uno/gcc2_netbsd_powerpc/except.cxx @@@@ -0,0 +1,300 @@@@ +#include +#include +#include +#if STLPORT_VERSION<321 +#include +#else +#include +#endif +#ifndef _RTL_ALLOC_H_ +#include +#endif +#ifndef _OSL_DIAGNOSE_H_ +#include +#endif + +#ifndef _BRIDGES_CPP_UNO_BRIDGE_HXX_ +#include +#endif +#ifndef _TYPELIB_TYPEDESCRIPTION_HXX_ +#include +#endif +#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ +#include +#endif + +#include + +#include "gcc2_netbsd_powerpc.hxx" + +using namespace std; +using namespace osl; +using namespace rtl; +using namespace com::sun::star::uno; + +namespace CPPU_CURRENT_NAMESPACE +{ + +//================================================================================================== +static OString toUNOname( const OString & rRTTIname ) +{ + OString aRet; + + sal_Char* pStr = rRTTIname.getStr(); + sal_Char* pOrg = pStr; + + // check for namespace + if( *pStr == '_' ) + pStr++; + if( *pStr == 'Q' ) + { + pStr++; + if( *pStr++ == '_' ) + { + while( *pStr++ != '_' ) + ; + } + } + + while( *pStr ) + { + int nCharsToCopy = 0; + while( *pStr >= '0' && *pStr <= '9' ) + nCharsToCopy = 10*nCharsToCopy + (int)(*pStr++ - '0'); + if( aRet.getLength() ) + aRet += "."; + aRet += rRTTIname.copy( pStr - pOrg, nCharsToCopy ); + pStr += nCharsToCopy; + } + + return aRet; +} +//================================================================================================== +static OString toRTTIname( const OString & rUNOname ) +{ + if( ! rUNOname.getLength() ) + return OString(); + + OStringBuffer aRet( 64 ); + + sal_Int32 nIndex = 0; + sal_Int32 nToken = 0; + do + { + OString aToken( rUNOname.getToken( 0, '.', nIndex ) ); + aRet.append( OString::valueOf( (sal_Int32)aToken.getLength() ) ); + aRet.append( aToken ); + ++nToken; + } + while (nIndex >= 0); + + OString ret( aRet.makeStringAndClear() ); + + if( nToken >= 2 ) + { + OStringBuffer buf( 64 ); + buf.append( 'Q' ); + if( nToken > 9 ) + aRet.append( '_' ); + buf.append( OString::valueOf( (sal_Int32)nToken ) ); + if( nToken > 9 ) + aRet.append( '_' ); + buf.append( ret ); + ret = buf.makeStringAndClear(); + } + + return ret; +} + + +//################################################################################################## +//#### RTTI simulation ############################################################################# +//################################################################################################## + +class RTTIHolder +{ + static std::map< OString, void* > aAllRTTI; +public: + static void* getRTTI( const OString& rTypename ); + static void* getRTTI_UnoName( const OString& rUnoTypename ) + { return getRTTI( toRTTIname( rUnoTypename ) ); } + + static void* insertRTTI( const OString& rTypename ); + static void* insertRTTI_UnoName( const OString& rTypename ) + { return insertRTTI( toRTTIname( rTypename ) ); } + + // rSuperTypename MUST exist !!! + static void* insertRTTI( const OString& rTypename, const OString& rSuperTypename ); + static void* insertRTTI_UnoNames( const OString& rTypename, const OString& rSuperTypename ) + { return insertRTTI( toRTTIname( rTypename ), toRTTIname( rSuperTypename ) ); } + + // for complex RTTI + static void* insertRTTI( const OString& rTypename, void* pRTTI ); + static void* insertRTTI_UnoName( const OString&rTypename, void* pRTTI ) + { return insertRTTI( toRTTIname( rTypename ), pRTTI ); } +}; + +std::map< OString, void* > RTTIHolder::aAllRTTI; + +void* RTTIHolder::getRTTI( const OString& rTypename ) +{ + std::map< OString, void* >::iterator element; + + element = aAllRTTI.find( rTypename ); + return element != aAllRTTI.end() ? (*element).second : NULL; +} + +void* RTTIHolder::insertRTTI( const OString& rTypename ) +{ +#ifdef DEBUG + fprintf( stderr, "generating base RTTI: %s\n", rTypename.getStr() ); +#endif + void* pRTTI = new __user_type_info( strdup( rTypename.getStr() ) ); + aAllRTTI[ rTypename ] = pRTTI; + return pRTTI; +} + +void* RTTIHolder::insertRTTI( const OString& rTypename, const OString& rSuperTypename ) +{ + OSL_ENSURE( ! getRTTI( rTypename ), "insert RTTI called on already existing type" ); + void* pRTTI = new __si_type_info( strdup( rTypename.getStr() ), *(__user_type_info*)getRTTI( rSuperTypename ) ); + aAllRTTI[ rTypename ] = pRTTI; + return pRTTI; +} + +void* RTTIHolder::insertRTTI( const OString& rTypename, void* pRTTI ) +{ + aAllRTTI[ rTypename ] = pRTTI; + return pRTTI; +} + +//-------------------------------------------------------------------------------------------------- + +static void* generateRTTI( typelib_CompoundTypeDescription * pCompTypeDescr ) +{ + OString aCompTypeName( OUStringToOString( pCompTypeDescr->aBase.pTypeName, RTL_TEXTENCODING_ASCII_US ) ); + void* pRTTI = RTTIHolder::getRTTI_UnoName( aCompTypeName ); + if( pRTTI ) + return pRTTI; + + if( ! pCompTypeDescr->pBaseTypeDescription ) + // this is a base type + return RTTIHolder::insertRTTI_UnoName( aCompTypeName ); + if( ! pCompTypeDescr->pBaseTypeDescription->pBaseTypeDescription ) + { + OString aBasename( + OUStringToOString( pCompTypeDescr->pBaseTypeDescription->aBase.pTypeName, RTL_TEXTENCODING_ASCII_US ) + ); + if( ! RTTIHolder::getRTTI_UnoName( aBasename ) ) + RTTIHolder::insertRTTI_UnoName( aBasename ); + + // this type has only one supertype + return RTTIHolder::insertRTTI_UnoNames( aCompTypeName, aBasename ); + } + + // create __si_type_info + void* pSuperRTTI = generateRTTI( pCompTypeDescr->pBaseTypeDescription ); + OString aCompTypeRTTIname( toRTTIname( aCompTypeName ) ); +#ifdef DEBUG + fprintf( stderr, "generating RTTI: %s\n", aCompTypeRTTIname.getStr() ); +#endif + pRTTI = new __si_type_info( strdup( aCompTypeRTTIname.getStr() ), + *(__user_type_info*)pSuperRTTI ); +#if 0 + __class_type_info::base_info* pBaseInfo = new __class_type_info::base_info; + pBaseInfo->base = (__user_type_info*)pSuperRTTI; + pBaseInfo->offset = 0; + pBaseInfo->is_virtual = 0; + pBaseInfo->access1 = __class_type_info::PUBLIC; + + OString aCompTypeRTTIname( toRTTIname( aCompTypeName ) ); + pRTTI = new __class_type_info( + strdup( aCompTypeRTTIname.getStr() ), + pBaseInfo, + 1 + ); +#endif + return RTTIHolder::insertRTTI_UnoName( aCompTypeName, pRTTI ); +} + +//-------------------------------------------------------------------------------------------------- + +static Mutex s_aMutex; +static std::map< void*, typelib_TypeDescription* > aExceptionMap; + +static void deleteException( void* pExc, int nDummy ) +{ + MutexGuard aGuard( s_aMutex ); + std::map< void*, typelib_TypeDescription* >::iterator element = + aExceptionMap.find( pExc ); + OSL_ASSERT( element != aExceptionMap.end() ); + if( element != aExceptionMap.end() ) + { + typelib_TypeDescription* pType = (*element).second; + aExceptionMap.erase( pExc ); + uno_destructData( pExc, pType, cpp_release ); + typelib_typedescription_release( pType ); + } +} + +//__________________________________________________________________________________________________ + +//################################################################################################## +//#### exported #################################################################################### +//################################################################################################## + + +void gcc291_netbsd_powerpc_raiseException( uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ) +{ + // construct cpp exception object + typelib_TypeDescription * pTypeDescr = 0; + typelib_typedescriptionreference_getDescription( &pTypeDescr, pUnoExc->pType ); + + void * pCppExc = __eh_alloc( pTypeDescr->nSize ); // will be released in generated dtor + uno_copyAndConvertData( pCppExc, pUnoExc->pData, pTypeDescr, pUno2Cpp ); + + // destruct uno exception + uno_any_destruct( pUnoExc, 0 ); + + // a must be + OSL_ENSURE( sizeof(sal_Int32) == sizeof(void *), "### pointer size differs from sal_Int32!" ); + + typelib_CompoundTypeDescription * pCompTypeDescr = (typelib_CompoundTypeDescription *)pTypeDescr; + void* pRTTI = generateRTTI( pCompTypeDescr ); + + { + MutexGuard aGuard( s_aMutex ); + aExceptionMap[ pCppExc ] = pTypeDescr; + } + + __cp_push_exception( pCppExc, pRTTI, deleteException ); + __throw(); + +} + +void gcc291_netbsd_powerpc_fillUnoException( cp_eh_info* pInfo, uno_Any* pExc, uno_Mapping * pCpp2Uno ) +{ + OUString aName( OStringToOUString( + toUNOname( ((__user_type_info*)(pInfo->type))->name() ), RTL_TEXTENCODING_ASCII_US ) ); + + typelib_TypeDescription * pExcTypeDescr = 0; + typelib_typedescription_getByName( + &pExcTypeDescr, + aName.pData ); + OSL_ENSURE( pExcTypeDescr, "could not get type description for exception" ); + + if (pExcTypeDescr) + { + // construct cpp exception any + Any aAny( pInfo->value, pExcTypeDescr ); // const_cast + typelib_typedescription_release( pExcTypeDescr ); + // construct uno exception any + typelib_TypeDescription* pAnyDescr = 0; + getCppuType( (const Any *)0 ).getDescription( &pAnyDescr ); + uno_copyAndConvertData( pExc, &aAny, pAnyDescr, pCpp2Uno ); + typelib_typedescription_release( pAnyDescr ); + } +} + +} + @ 1.1.1.1 log @OpenOffice.org is an Open Source, community-developed, multi-platform office productivity suite. It includes the key desktop applications, such as a word processor, spreadsheet, presentation manager, and drawing program, with a user interface and feature set similar to other office suites. @ text @@