bump product version to 7.2.5.1
[LibreOffice.git] / sfx2 / source / inc / appdata.hxx
blobf36a25f176e6542aad464793f76369613b9a31df
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX
20 #define INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX
22 #include <config_features.h>
24 #include <rtl/ref.hxx>
25 #include <rtl/ustring.hxx>
26 #include <svl/svdde.hxx>
27 #include <svtools/ehdl.hxx>
28 #include <sfx2/app.hxx>
29 #include <o3tl/enumarray.hxx>
31 #include <bitset.hxx>
32 #include <memory>
33 #include <vector>
35 class SfxApplication;
36 class SfxPickList;
37 class SfxProgress;
38 class SfxDdeDocTopic_Impl;
39 class DdeService;
40 class SfxItemPool;
41 class SfxFilterMatcher;
42 class ISfxTemplateCommon;
43 class SfxFilterMatcher;
44 class SfxStatusDispatcher;
45 class SfxDdeTriggerTopic_Impl;
46 class SfxDocumentTemplates;
47 class SfxFrame;
48 class SvtSaveOptions;
49 class SvtHelpOptions;
50 class SfxViewFrame;
51 class SfxSlotPool;
52 class SfxDispatcher;
53 class SfxInterface;
54 class BasicManager;
55 class SfxBasicManagerHolder;
56 class SfxBasicManagerCreationListener;
57 namespace sfx2::sidebar { class Theme; }
61 typedef std::vector<SfxDdeDocTopic_Impl*> SfxDdeDocTopics_Impl;
63 class SfxAppData_Impl
65 public:
66 IndexBitSet aIndexBitSet; // for counting noname documents
67 OUString aLastDir; // for IO dialog
69 // DDE stuff
70 std::unique_ptr<DdeService> pDdeService;
71 std::unique_ptr<SfxDdeDocTopics_Impl> pDocTopics;
72 std::unique_ptr<SfxDdeTriggerTopic_Impl> pTriggerTopic;
73 std::unique_ptr<DdeService> pDdeService2;
75 // single instance classes
76 std::unique_ptr<SfxChildWinFactArr_Impl>
77 pFactArr;
78 std::vector<SfxFrame*> vTopFrames;
80 // application members
81 std::unique_ptr<SfxFilterMatcher> pMatcher;
82 std::unique_ptr<SfxErrorHandler> m_pToolsErrorHdl;
83 std::unique_ptr<SfxErrorHandler> m_pSoErrorHdl;
84 #if HAVE_FEATURE_SCRIPTING
85 std::unique_ptr<SfxErrorHandler> m_pSbxErrorHdl;
86 #endif
87 rtl::Reference<SfxStatusDispatcher> mxAppDispatch;
88 std::unique_ptr<SfxPickList> mxAppPickList;
89 std::unique_ptr<SfxDocumentTemplates> pTemplates;
91 // global pointers
92 SfxItemPool* pPool;
94 // "current" functionality
95 SfxProgress* pProgress;
97 sal_uInt16 nDocModalMode; // counts documents in modal mode
98 sal_uInt16 nRescheduleLocks;
100 std::unique_ptr<SfxTbxCtrlFactArr_Impl>
101 pTbxCtrlFac;
102 std::unique_ptr<SfxStbCtrlFactArr_Impl>
103 pStbCtrlFac;
104 std::unique_ptr<SfxViewFrameArr_Impl>
105 pViewFrames;
106 std::unique_ptr<SfxViewShellArr_Impl>
107 pViewShells;
108 std::unique_ptr<SfxObjectShellArr_Impl>
109 pObjShells;
110 std::unique_ptr<SfxBasicManagerHolder>
111 pBasicManager;
112 std::unique_ptr<SfxBasicManagerCreationListener>
113 pBasMgrListener;
114 SfxViewFrame* pViewFrame;
115 std::unique_ptr<SfxSlotPool>
116 pSlotPool;
117 std::unique_ptr<SfxDispatcher>
118 pAppDispat; // Dispatcher if no document
119 ::rtl::Reference<sfx2::sidebar::Theme> m_pSidebarTheme;
121 bool bDowning:1; // sal_True on Exit and afterwards
122 bool bInQuit : 1;
124 SfxAppData_Impl();
125 ~SfxAppData_Impl();
127 SfxDocumentTemplates* GetDocumentTemplates();
128 void DeInitDDE();
130 o3tl::enumarray<SfxToolsModule, std::unique_ptr<SfxModule>> aModules;
132 /** called when the Application's BasicManager has been created. This can happen
133 explicitly in SfxApplication::GetBasicManager, or implicitly if a document's
134 BasicManager is created before the application's BasicManager exists.
136 void OnApplicationBasicManagerCreated( BasicManager& _rManager );
139 class SfxDdeTriggerTopic_Impl : public DdeTopic
141 #if defined(_WIN32)
142 public:
143 SfxDdeTriggerTopic_Impl()
144 : DdeTopic( "TRIGGER" )
147 virtual bool Execute( const OUString* ) override { return true; }
148 #endif
151 #endif // INCLUDED_SFX2_SOURCE_INC_APPDATA_HXX
154 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */