1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #include <cstddef> 29 #include <rtl/string.hxx> 30 #include <typeinfo> 31 32 typedef struct _uno_Any uno_Any; 33 typedef struct _uno_Mapping uno_Mapping; 34 35 // private C50 structures and functions 36 namespace __Crun 37 { 38 struct static_type_info 39 { 40 std::ptrdiff_t m_pClassName; 41 int m_nSkip1; // must be 0 42 void* m_pMagic; // points to some magic data 43 int m_nMagic[ 4 ]; 44 int m_nSkip2[2]; // must be 0 45 }; 46 void* ex_alloc(unsigned); 47 void ex_throw( void*, const static_type_info*, void(*)(void*)); 48 void* ex_get(); 49 void ex_rethrow_q() throw(); 50 } 51 52 namespace __Cimpl 53 { 54 const char* ex_name(); 55 } 56 57 extern "C" void _ex_register( void*, int ); 58 59 namespace CPPU_CURRENT_NAMESPACE 60 { 61 62 inline char* adjustPointer( char* pIn, typelib_TypeDescription* pType ) 63 { 64 switch( pType->nSize ) 65 { 66 case 1: return pIn + 3; 67 case 2: return pIn + 2; 68 case 3: return pIn + 1; 69 // Huh ? perhaps a char[3] ? Though that would be a pointer 70 // well, we have it anyway for symmetry 71 } 72 return pIn; 73 } 74 75 //################################################################################################## 76 //#### exceptions ################################################################################## 77 //################################################################################################## 78 79 void cc50_solaris_sparc_raiseException( 80 uno_Any * pUnoExc, uno_Mapping * pUno2Cpp ); 81 82 void cc50_solaris_sparc_fillUnoException( 83 void*, const char*, 84 uno_Any*, uno_Mapping * pCpp2Uno ); 85 86 } 87 88