xref: /aoo4110/main/sw/inc/newhdl.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _NEWHDL_HXX
24 #define _NEWHDL_HXX
25 
26 #include <tools/link.hxx>
27 
28 #include "errhdl.hxx"		// hier kommt auch swtypes rein, was ich brauche
29 
30 // ----------------------------------------------------------------------------
31 
32 extern void SW_NEW_HDL();
33 
34 class SwNewHdl
35 {
36 		friend void SW_NEW_HDL();
37 private:
38 		char*			pWarnMem;
39 		char*			pExceptMem;
40 		Link 			aWarnLnk;
41 		Link			aErrLnk;
42 public:
43 		void	SetWarnLnk( const Link &rLink );
44 		void	SetErrLnk( const Link &rLink );
45 
46 		sal_Bool	TryWarnMem();
47 
48 		sal_Bool 	Flush_WarnMem();
49 		sal_Bool 	Flush_ExceptMem();
50 
51 		SwNewHdl();
52 		~SwNewHdl();
53 };
54 
55 /******************************************************************************
56  *	INLINE
57  ******************************************************************************/
SetWarnLnk(const Link & rLink)58 inline void SwNewHdl::SetWarnLnk( const Link &rLink )
59 {
60 	aWarnLnk = rLink;
61 }
62 
SetErrLnk(const Link & rLink)63 inline void SwNewHdl::SetErrLnk( const Link &rLink )
64 {
65 	aErrLnk = rLink;
66 }
67 
68 #endif
69 
70