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