Update ooo320-m1
[ooovba.git] / extensions / test / stm / testfactreg.hxx
blob6722a4f43dd73ef90fd99f5a1d414e1c2085dabe
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: testfactreg.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 XInterfaceRef OPipeTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
31 Sequence<UString> OPipeTest_getSupportedServiceNames(void) THROWS( () );
32 UString OPipeTest_getServiceName() THROWS( () );
33 UString OPipeTest_getImplementationName() THROWS( () );
35 XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
36 Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS( () );
37 UString ODataStreamTest_getServiceName( int i) THROWS( ( ) );
38 UString ODataStreamTest_getImplementationName( int i) THROWS( () );
40 XInterfaceRef OMarkableOutputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
41 Sequence<UString> OMarkableOutputStreamTest_getSupportedServiceNames(void) THROWS( () );
42 UString OMarkableOutputStreamTest_getServiceName() THROWS( () );
43 UString OMarkableOutputStreamTest_getImplementationName() THROWS( () );
45 XInterfaceRef OMarkableInputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
46 Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS( () );
47 UString OMarkableInputStreamTest_getServiceName() THROWS( () );
48 UString OMarkableInputStreamTest_getImplementationName() THROWS( () );
50 XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
51 Sequence<UString> OObjectStreamTest_getSupportedServiceNames( int i) THROWS( () );
52 UString OObjectStreamTest_getServiceName( int i) THROWS( () );
53 UString OObjectStreamTest_getImplementationName( int i) THROWS( () );
55 XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
56 Sequence<UString> OMyPersistObject_getSupportedServiceNames( ) THROWS( () );
57 UString OMyPersistObject_getServiceName( ) THROWS( () );
58 UString OMyPersistObject_getImplementationName( ) THROWS( () );
60 Sequence<BYTE> createSeq( char * p );
61 Sequence<BYTE> createIntSeq( INT32 i );
63 #define BUILD_ERROR(expr, Message)\
65 m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \
66 m_seqExceptions.realloc( m_seqExceptions.getLen() + 1 ); \
67 String str; \
68 str += __FILE__;\
69 str += " "; \
70 str += "(" ; \
71 str += __LINE__ ;\
72 str += ")\n";\
73 str += "[ " ; \
74 str += #expr; \
75 str += " ] : " ; \
76 str += Message; \
77 m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
79 ((void)0)
82 #define WARNING_ASSERT(expr, Message) \
83 if( ! (expr) ) { \
84 m_seqWarnings.realloc( m_seqErrors.getLen() +1 ); \
85 String str;\
86 str += __FILE__;\
87 str += " "; \
88 str += "(" ; \
89 str += __LINE__ ;\
90 str += ")\n";\
91 str += "[ " ; \
92 str += #expr; \
93 str += " ] : " ; \
94 str += Message; \
95 m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
96 return; \
98 ((void)0)
100 #define ERROR_ASSERT(expr, Message) \
101 if( ! (expr) ) { \
102 BUILD_ERROR(expr, Message );\
103 return; \
105 ((void)0)
107 #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \
108 if( !(expr)) { \
109 BUILD_ERROR(expr,Message);\
110 m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\
111 return; \
113 ((void)0)