xref: /aoo4110/main/sw/inc/swdll.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 SW_SWDLL_HXX
24 #define SW_SWDLL_HXX
25 
26 class StatusBar;
27 
28 #include <sfx2/sfxdefs.hxx>
29 #include <sfx2/module.hxx>
30 
31 #include <tools/shl.hxx>
32 
33 //-------------------------------------------------------------------------
34 
35 class SwDLL
36 
37 /*	[Description]
38 
39 	This class is a wrapper for a Load-On-Demand-DLL. One instance
40 	per SfxApplication will be created for the runtime of
41 	SfxApplication-subclass::Main().
42 
43 	Remember: Do export this class! It is used by the application.
44 */
45 
46 {
47 
48 	static void RegisterFactories();
49 	static void RegisterInterfaces();
50 	static void RegisterControls();
51 public:
52 					// Ctor/Dtor must be linked to the application
53 					SwDLL();
54 					~SwDLL();
55 
56 	static void 	Init(); 	// called directly after loading the DLL
57 	static void 	Exit(); 	// called directly befor unloading the DLL
58 };
59 
60 //-------------------------------------------------------------------------
61 
62 #define SW_DLL() ( *(SwModule**) GetAppData(SHL_WRITER) )
63 
64 #endif
65 
66