1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #include <rtl/strbuf.hxx> 28*cdf0e10cSrcweir 29*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OPipeTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception ); 30*cdf0e10cSrcweir Sequence<OUString> OPipeTest_getSupportedServiceNames(void) throw(); 31*cdf0e10cSrcweir OUString OPipeTest_getServiceName() throw(); 32*cdf0e10cSrcweir OUString OPipeTest_getImplementationName() throw(); 33*cdf0e10cSrcweir 34*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OPumpTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception ); 35*cdf0e10cSrcweir Sequence<OUString> OPumpTest_getSupportedServiceNames(void) throw(); 36*cdf0e10cSrcweir OUString OPumpTest_getServiceName() throw(); 37*cdf0e10cSrcweir OUString OPumpTest_getImplementationName() throw(); 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir Reference< XInterface > SAL_CALL ODataStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception); 40*cdf0e10cSrcweir Sequence<OUString> ODataStreamTest_getSupportedServiceNames( int i) throw(); 41*cdf0e10cSrcweir OUString ODataStreamTest_getServiceName( int i) throw(); 42*cdf0e10cSrcweir OUString ODataStreamTest_getImplementationName( int i) throw(); 43*cdf0e10cSrcweir 44*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OMarkableOutputStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception); 45*cdf0e10cSrcweir Sequence<OUString> OMarkableOutputStreamTest_getSupportedServiceNames(void) throw(); 46*cdf0e10cSrcweir OUString OMarkableOutputStreamTest_getServiceName() throw(); 47*cdf0e10cSrcweir OUString OMarkableOutputStreamTest_getImplementationName() throw(); 48*cdf0e10cSrcweir 49*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OMarkableInputStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception); 50*cdf0e10cSrcweir Sequence<OUString> OMarkableInputStreamTest_getSupportedServiceNames(void) throw(); 51*cdf0e10cSrcweir OUString OMarkableInputStreamTest_getServiceName() throw(); 52*cdf0e10cSrcweir OUString OMarkableInputStreamTest_getImplementationName() throw(); 53*cdf0e10cSrcweir 54*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OObjectStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception); 55*cdf0e10cSrcweir Sequence<OUString> OObjectStreamTest_getSupportedServiceNames( int i) throw(); 56*cdf0e10cSrcweir OUString OObjectStreamTest_getServiceName( int i) throw(); 57*cdf0e10cSrcweir OUString OObjectStreamTest_getImplementationName( int i) throw(); 58*cdf0e10cSrcweir 59*cdf0e10cSrcweir Reference< XInterface > SAL_CALL OMyPersistObject_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception); 60*cdf0e10cSrcweir Sequence<OUString> OMyPersistObject_getSupportedServiceNames( ) throw(); 61*cdf0e10cSrcweir OUString OMyPersistObject_getServiceName( ) throw(); 62*cdf0e10cSrcweir OUString OMyPersistObject_getImplementationName( ) throw(); 63*cdf0e10cSrcweir 64*cdf0e10cSrcweir Sequence<sal_Int8> createSeq( char * p ); 65*cdf0e10cSrcweir Sequence<sal_Int8> createIntSeq( sal_Int32 i ); 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir #define BUILD_ERROR(expr, Message)\ 68*cdf0e10cSrcweir {\ 69*cdf0e10cSrcweir m_seqErrors.realloc( m_seqErrors.getLength() + 1 ); \ 70*cdf0e10cSrcweir m_seqExceptions.realloc( m_seqExceptions.getLength() + 1 ); \ 71*cdf0e10cSrcweir OStringBuffer str(128); \ 72*cdf0e10cSrcweir str.append( __FILE__ );\ 73*cdf0e10cSrcweir str.append( " " ); \ 74*cdf0e10cSrcweir str.append( "(" ); \ 75*cdf0e10cSrcweir str.append( OString::valueOf( (sal_Int32)__LINE__) );\ 76*cdf0e10cSrcweir str.append(")\n" );\ 77*cdf0e10cSrcweir str.append( "[ " ); \ 78*cdf0e10cSrcweir str.append( #expr ); \ 79*cdf0e10cSrcweir str.append( " ] : " ); \ 80*cdf0e10cSrcweir str.append( Message ); \ 81*cdf0e10cSrcweir m_seqErrors.getArray()[ m_seqErrors.getLength()-1] =\ 82*cdf0e10cSrcweir OStringToOUString( str.makeStringAndClear() , RTL_TEXTENCODING_ASCII_US ); \ 83*cdf0e10cSrcweir }\ 84*cdf0e10cSrcweir ((void)0) 85*cdf0e10cSrcweir 86*cdf0e10cSrcweir 87*cdf0e10cSrcweir #define WARNING_ASSERT(expr, Message) \ 88*cdf0e10cSrcweir if( ! (expr) ) { \ 89*cdf0e10cSrcweir m_seqWarnings.realloc( m_seqErrors.getLength() +1 ); \ 90*cdf0e10cSrcweir OStringBuffer str(128);\ 91*cdf0e10cSrcweir str.append( __FILE__);\ 92*cdf0e10cSrcweir str.append( " "); \ 93*cdf0e10cSrcweir str.append( "(" ); \ 94*cdf0e10cSrcweir str.append(OString::valueOf( (sal_Int32)__LINE__)) ;\ 95*cdf0e10cSrcweir str.append( ")\n");\ 96*cdf0e10cSrcweir str.append( "[ " ); \ 97*cdf0e10cSrcweir str.append( #expr ); \ 98*cdf0e10cSrcweir str.append( " ] : ") ; \ 99*cdf0e10cSrcweir str.append( Message); \ 100*cdf0e10cSrcweir m_seqWarnings.getArray()[ m_seqWarnings.getLength()-1] =\ 101*cdf0e10cSrcweir OStringToOUString( str.makeStringAndClear() , RTL_TEXTENCODING_ASCII_US ); \ 102*cdf0e10cSrcweir return; \ 103*cdf0e10cSrcweir }\ 104*cdf0e10cSrcweir ((void)0) 105*cdf0e10cSrcweir 106*cdf0e10cSrcweir #define ERROR_ASSERT(expr, Message) \ 107*cdf0e10cSrcweir if( ! (expr) ) { \ 108*cdf0e10cSrcweir BUILD_ERROR(expr, Message );\ 109*cdf0e10cSrcweir return; \ 110*cdf0e10cSrcweir }\ 111*cdf0e10cSrcweir ((void)0) 112*cdf0e10cSrcweir 113*cdf0e10cSrcweir #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \ 114*cdf0e10cSrcweir if( !(expr)) { \ 115*cdf0e10cSrcweir BUILD_ERROR(expr,Message);\ 116*cdf0e10cSrcweir m_seqExceptions.getArray()[ m_seqExceptions.getLength()-1] = Any( Exception );\ 117*cdf0e10cSrcweir return; \ 118*cdf0e10cSrcweir } \ 119*cdf0e10cSrcweir ((void)0) 120