Impress Remote 1.0.5, tag sdremote-1.0.5
[LibreOffice.git] / extensions / test / stm / testfactreg.hxx
blobe26b0176748579ab803c6079bb8445765e157776
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 XInterfaceRef OPipeTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
20 Sequence<UString> OPipeTest_getSupportedServiceNames(void) THROWS(());
21 UString OPipeTest_getServiceName() THROWS(());
22 UString OPipeTest_getImplementationName() THROWS(());
24 XInterfaceRef ODataStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
25 Sequence<UString> ODataStreamTest_getSupportedServiceNames( int i) THROWS(());
26 UString ODataStreamTest_getServiceName( int i) THROWS( ( ) );
27 UString ODataStreamTest_getImplementationName( int i) THROWS(());
29 XInterfaceRef OMarkableOutputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
30 Sequence<UString> OMarkableOutputStreamTest_getSupportedServiceNames(void) THROWS(());
31 UString OMarkableOutputStreamTest_getServiceName() THROWS(());
32 UString OMarkableOutputStreamTest_getImplementationName() THROWS(());
34 XInterfaceRef OMarkableInputStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
35 Sequence<UString> OMarkableInputStreamTest_getSupportedServiceNames(void) THROWS(());
36 UString OMarkableInputStreamTest_getServiceName() THROWS(());
37 UString OMarkableInputStreamTest_getImplementationName() THROWS(());
39 XInterfaceRef OObjectStreamTest_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
40 Sequence<UString> OObjectStreamTest_getSupportedServiceNames( int i) THROWS(());
41 UString OObjectStreamTest_getServiceName( int i) THROWS(());
42 UString OObjectStreamTest_getImplementationName( int i) THROWS(());
44 XInterfaceRef OMyPersistObject_CreateInstance( const XMultiServiceFactoryRef & rSMgr ) THROWS((Exception));
45 Sequence<UString> OMyPersistObject_getSupportedServiceNames( ) THROWS(());
46 UString OMyPersistObject_getServiceName( ) THROWS(());
47 UString OMyPersistObject_getImplementationName( ) THROWS(());
49 Sequence<BYTE> createSeq( char * p );
50 Sequence<BYTE> createIntSeq( INT32 i );
52 #define BUILD_ERROR(expr, Message)\
54 m_seqErrors.realloc( m_seqErrors.getLen() + 1 ); \
55 m_seqExceptions.realloc( m_seqExceptions.getLen() + 1 ); \
56 String str; \
57 str += __FILE__;\
58 str += " "; \
59 str += "(" ; \
60 str += __LINE__ ;\
61 str += ")\n";\
62 str += "[ " ; \
63 str += #expr; \
64 str += " ] : " ; \
65 str += Message; \
66 m_seqErrors.getArray()[ m_seqErrors.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
68 ((void)0)
71 #define WARNING_ASSERT(expr, Message) \
72 if( ! (expr) ) { \
73 m_seqWarnings.realloc( m_seqErrors.getLen() +1 ); \
74 String str;\
75 str += __FILE__;\
76 str += " "; \
77 str += "(" ; \
78 str += __LINE__ ;\
79 str += ")\n";\
80 str += "[ " ; \
81 str += #expr; \
82 str += " ] : " ; \
83 str += Message; \
84 m_seqWarnings.getArray()[ m_seqWarnings.getLen()-1] = StringToOUString( str , CHARSET_SYSTEM ); \
85 return; \
87 ((void)0)
89 #define ERROR_ASSERT(expr, Message) \
90 if( ! (expr) ) { \
91 BUILD_ERROR(expr, Message );\
92 return; \
94 ((void)0)
96 #define ERROR_EXCEPTION_ASSERT(expr, Message, Exception) \
97 if( !(expr)) { \
98 BUILD_ERROR(expr,Message);\
99 m_seqExceptions.getArray()[ m_seqExceptions.getLen()-1] = UsrAny( Exception );\
100 return; \
102 ((void)0)
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */