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 XInterfaceRef OPipeTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
28 Sequence<UString> OPipeTest_getSupportedServiceNames(void) THROWS( () );
29 UString     OPipeTest_getServiceName() THROWS( () );
30 UString 	OPipeTest_getImplementationName() THROWS( () );
31 
32 XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
33 Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () );
34 UString     ODataStreamTest_getServiceName( int i) THROWS( ( ) );
35 UString 	ODataStreamTest_getImplementationName( int i) THROWS( () );
36 
37 XInterfaceRef OMarkableOutputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
38 Sequence<UString> OMarkableOutputStreamTest_getSupportedServiceNames(void) THROWS( () );
39 UString     OMarkableOutputStreamTest_getServiceName() THROWS( () );
40 UString 	OMarkableOutputStreamTest_getImplementationName() THROWS( () );
41 
42 XInterfaceRef OMarkableInputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
43 Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS( () );
44 UString     OMarkableInputStreamTest_getServiceName() THROWS( () );
45 UString 	OMarkableInputStreamTest_getImplementationName() THROWS( () );
46 
47 XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
48 Sequence<UString> OObjectStreamTest_getSupportedServiceNames( int i) THROWS( () );
49 UString     OObjectStreamTest_getServiceName( int i) THROWS( () );
50 UString 	OObjectStreamTest_getImplementationName( int i) THROWS( () );
51 
52 XInterfaceRef 		OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
53 Sequence<UString> 	OMyPersistObject_getSupportedServiceNames( ) THROWS( () );
54 UString     		OMyPersistObject_getServiceName( ) THROWS( () );
55 UString 			OMyPersistObject_getImplementationName( ) THROWS( () );
56 
57 Sequence<BYTE> createSeq( char * p );
58 Sequence<BYTE> createIntSeq( INT32 i );
59 
60 #define BUILD_ERROR(expr, Message)\
61 		{\
62 			m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \
63 		m_seqExceptions.realloc(  m_seqExceptions.getLen() + 1 ); \
64 		String str; \
65 		str += __FILE__;\
66 		str += " "; \
67 		str += "(" ; \
68 		str += __LINE__ ;\
69 		str += ")\n";\
70 		str += "[ " ; \
71 		str += #expr; \
72 		str += " ] : " ; \
73 		str += Message; \
74 		m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
75 		}\
76 		((void)0)
77 
78 
79 #define WARNING_ASSERT(expr, Message) \
80 		if( ! (expr) ) { \
81 			m_seqWarnings.realloc( m_seqErrors.getLen() +1 ); \
82 			String str;\
83 			str += __FILE__;\
84 			str += " "; \
85 			str += "(" ; \
86 			str += __LINE__ ;\
87 			str += ")\n";\
88 			str += "[ " ; \
89 			str += #expr; \
90 			str += " ] : " ; \
91 			str += Message; \
92 			m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
93 			return; \
94 		}\
95 		((void)0)
96 
97 #define ERROR_ASSERT(expr, Message) \
98 		if( ! (expr) ) { \
99 			BUILD_ERROR(expr, Message );\
100 			return; \
101 		}\
102 		((void)0)
103 
104 #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \
105 	if( !(expr)) { \
106 		BUILD_ERROR(expr,Message);\
107 		m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\
108 		return; \
109 	} \
110 	((void)0)
111