xref: /aoo42x/main/sfx2/source/appl/appmain.cxx (revision d119d52d)
1*d119d52dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*d119d52dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*d119d52dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*d119d52dSAndrew Rist  * distributed with this work for additional information
6*d119d52dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*d119d52dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*d119d52dSAndrew Rist  * "License"); you may not use this file except in compliance
9*d119d52dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10*d119d52dSAndrew Rist  *
11*d119d52dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*d119d52dSAndrew Rist  *
13*d119d52dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*d119d52dSAndrew Rist  * software distributed under the License is distributed on an
15*d119d52dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*d119d52dSAndrew Rist  * KIND, either express or implied.  See the License for the
17*d119d52dSAndrew Rist  * specific language governing permissions and limitations
18*d119d52dSAndrew Rist  * under the License.
19*d119d52dSAndrew Rist  *
20*d119d52dSAndrew Rist  *************************************************************/
21*d119d52dSAndrew Rist 
22*d119d52dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_sfx2.hxx"
26cdf0e10cSrcweir 
27cdf0e10cSrcweir //#define TF_NEWDESKTOP
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #define _SDINTERN_HXX
30cdf0e10cSrcweir 
31cdf0e10cSrcweir #include <stdio.h>
32cdf0e10cSrcweir #include <tools/urlobj.hxx>
33cdf0e10cSrcweir #include <tools/config.hxx>
34cdf0e10cSrcweir #include <svtools/ehdl.hxx>
35cdf0e10cSrcweir #include <unotools/startoptions.hxx>
36cdf0e10cSrcweir #include <svl/itempool.hxx>
37cdf0e10cSrcweir #include <svl/urihelper.hxx>
38cdf0e10cSrcweir #include <svtools/helpopt.hxx>
39cdf0e10cSrcweir #include <vos/process.hxx>
40cdf0e10cSrcweir #include <framework/sfxhelperfunctions.hxx>
41cdf0e10cSrcweir #include <rtl/ustring.hxx>
42cdf0e10cSrcweir #include <com/sun/star/uno/Exception.hpp>
43cdf0e10cSrcweir #include <com/sun/star/uno/RuntimeException.hpp>
44cdf0e10cSrcweir #include <com/sun/star/uno/Reference.hxx>
45cdf0e10cSrcweir 
46cdf0e10cSrcweir #include "sfxtypes.hxx"
47cdf0e10cSrcweir #include "appdata.hxx"
48cdf0e10cSrcweir #include <sfx2/docfac.hxx>
49cdf0e10cSrcweir #include <sfx2/app.hxx>
50cdf0e10cSrcweir #include "arrdecl.hxx"
51cdf0e10cSrcweir #include <sfx2/dispatch.hxx>
52cdf0e10cSrcweir #include "sfx2/sfxresid.hxx"
53cdf0e10cSrcweir #include <sfx2/fcontnr.hxx>
54cdf0e10cSrcweir #include <sfx2/viewsh.hxx>
55cdf0e10cSrcweir #include "intro.hxx"
56cdf0e10cSrcweir #include <sfx2/msgpool.hxx>
57cdf0e10cSrcweir #include <sfx2/mnumgr.hxx>
58cdf0e10cSrcweir #include <sfx2/appuno.hxx>
59cdf0e10cSrcweir #include "app.hrc"
60cdf0e10cSrcweir #include <sfx2/docfile.hxx>
61cdf0e10cSrcweir #include "workwin.hxx"
62cdf0e10cSrcweir 
63cdf0e10cSrcweir #ifdef UNX
64cdf0e10cSrcweir #define stricmp(a,b) strcmp(a,b)
65cdf0e10cSrcweir #endif
66cdf0e10cSrcweir 
67cdf0e10cSrcweir 
68cdf0e10cSrcweir //===================================================================
69cdf0e10cSrcweir 
70cdf0e10cSrcweir DBG_NAME(SfxAppMainNewMenu)
71cdf0e10cSrcweir DBG_NAME(SfxAppMainBmkMenu)
72cdf0e10cSrcweir DBG_NAME(SfxAppMainWizMenu)
73cdf0e10cSrcweir DBG_NAME(SfxAppMainOLEReg)
74cdf0e10cSrcweir DBG_NAME(SfxAppMainCHAOSReg)
75cdf0e10cSrcweir 
76cdf0e10cSrcweir //===================================================================
77cdf0e10cSrcweir 
78cdf0e10cSrcweir #define SFX_TEMPNAMEBASE_DIR	"soffice.tmp"
79cdf0e10cSrcweir #define SFX_KEY_TEMPNAMEBASE	"Temp-Dir"
80cdf0e10cSrcweir 
81cdf0e10cSrcweir //===================================================================
82cdf0e10cSrcweir 
83cdf0e10cSrcweir #ifdef TF_POOLABLE
84cdf0e10cSrcweir static SfxItemInfo __READONLY_DATA aItemInfos[] =
85cdf0e10cSrcweir {
86cdf0e10cSrcweir 	{ 0, 0 }
87cdf0e10cSrcweir };
88cdf0e10cSrcweir #endif
89cdf0e10cSrcweir 
90cdf0e10cSrcweir //===================================================================
91cdf0e10cSrcweir 
92cdf0e10cSrcweir TYPEINIT2(SfxApplication,SfxShell,SfxBroadcaster);
93cdf0e10cSrcweir 
94cdf0e10cSrcweir //--------------------------------------------------------------------
95cdf0e10cSrcweir void SfxApplication::Init
96cdf0e10cSrcweir (
97cdf0e10cSrcweir )
98cdf0e10cSrcweir 
99cdf0e10cSrcweir /*	[Beschreibung]
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 	Diese virtuelle Methode wird vom SFx aus Application:a:Main() gerufen,
102cdf0e10cSrcweir 	bevor Execute() ausgef"uhrt wird und
103cdf0e10cSrcweir 	- das Intro bereits angezeigt ist,
104cdf0e10cSrcweir 	- das Applikationsfenster exisitiert, aber noch hidden ist,
105cdf0e10cSrcweir 	- die Bindings bereits existieren (Controller sind anmeldbar),
106cdf0e10cSrcweir 	- der Ini- und Config-Manager bereits existiert,
107cdf0e10cSrcweir 	- die Standard-Controller bereits exisitieren,
108cdf0e10cSrcweir 	- die SFx-Shells ihre Interfaces bereits registriert haben.
109cdf0e10cSrcweir 
110cdf0e10cSrcweir 	[Querverweise]
111cdf0e10cSrcweir 	<SfxApplication::Exit()>
112cdf0e10cSrcweir 	<SfxApplication::OpenClients()>
113cdf0e10cSrcweir */
114cdf0e10cSrcweir {
115cdf0e10cSrcweir }
116cdf0e10cSrcweir 
117cdf0e10cSrcweir //--------------------------------------------------------------------
118cdf0e10cSrcweir 
119cdf0e10cSrcweir void SfxApplication::Exit()
120cdf0e10cSrcweir 
121cdf0e10cSrcweir /*	[Beschreibung]
122cdf0e10cSrcweir 
123cdf0e10cSrcweir 	Diese virtuelle Methode wird vom SFx aus Application::Main() gerufen,
124cdf0e10cSrcweir 	nachdem Execute() beendet ist und
125cdf0e10cSrcweir 	- die Konfiguration (SfxConfigManager) bereits gespeichert wurde,
126cdf0e10cSrcweir 	- die Fensterpostionen etc. in den SfxIniManager geschrieben wurden,
127cdf0e10cSrcweir 	- das Applikationsfenster noch existiert, aber hidden ist
128cdf0e10cSrcweir 	- s"amtliche Dokumente und deren Views bereits geschlossen sind.
129cdf0e10cSrcweir 	- Dispatcher, Bindings etc. bereits zerst"ort sind
130cdf0e10cSrcweir 
131cdf0e10cSrcweir 	[Querverweise]
132cdf0e10cSrcweir 	<SfxApplication::Init(int,char*[])>
133cdf0e10cSrcweir */
134cdf0e10cSrcweir 
135cdf0e10cSrcweir {
136cdf0e10cSrcweir }
137cdf0e10cSrcweir 
138cdf0e10cSrcweir //---------------------------------------------------------------------------
139cdf0e10cSrcweir 
140cdf0e10cSrcweir void SfxApplication::PreInit( )
141cdf0e10cSrcweir {
142cdf0e10cSrcweir }
143cdf0e10cSrcweir 
144cdf0e10cSrcweir void SfxApplication::Main( )
145cdf0e10cSrcweir {
146cdf0e10cSrcweir }
147cdf0e10cSrcweir 
148cdf0e10cSrcweir //-------------------------------------------------------------------------
149cdf0e10cSrcweir 
150cdf0e10cSrcweir SfxFilterMatcher& SfxApplication::GetFilterMatcher()
151cdf0e10cSrcweir {
152cdf0e10cSrcweir 	if( !pAppData_Impl->pMatcher )
153cdf0e10cSrcweir 	{
154cdf0e10cSrcweir 		pAppData_Impl->pMatcher = new SfxFilterMatcher();
155cdf0e10cSrcweir         URIHelper::SetMaybeFileHdl( STATIC_LINK(
156cdf0e10cSrcweir 			pAppData_Impl->pMatcher, SfxFilterMatcher, MaybeFileHdl_Impl ) );
157cdf0e10cSrcweir 	}
158cdf0e10cSrcweir 	return *pAppData_Impl->pMatcher;
159cdf0e10cSrcweir }
160