1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: smdll0.hxx,v $
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 ************************************************************************/
34 #include <bf_so3/pseudo.hxx>
36 #ifndef _SFXMODULE_HXX //autogen
37 #include <bf_sfx2/module.hxx>
39 #ifndef _SHL_HXX //autogen
40 #include <tools/shl.hxx>
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
68 // SvFactory name convention:
69 // 'p' + SfxObjectShell-subclass + 'Factory'
70 SotFactory
*pSmDocShellFactory
;
72 SmModuleDummy(ResMgr
*pResMgr
,
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