xref: /aoo41x/main/sfx2/source/inc/appdata.hxx (revision cdf0e10c)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _SFX_APPDATA_HXX
28*cdf0e10cSrcweir #define _SFX_APPDATA_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <tools/link.hxx>
31*cdf0e10cSrcweir #include <tools/list.hxx>
32*cdf0e10cSrcweir #include <svl/lstner.hxx>
33*cdf0e10cSrcweir #include <vcl/timer.hxx>
34*cdf0e10cSrcweir #include <tools/string.hxx>
35*cdf0e10cSrcweir #include "rtl/ref.hxx"
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
38*cdf0e10cSrcweir 
39*cdf0e10cSrcweir #include "bitset.hxx"
40*cdf0e10cSrcweir 
41*cdf0e10cSrcweir class SfxApplication;
42*cdf0e10cSrcweir class SvStrings;
43*cdf0e10cSrcweir class SfxProgress;
44*cdf0e10cSrcweir class SfxChildWinFactArr_Impl;
45*cdf0e10cSrcweir class SfxDdeDocTopics_Impl;
46*cdf0e10cSrcweir class DdeService;
47*cdf0e10cSrcweir class SfxEventConfiguration;
48*cdf0e10cSrcweir class SfxMacroConfig;
49*cdf0e10cSrcweir class SfxItemPool;
50*cdf0e10cSrcweir class SfxInitLinkList;
51*cdf0e10cSrcweir class SfxFilterMatcher;
52*cdf0e10cSrcweir class SvUShorts;
53*cdf0e10cSrcweir class ISfxTemplateCommon;
54*cdf0e10cSrcweir class SfxFilterMatcher;
55*cdf0e10cSrcweir class SfxStatusDispatcher;
56*cdf0e10cSrcweir class SfxDdeTriggerTopic_Impl;
57*cdf0e10cSrcweir class SfxDocumentTemplates;
58*cdf0e10cSrcweir class SfxFrameArr_Impl;
59*cdf0e10cSrcweir class SvtSaveOptions;
60*cdf0e10cSrcweir class SvtUndoOptions;
61*cdf0e10cSrcweir class SvtHelpOptions;
62*cdf0e10cSrcweir class SfxObjectFactory;
63*cdf0e10cSrcweir class SfxObjectShell;
64*cdf0e10cSrcweir class ResMgr;
65*cdf0e10cSrcweir class Window;
66*cdf0e10cSrcweir class SfxTbxCtrlFactArr_Impl;
67*cdf0e10cSrcweir class SfxStbCtrlFactArr_Impl;
68*cdf0e10cSrcweir class SfxMenuCtrlFactArr_Impl;
69*cdf0e10cSrcweir class SfxViewFrameArr_Impl;
70*cdf0e10cSrcweir class SfxViewShellArr_Impl;
71*cdf0e10cSrcweir class SfxObjectShellArr_Impl;
72*cdf0e10cSrcweir class ResMgr;
73*cdf0e10cSrcweir class SimpleResMgr;
74*cdf0e10cSrcweir class SfxViewFrame;
75*cdf0e10cSrcweir class SfxSlotPool;
76*cdf0e10cSrcweir class SfxResourceManager;
77*cdf0e10cSrcweir class SfxDispatcher;
78*cdf0e10cSrcweir class SfxInterface;
79*cdf0e10cSrcweir class BasicManager;
80*cdf0e10cSrcweir class SfxBasicManagerHolder;
81*cdf0e10cSrcweir class SfxBasicManagerCreationListener;
82*cdf0e10cSrcweir 
83*cdf0e10cSrcweir namespace sfx2 { namespace appl { class ImeStatusWindow; } }
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir typedef Link* LinkPtr;
86*cdf0e10cSrcweir SV_DECL_PTRARR(SfxInitLinkList, LinkPtr, 4, 4)
87*cdf0e10cSrcweir 
88*cdf0e10cSrcweir //=========================================================================
89*cdf0e10cSrcweir // SfxAppData_Impl
90*cdf0e10cSrcweir //=========================================================================
91*cdf0e10cSrcweir 
92*cdf0e10cSrcweir class SfxAppData_Impl
93*cdf0e10cSrcweir {
94*cdf0e10cSrcweir public:
95*cdf0e10cSrcweir     IndexBitSet                         aIndexBitSet;           // for counting noname documents
96*cdf0e10cSrcweir     String                              aLastDir;               // for IO dialog
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir     // DDE stuff
99*cdf0e10cSrcweir     DdeService*                         pDdeService;
100*cdf0e10cSrcweir 	SfxDdeDocTopics_Impl*               pDocTopics;
101*cdf0e10cSrcweir 	SfxDdeTriggerTopic_Impl*            pTriggerTopic;
102*cdf0e10cSrcweir 	DdeService*                         pDdeService2;
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir     // single instance classes
105*cdf0e10cSrcweir     SfxChildWinFactArr_Impl*            pFactArr;
106*cdf0e10cSrcweir 	SfxFrameArr_Impl*                   pTopFrames;
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir     // special members
109*cdf0e10cSrcweir 	SfxInitLinkList*                    pInitLinkList;
110*cdf0e10cSrcweir 
111*cdf0e10cSrcweir     // application members
112*cdf0e10cSrcweir 	SfxFilterMatcher*                   pMatcher;
113*cdf0e10cSrcweir 	ResMgr*                             pBasicResMgr;
114*cdf0e10cSrcweir 	ResMgr*                             pSvtResMgr;
115*cdf0e10cSrcweir 	SfxStatusDispatcher*				pAppDispatch;
116*cdf0e10cSrcweir     SfxDocumentTemplates*               pTemplates;
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir     // global pointers
119*cdf0e10cSrcweir 	SfxItemPool*                        pPool;
120*cdf0e10cSrcweir 	SvUShorts*                          pDisabledSlotList;
121*cdf0e10cSrcweir 	SvStrings*                          pSecureURLs;
122*cdf0e10cSrcweir     SvtSaveOptions*                     pSaveOptions;
123*cdf0e10cSrcweir     SvtUndoOptions*                     pUndoOptions;
124*cdf0e10cSrcweir     SvtHelpOptions*                     pHelpOptions;
125*cdf0e10cSrcweir 
126*cdf0e10cSrcweir     // "current" functionality
127*cdf0e10cSrcweir 	SfxProgress*                        pProgress;
128*cdf0e10cSrcweir 	ISfxTemplateCommon*                 pTemplateCommon;
129*cdf0e10cSrcweir 
130*cdf0e10cSrcweir     sal_uInt16                              nDocModalMode;              // counts documents in modal mode
131*cdf0e10cSrcweir 	sal_uInt16                              nAutoTabPageId;
132*cdf0e10cSrcweir 	sal_uInt16                              nRescheduleLocks;
133*cdf0e10cSrcweir 	sal_uInt16                              nInReschedule;
134*cdf0e10cSrcweir 	sal_uInt16                              nAsynchronCalls;
135*cdf0e10cSrcweir 
136*cdf0e10cSrcweir     rtl::Reference< sfx2::appl::ImeStatusWindow > m_xImeStatusWindow;
137*cdf0e10cSrcweir 
138*cdf0e10cSrcweir     SfxTbxCtrlFactArr_Impl*     pTbxCtrlFac;
139*cdf0e10cSrcweir     SfxStbCtrlFactArr_Impl*     pStbCtrlFac;
140*cdf0e10cSrcweir     SfxMenuCtrlFactArr_Impl*    pMenuCtrlFac;
141*cdf0e10cSrcweir     SfxViewFrameArr_Impl*       pViewFrames;
142*cdf0e10cSrcweir     SfxViewShellArr_Impl*       pViewShells;
143*cdf0e10cSrcweir     SfxObjectShellArr_Impl*     pObjShells;
144*cdf0e10cSrcweir     ResMgr*                     pSfxResManager;
145*cdf0e10cSrcweir     ResMgr*                     pOfaResMgr;
146*cdf0e10cSrcweir     SimpleResMgr*				pSimpleResManager;
147*cdf0e10cSrcweir     SfxBasicManagerHolder*      pBasicManager;
148*cdf0e10cSrcweir     SfxBasicManagerCreationListener*
149*cdf0e10cSrcweir                                 pBasMgrListener;
150*cdf0e10cSrcweir     SfxViewFrame*               pViewFrame;
151*cdf0e10cSrcweir     SfxSlotPool*                pSlotPool;
152*cdf0e10cSrcweir     SfxResourceManager*         pResMgr;
153*cdf0e10cSrcweir     SfxDispatcher*              pAppDispat;     // Dispatcher falls kein Doc
154*cdf0e10cSrcweir     SfxInterface**              pInterfaces;
155*cdf0e10cSrcweir 
156*cdf0e10cSrcweir     sal_uInt16                      nDocNo;     		// Laufende Doc-Nummer (AutoName)
157*cdf0e10cSrcweir     sal_uInt16                      nInterfaces;
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir     sal_Bool                        bDispatcherLocked:1;    // nichts ausf"uhren
160*cdf0e10cSrcweir     sal_Bool                        bDowning:1;   // sal_True ab Exit und danach
161*cdf0e10cSrcweir     sal_Bool                        bInQuit : 1;
162*cdf0e10cSrcweir     sal_Bool                        bInvalidateOnUnlock : 1;
163*cdf0e10cSrcweir     sal_Bool                        bODFVersionWarningLater : 1;
164*cdf0e10cSrcweir 
165*cdf0e10cSrcweir                                 SfxAppData_Impl( SfxApplication* );
166*cdf0e10cSrcweir                                 ~SfxAppData_Impl();
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir     void                        UpdateApplicationSettings( sal_Bool bDontHide );
169*cdf0e10cSrcweir     SfxDocumentTemplates*       GetDocumentTemplates();
170*cdf0e10cSrcweir     void                        DeInitDDE();
171*cdf0e10cSrcweir 
172*cdf0e10cSrcweir     /** called when the Application's BasicManager has been created. This can happen
173*cdf0e10cSrcweir         explicitly in SfxApplication::GetBasicManager, or implicitly if a document's
174*cdf0e10cSrcweir         BasicManager is created before the application's BasicManager exists.
175*cdf0e10cSrcweir     */
176*cdf0e10cSrcweir     void                        OnApplicationBasicManagerCreated( BasicManager& _rManager );
177*cdf0e10cSrcweir };
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir #endif // #ifndef _SFX_APPDATA_HXX
180*cdf0e10cSrcweir 
181*cdf0e10cSrcweir 
182