merge the formfield patch from ooo-build
[ooovba.git] / binfilter / inc / bf_starmath / smdll0.hxx
blob95447caaaa51e55347ee4a3241ff2e47fb50b2f7
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: smdll0.hxx,v $
10 * $Revision: 1.6 $
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 SMDLL0_HXX
32 #define SMDLL0_HXX
34 #include <bf_so3/pseudo.hxx>
36 #ifndef _SFXMODULE_HXX //autogen
37 #include <bf_sfx2/module.hxx>
38 #endif
39 #ifndef _SHL_HXX //autogen
40 #include <tools/shl.hxx>
41 #endif
42 class SvFactory;
43 class SotFactory;
45 namespace binfilter {
47 /*************************************************************************
49 |* define dummy-version only if not in Sd-DLL
51 \************************************************************************/
53 #define SM_MOD() ( *(SmModuleDummy**) GetAppData(BF_SHL_SM) )
55 /*************************************************************************
57 |* This tricky class keeps pointers to the SvFactories while
58 |* the DLL isn`t loaded. A pointer to the one instance is available
59 |* through SD_MOD() (shared-lib-app-data).
61 \************************************************************************/
63 class SmModuleDummy : public SfxModule
65 public:
66 TYPEINFO();
68 // SvFactory name convention:
69 // 'p' + SfxObjectShell-subclass + 'Factory'
70 SotFactory *pSmDocShellFactory;
72 SmModuleDummy(ResMgr *pResMgr,
73 BOOL bDummy,
74 SotFactory *pObjFact) :
75 SfxModule(pResMgr, bDummy, (SfxObjectFactory*) pObjFact, NULL),
76 pSmDocShellFactory(pObjFact)
80 virtual SfxModule *Load ();
82 static const SvGlobalName GetID(USHORT nFileFormat);
83 static USHORT HasID (const SvGlobalName& rID);
86 } //namespace binfilter
87 #endif