xref: /aoo41x/main/sfx2/source/inc/appdata.hxx (revision 353d8f4d)
1*353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*353d8f4dSAndrew Rist  * distributed with this work for additional information
6*353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9*353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*353d8f4dSAndrew Rist  *
11*353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*353d8f4dSAndrew Rist  *
13*353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15*353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18*353d8f4dSAndrew Rist  * under the License.
19*353d8f4dSAndrew Rist  *
20*353d8f4dSAndrew Rist  *************************************************************/
21*353d8f4dSAndrew Rist 
22*353d8f4dSAndrew Rist 
23cdf0e10cSrcweir #ifndef _SFX_APPDATA_HXX
24cdf0e10cSrcweir #define _SFX_APPDATA_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #include <tools/link.hxx>
27cdf0e10cSrcweir #include <tools/list.hxx>
28cdf0e10cSrcweir #include <svl/lstner.hxx>
29cdf0e10cSrcweir #include <vcl/timer.hxx>
30cdf0e10cSrcweir #include <tools/string.hxx>
31cdf0e10cSrcweir #include "rtl/ref.hxx"
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
34cdf0e10cSrcweir 
35cdf0e10cSrcweir #include "bitset.hxx"
36cdf0e10cSrcweir 
37cdf0e10cSrcweir class SfxApplication;
38cdf0e10cSrcweir class SvStrings;
39cdf0e10cSrcweir class SfxProgress;
40cdf0e10cSrcweir class SfxChildWinFactArr_Impl;
41cdf0e10cSrcweir class SfxDdeDocTopics_Impl;
42cdf0e10cSrcweir class DdeService;
43cdf0e10cSrcweir class SfxEventConfiguration;
44cdf0e10cSrcweir class SfxMacroConfig;
45cdf0e10cSrcweir class SfxItemPool;
46cdf0e10cSrcweir class SfxInitLinkList;
47cdf0e10cSrcweir class SfxFilterMatcher;
48cdf0e10cSrcweir class SvUShorts;
49cdf0e10cSrcweir class ISfxTemplateCommon;
50cdf0e10cSrcweir class SfxFilterMatcher;
51cdf0e10cSrcweir class SfxStatusDispatcher;
52cdf0e10cSrcweir class SfxDdeTriggerTopic_Impl;
53cdf0e10cSrcweir class SfxDocumentTemplates;
54cdf0e10cSrcweir class SfxFrameArr_Impl;
55cdf0e10cSrcweir class SvtSaveOptions;
56cdf0e10cSrcweir class SvtUndoOptions;
57cdf0e10cSrcweir class SvtHelpOptions;
58cdf0e10cSrcweir class SfxObjectFactory;
59cdf0e10cSrcweir class SfxObjectShell;
60cdf0e10cSrcweir class ResMgr;
61cdf0e10cSrcweir class Window;
62cdf0e10cSrcweir class SfxTbxCtrlFactArr_Impl;
63cdf0e10cSrcweir class SfxStbCtrlFactArr_Impl;
64cdf0e10cSrcweir class SfxMenuCtrlFactArr_Impl;
65cdf0e10cSrcweir class SfxViewFrameArr_Impl;
66cdf0e10cSrcweir class SfxViewShellArr_Impl;
67cdf0e10cSrcweir class SfxObjectShellArr_Impl;
68cdf0e10cSrcweir class ResMgr;
69cdf0e10cSrcweir class SimpleResMgr;
70cdf0e10cSrcweir class SfxViewFrame;
71cdf0e10cSrcweir class SfxSlotPool;
72cdf0e10cSrcweir class SfxResourceManager;
73cdf0e10cSrcweir class SfxDispatcher;
74cdf0e10cSrcweir class SfxInterface;
75cdf0e10cSrcweir class BasicManager;
76cdf0e10cSrcweir class SfxBasicManagerHolder;
77cdf0e10cSrcweir class SfxBasicManagerCreationListener;
78cdf0e10cSrcweir 
79cdf0e10cSrcweir namespace sfx2 { namespace appl { class ImeStatusWindow; } }
80cdf0e10cSrcweir 
81cdf0e10cSrcweir typedef Link* LinkPtr;
82cdf0e10cSrcweir SV_DECL_PTRARR(SfxInitLinkList, LinkPtr, 4, 4)
83cdf0e10cSrcweir 
84cdf0e10cSrcweir //=========================================================================
85cdf0e10cSrcweir // SfxAppData_Impl
86cdf0e10cSrcweir //=========================================================================
87cdf0e10cSrcweir 
88cdf0e10cSrcweir class SfxAppData_Impl
89cdf0e10cSrcweir {
90cdf0e10cSrcweir public:
91cdf0e10cSrcweir     IndexBitSet                         aIndexBitSet;           // for counting noname documents
92cdf0e10cSrcweir     String                              aLastDir;               // for IO dialog
93cdf0e10cSrcweir 
94cdf0e10cSrcweir     // DDE stuff
95cdf0e10cSrcweir     DdeService*                         pDdeService;
96cdf0e10cSrcweir 	SfxDdeDocTopics_Impl*               pDocTopics;
97cdf0e10cSrcweir 	SfxDdeTriggerTopic_Impl*            pTriggerTopic;
98cdf0e10cSrcweir 	DdeService*                         pDdeService2;
99cdf0e10cSrcweir 
100cdf0e10cSrcweir     // single instance classes
101cdf0e10cSrcweir     SfxChildWinFactArr_Impl*            pFactArr;
102cdf0e10cSrcweir 	SfxFrameArr_Impl*                   pTopFrames;
103cdf0e10cSrcweir 
104cdf0e10cSrcweir     // special members
105cdf0e10cSrcweir 	SfxInitLinkList*                    pInitLinkList;
106cdf0e10cSrcweir 
107cdf0e10cSrcweir     // application members
108cdf0e10cSrcweir 	SfxFilterMatcher*                   pMatcher;
109cdf0e10cSrcweir 	ResMgr*                             pBasicResMgr;
110cdf0e10cSrcweir 	ResMgr*                             pSvtResMgr;
111cdf0e10cSrcweir 	SfxStatusDispatcher*				pAppDispatch;
112cdf0e10cSrcweir     SfxDocumentTemplates*               pTemplates;
113cdf0e10cSrcweir 
114cdf0e10cSrcweir     // global pointers
115cdf0e10cSrcweir 	SfxItemPool*                        pPool;
116cdf0e10cSrcweir 	SvUShorts*                          pDisabledSlotList;
117cdf0e10cSrcweir 	SvStrings*                          pSecureURLs;
118cdf0e10cSrcweir     SvtSaveOptions*                     pSaveOptions;
119cdf0e10cSrcweir     SvtUndoOptions*                     pUndoOptions;
120cdf0e10cSrcweir     SvtHelpOptions*                     pHelpOptions;
121cdf0e10cSrcweir 
122cdf0e10cSrcweir     // "current" functionality
123cdf0e10cSrcweir 	SfxProgress*                        pProgress;
124cdf0e10cSrcweir 	ISfxTemplateCommon*                 pTemplateCommon;
125cdf0e10cSrcweir 
126cdf0e10cSrcweir     sal_uInt16                              nDocModalMode;              // counts documents in modal mode
127cdf0e10cSrcweir 	sal_uInt16                              nAutoTabPageId;
128cdf0e10cSrcweir 	sal_uInt16                              nRescheduleLocks;
129cdf0e10cSrcweir 	sal_uInt16                              nInReschedule;
130cdf0e10cSrcweir 	sal_uInt16                              nAsynchronCalls;
131cdf0e10cSrcweir 
132cdf0e10cSrcweir     rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
133cdf0e10cSrcweir 
134cdf0e10cSrcweir     SfxTbxCtrlFactArr_Impl*     pTbxCtrlFac;
135cdf0e10cSrcweir     SfxStbCtrlFactArr_Impl*     pStbCtrlFac;
136cdf0e10cSrcweir     SfxMenuCtrlFactArr_Impl*    pMenuCtrlFac;
137cdf0e10cSrcweir     SfxViewFrameArr_Impl*       pViewFrames;
138cdf0e10cSrcweir     SfxViewShellArr_Impl*       pViewShells;
139cdf0e10cSrcweir     SfxObjectShellArr_Impl*     pObjShells;
140cdf0e10cSrcweir     ResMgr*                     pSfxResManager;
141cdf0e10cSrcweir     ResMgr*                     pOfaResMgr;
142cdf0e10cSrcweir     SimpleResMgr*				pSimpleResManager;
143cdf0e10cSrcweir     SfxBasicManagerHolder*      pBasicManager;
144cdf0e10cSrcweir     SfxBasicManagerCreationListener*
145cdf0e10cSrcweir                                 pBasMgrListener;
146cdf0e10cSrcweir     SfxViewFrame*               pViewFrame;
147cdf0e10cSrcweir     SfxSlotPool*                pSlotPool;
148cdf0e10cSrcweir     SfxResourceManager*         pResMgr;
149cdf0e10cSrcweir     SfxDispatcher*              pAppDispat;     // Dispatcher falls kein Doc
150cdf0e10cSrcweir     SfxInterface**              pInterfaces;
151cdf0e10cSrcweir 
152cdf0e10cSrcweir     sal_uInt16                      nDocNo;     		// Laufende Doc-Nummer (AutoName)
153cdf0e10cSrcweir     sal_uInt16                      nInterfaces;
154cdf0e10cSrcweir 
155cdf0e10cSrcweir     sal_Bool                        bDispatcherLocked:1;    // nichts ausf"uhren
156cdf0e10cSrcweir     sal_Bool                        bDowning:1;   // sal_True ab Exit und danach
157cdf0e10cSrcweir     sal_Bool                        bInQuit : 1;
158cdf0e10cSrcweir     sal_Bool                        bInvalidateOnUnlock : 1;
159cdf0e10cSrcweir     sal_Bool                        bODFVersionWarningLater : 1;
160cdf0e10cSrcweir 
161cdf0e10cSrcweir                                 SfxAppData_Impl( SfxApplication* );
162cdf0e10cSrcweir                                 ~SfxAppData_Impl();
163cdf0e10cSrcweir 
164cdf0e10cSrcweir     void                        UpdateApplicationSettings( sal_Bool bDontHide );
165cdf0e10cSrcweir     SfxDocumentTemplates*       GetDocumentTemplates();
166cdf0e10cSrcweir     void                        DeInitDDE();
167cdf0e10cSrcweir 
168cdf0e10cSrcweir     /** called when the Application's BasicManager has been created. This can happen
169cdf0e10cSrcweir         explicitly in SfxApplication::GetBasicManager, or implicitly if a document's
170cdf0e10cSrcweir         BasicManager is created before the application's BasicManager exists.
171cdf0e10cSrcweir     */
172cdf0e10cSrcweir     void                        OnApplicationBasicManagerCreated( BasicManager& _rManager );
173cdf0e10cSrcweir };
174cdf0e10cSrcweir 
175cdf0e10cSrcweir #endif // #ifndef _SFX_APPDATA_HXX
176cdf0e10cSrcweir 
177cdf0e10cSrcweir 
178