xref: /aoo41x/main/sfx2/source/inc/appdata.hxx (revision 353d8f4d)
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 _SFX_APPDATA_HXX
24 #define _SFX_APPDATA_HXX
25 
26 #include <tools/link.hxx>
27 #include <tools/list.hxx>
28 #include <svl/lstner.hxx>
29 #include <vcl/timer.hxx>
30 #include <tools/string.hxx>
31 #include "rtl/ref.hxx"
32 
33 #include <com/sun/star/frame/XModel.hpp>
34 
35 #include "bitset.hxx"
36 
37 class SfxApplication;
38 class SvStrings;
39 class SfxProgress;
40 class SfxChildWinFactArr_Impl;
41 class SfxDdeDocTopics_Impl;
42 class DdeService;
43 class SfxEventConfiguration;
44 class SfxMacroConfig;
45 class SfxItemPool;
46 class SfxInitLinkList;
47 class SfxFilterMatcher;
48 class SvUShorts;
49 class ISfxTemplateCommon;
50 class SfxFilterMatcher;
51 class SfxStatusDispatcher;
52 class SfxDdeTriggerTopic_Impl;
53 class SfxDocumentTemplates;
54 class SfxFrameArr_Impl;
55 class SvtSaveOptions;
56 class SvtUndoOptions;
57 class SvtHelpOptions;
58 class SfxObjectFactory;
59 class SfxObjectShell;
60 class ResMgr;
61 class Window;
62 class SfxTbxCtrlFactArr_Impl;
63 class SfxStbCtrlFactArr_Impl;
64 class SfxMenuCtrlFactArr_Impl;
65 class SfxViewFrameArr_Impl;
66 class SfxViewShellArr_Impl;
67 class SfxObjectShellArr_Impl;
68 class ResMgr;
69 class SimpleResMgr;
70 class SfxViewFrame;
71 class SfxSlotPool;
72 class SfxResourceManager;
73 class SfxDispatcher;
74 class SfxInterface;
75 class BasicManager;
76 class SfxBasicManagerHolder;
77 class SfxBasicManagerCreationListener;
78 
79 namespace sfx2 { namespace appl { class ImeStatusWindow; } }
80 
81 typedef Link* LinkPtr;
82 SV_DECL_PTRARR(SfxInitLinkList, LinkPtr, 4, 4)
83 
84 //=========================================================================
85 // SfxAppData_Impl
86 //=========================================================================
87 
88 class SfxAppData_Impl
89 {
90 public:
91     IndexBitSet                         aIndexBitSet;           // for counting noname documents
92     String                              aLastDir;               // for IO dialog
93 
94     // DDE stuff
95     DdeService*                         pDdeService;
96 	SfxDdeDocTopics_Impl*               pDocTopics;
97 	SfxDdeTriggerTopic_Impl*            pTriggerTopic;
98 	DdeService*                         pDdeService2;
99 
100     // single instance classes
101     SfxChildWinFactArr_Impl*            pFactArr;
102 	SfxFrameArr_Impl*                   pTopFrames;
103 
104     // special members
105 	SfxInitLinkList*                    pInitLinkList;
106 
107     // application members
108 	SfxFilterMatcher*                   pMatcher;
109 	ResMgr*                             pBasicResMgr;
110 	ResMgr*                             pSvtResMgr;
111 	SfxStatusDispatcher*				pAppDispatch;
112     SfxDocumentTemplates*               pTemplates;
113 
114     // global pointers
115 	SfxItemPool*                        pPool;
116 	SvUShorts*                          pDisabledSlotList;
117 	SvStrings*                          pSecureURLs;
118     SvtSaveOptions*                     pSaveOptions;
119     SvtUndoOptions*                     pUndoOptions;
120     SvtHelpOptions*                     pHelpOptions;
121 
122     // "current" functionality
123 	SfxProgress*                        pProgress;
124 	ISfxTemplateCommon*                 pTemplateCommon;
125 
126     sal_uInt16                              nDocModalMode;              // counts documents in modal mode
127 	sal_uInt16                              nAutoTabPageId;
128 	sal_uInt16                              nRescheduleLocks;
129 	sal_uInt16                              nInReschedule;
130 	sal_uInt16                              nAsynchronCalls;
131 
132     rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
133 
134     SfxTbxCtrlFactArr_Impl*     pTbxCtrlFac;
135     SfxStbCtrlFactArr_Impl*     pStbCtrlFac;
136     SfxMenuCtrlFactArr_Impl*    pMenuCtrlFac;
137     SfxViewFrameArr_Impl*       pViewFrames;
138     SfxViewShellArr_Impl*       pViewShells;
139     SfxObjectShellArr_Impl*     pObjShells;
140     ResMgr*                     pSfxResManager;
141     ResMgr*                     pOfaResMgr;
142     SimpleResMgr*				pSimpleResManager;
143     SfxBasicManagerHolder*      pBasicManager;
144     SfxBasicManagerCreationListener*
145                                 pBasMgrListener;
146     SfxViewFrame*               pViewFrame;
147     SfxSlotPool*                pSlotPool;
148     SfxResourceManager*         pResMgr;
149     SfxDispatcher*              pAppDispat;     // Dispatcher falls kein Doc
150     SfxInterface**              pInterfaces;
151 
152     sal_uInt16                      nDocNo;     		// Laufende Doc-Nummer (AutoName)
153     sal_uInt16                      nInterfaces;
154 
155     sal_Bool                        bDispatcherLocked:1;    // nichts ausf"uhren
156     sal_Bool                        bDowning:1;   // sal_True ab Exit und danach
157     sal_Bool                        bInQuit : 1;
158     sal_Bool                        bInvalidateOnUnlock : 1;
159     sal_Bool                        bODFVersionWarningLater : 1;
160 
161                                 SfxAppData_Impl( SfxApplication* );
162                                 ~SfxAppData_Impl();
163 
164     void                        UpdateApplicationSettings( sal_Bool bDontHide );
165     SfxDocumentTemplates*       GetDocumentTemplates();
166     void                        DeInitDDE();
167 
168     /** called when the Application's BasicManager has been created. This can happen
169         explicitly in SfxApplication::GetBasicManager, or implicitly if a document's
170         BasicManager is created before the application's BasicManager exists.
171     */
172     void                        OnApplicationBasicManagerCreated( BasicManager& _rManager );
173 };
174 
175 #endif // #ifndef _SFX_APPDATA_HXX
176 
177 
178