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 24 #ifndef SC_SCDLL_HXX 25 #define SC_SCDLL_HXX 26 27 class ResMgr; 28 class SvFactory; 29 class SotFactory; 30 class StatusBar; 31 class SfxMedium; 32 class SfxFilter; 33 34 #include <sfx2/sfxdefs.hxx> 35 #include <sfx2/module.hxx> 36 #include <sfx2/docfac.hxx> 37 38 //------------------------------------------------------------------------- 39 40 class ScDLL 41 42 /* [Description] 43 44 This class is a wrapper for a Load-On-Demand-DLL. One instance 45 per SfxApplication will be created for the runtime of 46 SfxApplication-subclass::Main(). 47 48 Remember: Do export this class! It is used by the application. 49 */ 50 51 { 52 public: 53 // Ctor/Dtor must be linked to the application 54 ScDLL(); 55 ~ScDLL(); 56 57 // static-init/exit-code must be linked to the application 58 static void LibInit(); // called from SfxApplication-subclass::Init() 59 static void LibExit(); // called from SfxApplication-subclass::Exit() 60 static void PreExit(); // muss vor LibExit gerufen werden 61 62 // DLL-init/exit-code must be linked to the DLL only 63 static void Init(); // called directly after loading the DLL 64 static void Exit(); // called directly befor unloading the DLL 65 66 static sal_uLong DetectFilter( SfxMedium& rMedium, const SfxFilter** ppFilter, 67 SfxFilterFlags nMust, SfxFilterFlags nDont ); 68 }; 69 70 #define SC_DLL() ( *(ScModule**) GetAppData(SHL_CALC) ) 71 72 #endif 73 74 75