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 #ifndef _RETSTRM_HXX
28 #define _RETSTRM_HXX
29 
30 #include <basic/sbxvar.hxx>
31 #include "cmdbasestream.hxx"
32 
33 class SvStream;
34 
35 class RetStream: public CmdBaseStream
36 {
37 
38 public:
39 	RetStream();
40 	~RetStream();
41 
42     using CmdBaseStream::GenError;
43 //  new
44 	void GenError( rtl::OString aUId, String aString );
45 
46     using CmdBaseStream::GenReturn;
47     void GenReturn( comm_USHORT nRet, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, nNr );}
48 	void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nNr );}
49     void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, bBool );}
50 
51 // MacroRecorder
52     void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod );} // also used outside MacroRecorder
53 	void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_BOOL bBool ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, bBool );}
54 	void GenReturn( comm_USHORT nRet, rtl::OString aUId, comm_USHORT nMethod, comm_ULONG nNr ){CmdBaseStream::GenReturn( nRet, &aUId, nMethod, nNr );}
55 
56 //  new
57     void GenReturn( sal_uInt16 nRet, rtl::OString aUId, String aString );
58 	void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_ULONG nNr, String aString, sal_Bool bBool );
59 
60 // needed for RemoteCommand and Profiling
61 	void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, SbxValue &aValue );
62     void GenReturn( sal_uInt16 nRet, sal_uInt16 nMethod, String aString );
63 
64 // MacroRecorder
65     void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString );
66     void GenReturn( sal_uInt16 nRet, rtl::OString aUId, comm_USHORT nMethod, String aString, sal_Bool bBool );
67 
68     void Reset();
69 	SvStream* GetStream();
70 
71 
72 
73     using CmdBaseStream::Write;
74     void Write( comm_USHORT nNr ){CmdBaseStream::Write( nNr );}
75     void Write( comm_ULONG nNr ){CmdBaseStream::Write( nNr );}
76 	void Write( comm_BOOL bBool ){CmdBaseStream::Write( bBool );}
77 //  new
78 	void Write( SbxValue &aValue );
79 
80 // Complex Datatypes to be handled system dependent
81 	virtual void Write( rtl::OString* pId );
82     virtual void Write( String *pString );
83 
84 	SvStream *pSammel;
85 };
86 
87 #endif
88