merge the formfield patch from ooo-build
[ooovba.git] / io / test / stm / testfactreg.hxx
blob565983ab3ca1034a7ec856ef223b7785480f4743
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 #include <rtl/strbuf.hxx>
32 Reference< XInterface > SAL_CALL OPipeTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception );
33 Sequence<OUString> OPipeTest_getSupportedServiceNames(void) throw();
34 OUString OPipeTest_getServiceName() throw();
35 OUString OPipeTest_getImplementationName() throw();
37 Reference< XInterface > SAL_CALL OPumpTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw( Exception );
38 Sequence<OUString> OPumpTest_getSupportedServiceNames(void) throw();
39 OUString OPumpTest_getServiceName() throw();
40 OUString OPumpTest_getImplementationName() throw();
42 Reference< XInterface > SAL_CALL ODataStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception);
43 Sequence<OUString> ODataStreamTest_getSupportedServiceNames( int i) throw();
44 OUString ODataStreamTest_getServiceName( int i) throw();
45 OUString ODataStreamTest_getImplementationName( int i) throw();
47 Reference< XInterface > SAL_CALL OMarkableOutputStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception);
48 Sequence<OUString> OMarkableOutputStreamTest_getSupportedServiceNames(void) throw();
49 OUString OMarkableOutputStreamTest_getServiceName() throw();
50 OUString OMarkableOutputStreamTest_getImplementationName() throw();
52 Reference< XInterface > SAL_CALL OMarkableInputStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception);
53 Sequence<OUString> OMarkableInputStreamTest_getSupportedServiceNames(void) throw();
54 OUString OMarkableInputStreamTest_getServiceName() throw();
55 OUString OMarkableInputStreamTest_getImplementationName() throw();
57 Reference< XInterface > SAL_CALL OObjectStreamTest_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception);
58 Sequence<OUString> OObjectStreamTest_getSupportedServiceNames( int i) throw();
59 OUString OObjectStreamTest_getServiceName( int i) throw();
60 OUString OObjectStreamTest_getImplementationName( int i) throw();
62 Reference< XInterface > SAL_CALL OMyPersistObject_CreateInstance( const Reference< XMultiServiceFactory > & rSMgr ) throw(Exception);
63 Sequence<OUString> OMyPersistObject_getSupportedServiceNames( ) throw();
64 OUString OMyPersistObject_getServiceName( ) throw();
65 OUString OMyPersistObject_getImplementationName( ) throw();
67 Sequence<sal_Int8> createSeq( char * p );
68 Sequence<sal_Int8> createIntSeq( sal_Int32 i );
70 #define BUILD_ERROR(expr, Message)\
72 m_seqErrors.realloc( m_seqErrors.getLength() + 1 ); \
73 m_seqExceptions.realloc( m_seqExceptions.getLength() + 1 ); \
74 OStringBuffer str(128); \
75 str.append( __FILE__ );\
76 str.append( " " ); \
77 str.append( "(" ); \
78 str.append( OString::valueOf( (sal_Int32)__LINE__) );\
79 str.append(")\n" );\
80 str.append( "[ " ); \
81 str.append( #expr ); \
82 str.append( " ] : " ); \
83 str.append( Message ); \
84 m_seqErrors.getArray()[ m_seqErrors.getLength()-1] =\
85 OStringToOUString( str.makeStringAndClear() , RTL_TEXTENCODING_ASCII_US ); \
87 ((void)0)
90 #define WARNING_ASSERT(expr, Message) \
91 if( ! (expr) ) { \
92 m_seqWarnings.realloc( m_seqErrors.getLength() +1 ); \
93 OStringBuffer str(128);\
94 str.append( __FILE__);\
95 str.append( " "); \
96 str.append( "(" ); \
97 str.append(OString::valueOf( (sal_Int32)__LINE__)) ;\
98 str.append( ")\n");\
99 str.append( "[ " ); \
100 str.append( #expr ); \
101 str.append( " ] : ") ; \
102 str.append( Message); \
103 m_seqWarnings.getArray()[ m_seqWarnings.getLength()-1] =\
104 OStringToOUString( str.makeStringAndClear() , RTL_TEXTENCODING_ASCII_US ); \
105 return; \
107 ((void)0)
109 #define ERROR_ASSERT(expr, Message) \
110 if( ! (expr) ) { \
111 BUILD_ERROR(expr, Message );\
112 return; \
114 ((void)0)
116 #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \
117 if( !(expr)) { \
118 BUILD_ERROR(expr,Message);\
119 m_seqExceptions.getArray()[ m_seqExceptions.getLength()-1] = Any( Exception );\
120 return; \
122 ((void)0)