Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_svtools / ehdl.hxx
blobd6a23d480fc612160eaaeb6aba1a8b7196b0a1c1
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: ehdl.hxx,v $
10 * $Revision: 1.4 $
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 ************************************************************************/
31 #ifndef _EHDL_HXX
32 #define _EHDL_HXX
34 #ifndef __RSC
36 #ifndef INCLUDED_SVTDLLAPI_H
37 #include "bf_svtools/svtdllapi.h"
38 #endif
40 #ifndef _EINF_HXX
41 #include <tools/errinf.hxx>
42 #endif
44 class Window;
45 class ResMgr;
47 namespace binfilter
50 class SfxErrorContext : private ErrorContext
52 public:
53 SfxErrorContext(
54 USHORT nCtxIdP, const String &aArg1, Window *pWin=0,
55 USHORT nResIdP=USHRT_MAX, ResMgr *pMgrP=0);
56 virtual BOOL GetString(ULONG nErrId, String &rStr);
58 private:
59 USHORT nCtxId;
60 USHORT nResId;
61 ResMgr *pMgr;
62 String aArg1;
65 class SfxErrorHandler : private ErrorHandler
67 public:
68 SfxErrorHandler(USHORT nId, ULONG lStart, ULONG lEnd, ResMgr *pMgr=0);
69 ~SfxErrorHandler();
71 protected:
72 virtual BOOL GetErrorString(ULONG lErrId, String &, USHORT&) const;
73 virtual BOOL GetMessageString(ULONG lErrId, String &, USHORT&) const;
75 private:
77 ULONG lStart;
78 ULONG lEnd;
79 USHORT nId;
80 ResMgr *pMgr;
81 ResMgr *pFreeMgr;
83 BOOL GetClassString(ULONG lErrId, String &) const;
84 virtual BOOL CreateString(
85 const ErrorInfo *, String &, USHORT &) const;
91 #endif
93 #endif