xref: /aoo41x/main/sw/source/ui/app/swmodule.cxx (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 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_sw.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #include <hintids.hxx>
33*cdf0e10cSrcweir #ifndef _SWERROR_H
34*cdf0e10cSrcweir #include <swerror.h>
35*cdf0e10cSrcweir #endif
36*cdf0e10cSrcweir #include <vcl/wrkwin.hxx>
37*cdf0e10cSrcweir #include <vcl/graph.hxx>
38*cdf0e10cSrcweir #include <svx/galbrws.hxx>
39*cdf0e10cSrcweir #include <svx/svdobj.hxx>
40*cdf0e10cSrcweir #include <svtools/ehdl.hxx>
41*cdf0e10cSrcweir #include <svx/fntszctl.hxx>
42*cdf0e10cSrcweir #include <svx/fntctl.hxx>
43*cdf0e10cSrcweir #include <svx/SmartTagCtl.hxx>
44*cdf0e10cSrcweir #include <svx/pszctrl.hxx>
45*cdf0e10cSrcweir #include <svx/insctrl.hxx>
46*cdf0e10cSrcweir #include <svx/selctrl.hxx>
47*cdf0e10cSrcweir #include <svx/linectrl.hxx>
48*cdf0e10cSrcweir #include <svx/tbxctl.hxx>			//z-Zt falscher includeschutz!
49*cdf0e10cSrcweir #include <svx/fillctrl.hxx>
50*cdf0e10cSrcweir #include <svx/tbcontrl.hxx>
51*cdf0e10cSrcweir #include <svx/verttexttbxctrl.hxx>
52*cdf0e10cSrcweir #include <svx/formatpaintbrushctrl.hxx>
53*cdf0e10cSrcweir #include <svx/contdlg.hxx>
54*cdf0e10cSrcweir #include <svx/layctrl.hxx>
55*cdf0e10cSrcweir #include <svx/fontwork.hxx>
56*cdf0e10cSrcweir #include <SwSpellDialogChildWindow.hxx>
57*cdf0e10cSrcweir #include <svx/tbxalign.hxx>
58*cdf0e10cSrcweir #include <svx/grafctrl.hxx>
59*cdf0e10cSrcweir #include <svx/tbxcolor.hxx>
60*cdf0e10cSrcweir #include <svx/clipboardctl.hxx>
61*cdf0e10cSrcweir #include <svx/lboxctrl.hxx>
62*cdf0e10cSrcweir #include <svx/hyprlink.hxx>
63*cdf0e10cSrcweir #include <svx/tbxcustomshapes.hxx>
64*cdf0e10cSrcweir #include <svx/imapdlg.hxx>
65*cdf0e10cSrcweir #include <svx/srchdlg.hxx>
66*cdf0e10cSrcweir #include <svx/hyperdlg.hxx>
67*cdf0e10cSrcweir #include <svx/extrusioncolorcontrol.hxx>
68*cdf0e10cSrcweir #include <svx/fontworkgallery.hxx>
69*cdf0e10cSrcweir #include <com/sun/star/scanner/XScannerManager.hpp>
70*cdf0e10cSrcweir #include <com/sun/star/container/XSet.hpp>
71*cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
72*cdf0e10cSrcweir #ifndef _DOCSH_HXX
73*cdf0e10cSrcweir #include <docsh.hxx>
74*cdf0e10cSrcweir #endif
75*cdf0e10cSrcweir #include <swmodule.hxx>
76*cdf0e10cSrcweir #include <swevent.hxx>
77*cdf0e10cSrcweir #include <swacorr.hxx>
78*cdf0e10cSrcweir #ifndef _CMDID_H
79*cdf0e10cSrcweir #include <cmdid.h>
80*cdf0e10cSrcweir #endif
81*cdf0e10cSrcweir #include <dobjfac.hxx>
82*cdf0e10cSrcweir #include <init.hxx>
83*cdf0e10cSrcweir #include <pview.hxx>
84*cdf0e10cSrcweir #include <wview.hxx>
85*cdf0e10cSrcweir #include <wdocsh.hxx>
86*cdf0e10cSrcweir #include <globdoc.hxx>
87*cdf0e10cSrcweir #ifndef _SRCVIEW_HXX //autogen
88*cdf0e10cSrcweir #include <srcview.hxx>
89*cdf0e10cSrcweir #endif
90*cdf0e10cSrcweir #include <glshell.hxx>
91*cdf0e10cSrcweir #include <tabsh.hxx>
92*cdf0e10cSrcweir #include <listsh.hxx>
93*cdf0e10cSrcweir #include <grfsh.hxx>
94*cdf0e10cSrcweir #include <mediash.hxx>
95*cdf0e10cSrcweir #include <olesh.hxx>
96*cdf0e10cSrcweir #include <drawsh.hxx>
97*cdf0e10cSrcweir #include <wformsh.hxx>
98*cdf0e10cSrcweir #include <drwtxtsh.hxx>
99*cdf0e10cSrcweir #include <beziersh.hxx>
100*cdf0e10cSrcweir #include <wtextsh.hxx>
101*cdf0e10cSrcweir #include <wfrmsh.hxx>
102*cdf0e10cSrcweir #ifndef _DRFORMSH_HXX
103*cdf0e10cSrcweir #include <drformsh.hxx>
104*cdf0e10cSrcweir #endif
105*cdf0e10cSrcweir #ifndef _WGRFSH_HXX
106*cdf0e10cSrcweir #include <wgrfsh.hxx>
107*cdf0e10cSrcweir #endif
108*cdf0e10cSrcweir #ifndef _WOLESH_HXX
109*cdf0e10cSrcweir #include <wolesh.hxx>
110*cdf0e10cSrcweir #endif
111*cdf0e10cSrcweir #ifndef _WLISTSH_HXX
112*cdf0e10cSrcweir #include <wlistsh.hxx>
113*cdf0e10cSrcweir #endif
114*cdf0e10cSrcweir #ifndef _WTABSH_HXX
115*cdf0e10cSrcweir #include <wtabsh.hxx>
116*cdf0e10cSrcweir #endif
117*cdf0e10cSrcweir #include <navipi.hxx>
118*cdf0e10cSrcweir #include <chartins.hxx>
119*cdf0e10cSrcweir #include <inputwin.hxx>
120*cdf0e10cSrcweir #include <usrpref.hxx>
121*cdf0e10cSrcweir #include <uinums.hxx>
122*cdf0e10cSrcweir #include <prtopt.hxx>
123*cdf0e10cSrcweir #include <bookctrl.hxx>
124*cdf0e10cSrcweir #include <tmplctrl.hxx>
125*cdf0e10cSrcweir #include <viewlayoutctrl.hxx>
126*cdf0e10cSrcweir #include <svx/zoomsliderctrl.hxx>
127*cdf0e10cSrcweir #include <tblctrl.hxx>
128*cdf0e10cSrcweir #include <zoomctrl.hxx>
129*cdf0e10cSrcweir #include <workctrl.hxx>
130*cdf0e10cSrcweir #include <tbxanchr.hxx>
131*cdf0e10cSrcweir #include <fldwrap.hxx>
132*cdf0e10cSrcweir #ifndef _REDLNDLG_HXX
133*cdf0e10cSrcweir #include <redlndlg.hxx>
134*cdf0e10cSrcweir #endif
135*cdf0e10cSrcweir #ifndef _SYNCBTN_HXX
136*cdf0e10cSrcweir #include <syncbtn.hxx>
137*cdf0e10cSrcweir #endif
138*cdf0e10cSrcweir #include <mailmergechildwindow.hxx>
139*cdf0e10cSrcweir #include <modcfg.hxx>
140*cdf0e10cSrcweir #include <fontcfg.hxx>
141*cdf0e10cSrcweir #include <sfx2/taskpane.hxx>
142*cdf0e10cSrcweir #include <sfx2/evntconf.hxx>
143*cdf0e10cSrcweir #include <sfx2/appuno.hxx>
144*cdf0e10cSrcweir #include <swatrset.hxx>
145*cdf0e10cSrcweir #include <idxmrk.hxx>
146*cdf0e10cSrcweir #include <dlelstnr.hxx>
147*cdf0e10cSrcweir #ifndef _BARCFG_HXX
148*cdf0e10cSrcweir #include <barcfg.hxx>
149*cdf0e10cSrcweir #endif
150*cdf0e10cSrcweir #include <svx/rubydialog.hxx>
151*cdf0e10cSrcweir // OD 14.02.2003 #107424#
152*cdf0e10cSrcweir #include <svtools/colorcfg.hxx>
153*cdf0e10cSrcweir 
154*cdf0e10cSrcweir #include <editeng/acorrcfg.hxx>
155*cdf0e10cSrcweir #include <unotools/moduleoptions.hxx>
156*cdf0e10cSrcweir 
157*cdf0e10cSrcweir #ifndef _AVMEDIA_MEDIAPPLAYER_HXX
158*cdf0e10cSrcweir #include <avmedia/mediaplayer.hxx>
159*cdf0e10cSrcweir #endif
160*cdf0e10cSrcweir #include <avmedia/mediatoolbox.hxx>
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir #include <annotsh.hxx>
163*cdf0e10cSrcweir 
164*cdf0e10cSrcweir #include <app.hrc>
165*cdf0e10cSrcweir #include <svx/xmlsecctrl.hxx>
166*cdf0e10cSrcweir ResMgr *pSwResMgr = 0;
167*cdf0e10cSrcweir sal_Bool 	bNoInterrupt 	= sal_False;
168*cdf0e10cSrcweir 
169*cdf0e10cSrcweir #include <sfx2/app.hxx>
170*cdf0e10cSrcweir 
171*cdf0e10cSrcweir #include <svx/svxerr.hxx>
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir #include <unomid.h>
174*cdf0e10cSrcweir 
175*cdf0e10cSrcweir using namespace com::sun::star;
176*cdf0e10cSrcweir 
177*cdf0e10cSrcweir 
178*cdf0e10cSrcweir TYPEINIT1( SwModule, SfxModule );
179*cdf0e10cSrcweir 
180*cdf0e10cSrcweir using namespace ::com::sun::star;
181*cdf0e10cSrcweir using namespace ::com::sun::star::uno;
182*cdf0e10cSrcweir 
183*cdf0e10cSrcweir //************************************************************************
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir SwModule::SwModule( SfxObjectFactory* pWebFact,
186*cdf0e10cSrcweir 					SfxObjectFactory* pFact,
187*cdf0e10cSrcweir 					SfxObjectFactory* pGlobalFact )
188*cdf0e10cSrcweir 	: SfxModule( SfxApplication::CreateResManager( "sw" ), sal_False, pWebFact,
189*cdf0e10cSrcweir 					 pFact, pGlobalFact, NULL ),
190*cdf0e10cSrcweir 	pModuleConfig(0),
191*cdf0e10cSrcweir     pUsrPref(0),
192*cdf0e10cSrcweir     pWebUsrPref(0),
193*cdf0e10cSrcweir     pPrtOpt(0),
194*cdf0e10cSrcweir     pWebPrtOpt(0),
195*cdf0e10cSrcweir     pChapterNumRules(0),
196*cdf0e10cSrcweir     pStdFontConfig(0),
197*cdf0e10cSrcweir     pNavigationConfig(0),
198*cdf0e10cSrcweir     pToolbarConfig(0),
199*cdf0e10cSrcweir     pWebToolbarConfig(0),
200*cdf0e10cSrcweir     pDBConfig(0),
201*cdf0e10cSrcweir     pColorConfig(0),
202*cdf0e10cSrcweir     pAccessibilityOptions(0),
203*cdf0e10cSrcweir     pCTLOptions(0),
204*cdf0e10cSrcweir     pUserOptions(0),
205*cdf0e10cSrcweir     pUndoOptions(0),
206*cdf0e10cSrcweir     pAttrPool(0),
207*cdf0e10cSrcweir     pView(0),
208*cdf0e10cSrcweir 	bAuthorInitialised(sal_False),
209*cdf0e10cSrcweir     bEmbeddedLoadSave( sal_False ),
210*cdf0e10cSrcweir     pDragDrop( 0 ),
211*cdf0e10cSrcweir     pXSelection( 0 )
212*cdf0e10cSrcweir {
213*cdf0e10cSrcweir 	SetName( String::CreateFromAscii("StarWriter") );
214*cdf0e10cSrcweir 	pSwResMgr = GetResMgr();
215*cdf0e10cSrcweir 	SvxErrorHandler::Get();
216*cdf0e10cSrcweir 	pErrorHdl = new SfxErrorHandler( RID_SW_ERRHDL,
217*cdf0e10cSrcweir 									 ERRCODE_AREA_SW,
218*cdf0e10cSrcweir 									 ERRCODE_AREA_SW_END,
219*cdf0e10cSrcweir 									 pSwResMgr );
220*cdf0e10cSrcweir 
221*cdf0e10cSrcweir 	pModuleConfig = new SwModuleOptions;
222*cdf0e10cSrcweir 
223*cdf0e10cSrcweir 	//Die brauchen wie sowieso
224*cdf0e10cSrcweir 	pToolbarConfig = new SwToolbarConfigItem( sal_False );
225*cdf0e10cSrcweir 	pWebToolbarConfig = new SwToolbarConfigItem( sal_True );
226*cdf0e10cSrcweir 
227*cdf0e10cSrcweir 	pStdFontConfig = new SwStdFontConfig;
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir 	pAuthorNames = new SvStringsDtor(5, 1);	// Alle Redlining-Autoren
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir 	//JP 18.10.96: SvxAutocorrect gegen die SwAutocorrect austauschen
232*cdf0e10cSrcweir 	SvxAutoCorrCfg*	pACfg = SvxAutoCorrCfg::Get();
233*cdf0e10cSrcweir 	if( pACfg )
234*cdf0e10cSrcweir 	{
235*cdf0e10cSrcweir 		const SvxAutoCorrect* pOld = pACfg->GetAutoCorrect();
236*cdf0e10cSrcweir 		pACfg->SetAutoCorrect(new SwAutoCorrect( *pOld ));
237*cdf0e10cSrcweir 	}
238*cdf0e10cSrcweir 
239*cdf0e10cSrcweir 	StartListening( *SFX_APP() );
240*cdf0e10cSrcweir 
241*cdf0e10cSrcweir     // OD 14.02.2003 #107424# - init color configuration
242*cdf0e10cSrcweir     // member <pColorConfig> is created and the color configuration is applied
243*cdf0e10cSrcweir     // at the view options.
244*cdf0e10cSrcweir     GetColorConfig();
245*cdf0e10cSrcweir }
246*cdf0e10cSrcweir 
247*cdf0e10cSrcweir //************************************************************************
248*cdf0e10cSrcweir 
249*cdf0e10cSrcweir uno::Reference< scanner::XScannerManager >
250*cdf0e10cSrcweir SwModule::GetScannerManager()
251*cdf0e10cSrcweir {
252*cdf0e10cSrcweir 	if (!m_xScannerManager.is())
253*cdf0e10cSrcweir 	{
254*cdf0e10cSrcweir         uno::Reference< lang::XMultiServiceFactory > xMgr (
255*cdf0e10cSrcweir 			comphelper::getProcessServiceFactory() );
256*cdf0e10cSrcweir 		if( xMgr.is() )
257*cdf0e10cSrcweir 		{
258*cdf0e10cSrcweir 			m_xScannerManager =
259*cdf0e10cSrcweir                 uno::Reference< scanner::XScannerManager >(
260*cdf0e10cSrcweir 					xMgr->createInstance(
261*cdf0e10cSrcweir 						rtl::OUString::createFromAscii(
262*cdf0e10cSrcweir 							"com.sun.star.scanner.ScannerManager" ) ),
263*cdf0e10cSrcweir                     uno::UNO_QUERY );
264*cdf0e10cSrcweir 		}
265*cdf0e10cSrcweir 	}
266*cdf0e10cSrcweir 	return m_xScannerManager;
267*cdf0e10cSrcweir }
268*cdf0e10cSrcweir 
269*cdf0e10cSrcweir uno::Reference< linguistic2::XLanguageGuessing > SwModule::GetLanguageGuesser()
270*cdf0e10cSrcweir {
271*cdf0e10cSrcweir     if (!m_xLanguageGuesser.is())
272*cdf0e10cSrcweir     {
273*cdf0e10cSrcweir         uno::Reference< lang::XMultiServiceFactory > xMgr ( comphelper::getProcessServiceFactory() );
274*cdf0e10cSrcweir         if (xMgr.is())
275*cdf0e10cSrcweir         {
276*cdf0e10cSrcweir             m_xLanguageGuesser = uno::Reference< linguistic2::XLanguageGuessing >(
277*cdf0e10cSrcweir                     xMgr->createInstance(
278*cdf0e10cSrcweir                         rtl::OUString::createFromAscii( "com.sun.star.linguistic2.LanguageGuessing" ) ),
279*cdf0e10cSrcweir                         uno::UNO_QUERY );
280*cdf0e10cSrcweir         }
281*cdf0e10cSrcweir     }
282*cdf0e10cSrcweir     return m_xLanguageGuesser;
283*cdf0e10cSrcweir }
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir //************************************************************************
286*cdf0e10cSrcweir 
287*cdf0e10cSrcweir SwModule::~SwModule()
288*cdf0e10cSrcweir {
289*cdf0e10cSrcweir 	SetPool(0);
290*cdf0e10cSrcweir 	SfxItemPool::Free(pAttrPool);
291*cdf0e10cSrcweir 	delete pErrorHdl;
292*cdf0e10cSrcweir     EndListening( *SFX_APP() );
293*cdf0e10cSrcweir }
294*cdf0e10cSrcweir 
295*cdf0e10cSrcweir //************************************************************************
296*cdf0e10cSrcweir 
297*cdf0e10cSrcweir void SwModule::CreateLngSvcEvtListener()
298*cdf0e10cSrcweir {
299*cdf0e10cSrcweir     if (!xLngSvcEvtListener.is())
300*cdf0e10cSrcweir         xLngSvcEvtListener = new SwLinguServiceEventListener;
301*cdf0e10cSrcweir }
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir //************************************************************************
304*cdf0e10cSrcweir 
305*cdf0e10cSrcweir void SwDLL::RegisterFactories()
306*cdf0e10cSrcweir {
307*cdf0e10cSrcweir 	//Diese Id's duerfen nicht geaendert werden. Mittels der Id's wird vom
308*cdf0e10cSrcweir 	//Sfx die View (Dokumentansicht wiederherstellen) erzeugt.
309*cdf0e10cSrcweir     if ( SvtModuleOptions().IsWriter() )
310*cdf0e10cSrcweir         SwView::RegisterFactory         ( 2 );
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir 	SwWebView::RegisterFactory		( 5 );
313*cdf0e10cSrcweir 
314*cdf0e10cSrcweir     if ( SvtModuleOptions().IsWriter() )
315*cdf0e10cSrcweir     {
316*cdf0e10cSrcweir         SwSrcView::RegisterFactory      ( 6 );
317*cdf0e10cSrcweir         SwPagePreView::RegisterFactory  ( 7 );
318*cdf0e10cSrcweir     }
319*cdf0e10cSrcweir }
320*cdf0e10cSrcweir 
321*cdf0e10cSrcweir //************************************************************************
322*cdf0e10cSrcweir 
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir void SwDLL::RegisterInterfaces()
325*cdf0e10cSrcweir {
326*cdf0e10cSrcweir 	SwModule* pMod = SW_MOD();
327*cdf0e10cSrcweir 	SwModule::RegisterInterface( pMod );
328*cdf0e10cSrcweir 	SwDocShell::RegisterInterface( pMod );
329*cdf0e10cSrcweir 	SwWebDocShell::RegisterInterface( pMod );
330*cdf0e10cSrcweir 	SwGlosDocShell::RegisterInterface( pMod );
331*cdf0e10cSrcweir 	SwWebGlosDocShell::RegisterInterface( pMod );
332*cdf0e10cSrcweir 	SwView::RegisterInterface( pMod );
333*cdf0e10cSrcweir 	SwWebView::RegisterInterface( pMod );
334*cdf0e10cSrcweir 	SwPagePreView::RegisterInterface( pMod );
335*cdf0e10cSrcweir 	SwSrcView::RegisterInterface( pMod );
336*cdf0e10cSrcweir 
337*cdf0e10cSrcweir 
338*cdf0e10cSrcweir 	SwBaseShell::RegisterInterface(pMod);
339*cdf0e10cSrcweir 	SwTextShell::RegisterInterface(pMod);
340*cdf0e10cSrcweir 	SwTableShell::RegisterInterface(pMod);
341*cdf0e10cSrcweir 	SwListShell::RegisterInterface(pMod);
342*cdf0e10cSrcweir 	SwFrameShell::RegisterInterface(pMod);
343*cdf0e10cSrcweir 	SwDrawBaseShell::RegisterInterface(pMod);
344*cdf0e10cSrcweir 	SwDrawShell::RegisterInterface(pMod);
345*cdf0e10cSrcweir 	SwDrawFormShell::RegisterInterface(pMod);
346*cdf0e10cSrcweir 	SwDrawTextShell::RegisterInterface(pMod);
347*cdf0e10cSrcweir 	SwBezierShell::RegisterInterface(pMod);
348*cdf0e10cSrcweir 	SwGrfShell::RegisterInterface(pMod);
349*cdf0e10cSrcweir 	SwOleShell::RegisterInterface(pMod);
350*cdf0e10cSrcweir 	SwWebTextShell::RegisterInterface(pMod);
351*cdf0e10cSrcweir 	SwWebFrameShell::RegisterInterface(pMod);
352*cdf0e10cSrcweir 	SwWebGrfShell::RegisterInterface(pMod);
353*cdf0e10cSrcweir 	SwWebListShell::RegisterInterface(pMod);
354*cdf0e10cSrcweir 	SwWebTableShell::RegisterInterface(pMod);
355*cdf0e10cSrcweir 	SwWebDrawFormShell::RegisterInterface(pMod);
356*cdf0e10cSrcweir 	SwWebOleShell::RegisterInterface(pMod);
357*cdf0e10cSrcweir 	SwMediaShell::RegisterInterface(pMod);
358*cdf0e10cSrcweir     SwAnnotationShell::RegisterInterface(pMod);
359*cdf0e10cSrcweir }
360*cdf0e10cSrcweir 
361*cdf0e10cSrcweir //************************************************************************
362*cdf0e10cSrcweir 
363*cdf0e10cSrcweir void SwDLL::RegisterControls()
364*cdf0e10cSrcweir {
365*cdf0e10cSrcweir 	SwModule* pMod = SW_MOD();
366*cdf0e10cSrcweir     SvxTbxCtlDraw::RegisterControl(SID_INSERT_DRAW, pMod );
367*cdf0e10cSrcweir     SvxTbxCtlAlign::RegisterControl(SID_OBJECT_ALIGN, pMod );
368*cdf0e10cSrcweir 	SwTbxAnchor::RegisterControl(FN_TOOL_ANKER, pMod );
369*cdf0e10cSrcweir 	SwTbxInsertCtrl::RegisterControl(FN_INSERT_CTRL, pMod );
370*cdf0e10cSrcweir 	SwTbxInsertCtrl::RegisterControl(FN_INSERT_OBJ_CTRL, pMod );
371*cdf0e10cSrcweir 	SwTbxAutoTextCtrl::RegisterControl(FN_INSERT_FIELD_CTRL, pMod );
372*cdf0e10cSrcweir 	SwTbxAutoTextCtrl::RegisterControl(FN_GLOSSARY_DLG, pMod );
373*cdf0e10cSrcweir 
374*cdf0e10cSrcweir 	SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_BASIC, pMod );
375*cdf0e10cSrcweir 	SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_SYMBOL, pMod );
376*cdf0e10cSrcweir 	SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_ARROW, pMod );
377*cdf0e10cSrcweir 	SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_FLOWCHART, pMod );
378*cdf0e10cSrcweir 	SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_CALLOUT, pMod );
379*cdf0e10cSrcweir 	SvxTbxCtlCustomShapes::RegisterControl( SID_DRAWTBX_CS_STAR, pMod );
380*cdf0e10cSrcweir 
381*cdf0e10cSrcweir 	svx::ExtrusionColorControl::RegisterControl( SID_EXTRUSION_3D_COLOR, pMod );
382*cdf0e10cSrcweir 	svx::FontWorkShapeTypeControl::RegisterControl( SID_FONTWORK_SHAPE_TYPE, pMod );
383*cdf0e10cSrcweir 
384*cdf0e10cSrcweir 	SvxClipBoardControl::RegisterControl(SID_PASTE, pMod );
385*cdf0e10cSrcweir 	SvxUndoRedoControl::RegisterControl(SID_UNDO, pMod );
386*cdf0e10cSrcweir 	SvxUndoRedoControl::RegisterControl(SID_REDO, pMod );
387*cdf0e10cSrcweir     svx::FormatPaintBrushToolBoxControl::RegisterControl(SID_FORMATPAINTBRUSH, pMod );
388*cdf0e10cSrcweir 
389*cdf0e10cSrcweir 	SvxFillToolBoxControl::RegisterControl(SID_ATTR_FILL_STYLE, pMod );
390*cdf0e10cSrcweir 	SvxLineStyleToolBoxControl::RegisterControl(SID_ATTR_LINE_STYLE, pMod );
391*cdf0e10cSrcweir 	SvxLineWidthToolBoxControl::RegisterControl(SID_ATTR_LINE_WIDTH, pMod );
392*cdf0e10cSrcweir 	SvxLineColorToolBoxControl::RegisterControl(SID_ATTR_LINE_COLOR, pMod );
393*cdf0e10cSrcweir 	SvxLineEndToolBoxControl::RegisterControl(SID_ATTR_LINEEND_STYLE, pMod );
394*cdf0e10cSrcweir 
395*cdf0e10cSrcweir 	SvxFontNameToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONT, pMod );
396*cdf0e10cSrcweir //	SvxFontHeightToolBoxControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod );
397*cdf0e10cSrcweir 	SvxFontColorToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR, pMod );
398*cdf0e10cSrcweir 	SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR2, pMod );
399*cdf0e10cSrcweir 	SvxFontColorExtToolBoxControl::RegisterControl(SID_ATTR_CHAR_COLOR_BACKGROUND, pMod );
400*cdf0e10cSrcweir 	SvxStyleToolBoxControl::RegisterControl(SID_STYLE_APPLY, pMod );
401*cdf0e10cSrcweir 	SvxColorToolBoxControl::RegisterControl(SID_BACKGROUND_COLOR, pMod );
402*cdf0e10cSrcweir 	SvxFrameToolBoxControl::RegisterControl(SID_ATTR_BORDER, pMod );
403*cdf0e10cSrcweir 	SvxFrameLineStyleToolBoxControl::RegisterControl(SID_FRAME_LINESTYLE, pMod );
404*cdf0e10cSrcweir 	SvxFrameLineColorToolBoxControl::RegisterControl(SID_FRAME_LINECOLOR, pMod );
405*cdf0e10cSrcweir 
406*cdf0e10cSrcweir 	SvxColumnsToolBoxControl::RegisterControl(FN_INSERT_FRAME_INTERACT, pMod );
407*cdf0e10cSrcweir 	SvxColumnsToolBoxControl::RegisterControl(FN_INSERT_FRAME, pMod );
408*cdf0e10cSrcweir     SvxColumnsToolBoxControl::RegisterControl(FN_INSERT_REGION, pMod );
409*cdf0e10cSrcweir 	SvxTableToolBoxControl::RegisterControl(FN_INSERT_TABLE, pMod );
410*cdf0e10cSrcweir     SvxTableToolBoxControl::RegisterControl(FN_SHOW_MULTIPLE_PAGES, pMod );
411*cdf0e10cSrcweir 
412*cdf0e10cSrcweir 	SvxFontMenuControl::RegisterControl(SID_ATTR_CHAR_FONT, pMod );
413*cdf0e10cSrcweir 	SvxFontSizeMenuControl::RegisterControl(SID_ATTR_CHAR_FONTHEIGHT, pMod );
414*cdf0e10cSrcweir 
415*cdf0e10cSrcweir 	SwZoomControl::RegisterControl(SID_ATTR_ZOOM, pMod );
416*cdf0e10cSrcweir     SwPreviewZoomControl::RegisterControl(FN_PREVIEW_ZOOM, pMod);
417*cdf0e10cSrcweir 	SvxPosSizeStatusBarControl::RegisterControl(0, pMod );
418*cdf0e10cSrcweir 	SvxInsertStatusBarControl::RegisterControl(SID_ATTR_INSERT, pMod );
419*cdf0e10cSrcweir 	SvxSelectionModeControl::RegisterControl(FN_STAT_SELMODE, pMod );
420*cdf0e10cSrcweir 	XmlSecStatusBarControl::RegisterControl( SID_SIGNATURE, pMod );
421*cdf0e10cSrcweir 
422*cdf0e10cSrcweir 	SwBookmarkControl::RegisterControl(FN_STAT_PAGE, pMod );
423*cdf0e10cSrcweir 	SwTemplateControl::RegisterControl(FN_STAT_TEMPLATE, pMod );
424*cdf0e10cSrcweir     SwViewLayoutControl::RegisterControl( SID_ATTR_VIEWLAYOUT, pMod );
425*cdf0e10cSrcweir     SvxZoomSliderControl::RegisterControl( SID_ATTR_ZOOMSLIDER, pMod );
426*cdf0e10cSrcweir 
427*cdf0e10cSrcweir 	SwTableOptimizeCtrl::RegisterControl(FN_OPTIMIZE_TABLE, pMod);
428*cdf0e10cSrcweir 
429*cdf0e10cSrcweir 	SvxIMapDlgChildWindow::RegisterChildWindow( sal_False, pMod );
430*cdf0e10cSrcweir 	SvxSearchDialogWrapper::RegisterChildWindow( sal_False, pMod );
431*cdf0e10cSrcweir 	SvxHlinkDlgWrapper::RegisterChildWindow( sal_False, pMod );
432*cdf0e10cSrcweir 	SvxHyperlinkDlgWrapper::RegisterChildWindow( sal_False, pMod, SFX_CHILDWIN_FORCEDOCK );
433*cdf0e10cSrcweir 	SvxFontWorkChildWindow::RegisterChildWindow( sal_False, pMod );
434*cdf0e10cSrcweir 	SwFldDlgWrapper::RegisterChildWindow( sal_False, pMod );
435*cdf0e10cSrcweir     SwFldDataOnlyDlgWrapper::RegisterChildWindow( sal_False, pMod );
436*cdf0e10cSrcweir 	SvxContourDlgChildWindow::RegisterChildWindow( sal_False, pMod );
437*cdf0e10cSrcweir 	SwNavigationChild::RegisterChildWindowContext( pMod );
438*cdf0e10cSrcweir 	SwInputChild::RegisterChildWindow( sal_False, pMod, SFX_CHILDWIN_FORCEDOCK );
439*cdf0e10cSrcweir 	SwRedlineAcceptChild::RegisterChildWindow( sal_False, pMod );
440*cdf0e10cSrcweir 	SwSyncChildWin::RegisterChildWindow( sal_True, pMod );
441*cdf0e10cSrcweir     SwMailMergeChildWindow::RegisterChildWindow( sal_False, pMod );
442*cdf0e10cSrcweir //    SwSendMailChildWindow::RegisterChildWindow( sal_False, pMod );
443*cdf0e10cSrcweir 	SwInsertIdxMarkWrapper::RegisterChildWindow( sal_False, pMod );
444*cdf0e10cSrcweir 	SwInsertAuthMarkWrapper::RegisterChildWindow( sal_False, pMod );
445*cdf0e10cSrcweir 	SvxRubyChildWindow::RegisterChildWindow( sal_False, pMod);
446*cdf0e10cSrcweir     SwSpellDialogChildWindow::RegisterChildWindow(sal_False, pMod);
447*cdf0e10cSrcweir 
448*cdf0e10cSrcweir 	SvxGrafRedToolBoxControl::RegisterControl( SID_ATTR_GRAF_RED, pMod );
449*cdf0e10cSrcweir 	SvxGrafGreenToolBoxControl::RegisterControl( SID_ATTR_GRAF_GREEN, pMod );
450*cdf0e10cSrcweir 	SvxGrafBlueToolBoxControl::RegisterControl( SID_ATTR_GRAF_BLUE, pMod );
451*cdf0e10cSrcweir 	SvxGrafLuminanceToolBoxControl::RegisterControl( SID_ATTR_GRAF_LUMINANCE, pMod );
452*cdf0e10cSrcweir 	SvxGrafContrastToolBoxControl::RegisterControl( SID_ATTR_GRAF_CONTRAST, pMod );
453*cdf0e10cSrcweir 	SvxGrafGammaToolBoxControl::RegisterControl( SID_ATTR_GRAF_GAMMA, pMod );
454*cdf0e10cSrcweir 	SvxGrafTransparenceToolBoxControl::RegisterControl( SID_ATTR_GRAF_TRANSPARENCE, pMod );
455*cdf0e10cSrcweir 	SvxGrafModeToolBoxControl::RegisterControl( SID_ATTR_GRAF_MODE, pMod );
456*cdf0e10cSrcweir     SvxGrafFilterToolBoxControl::RegisterControl( SID_GRFFILTER, pMod );
457*cdf0e10cSrcweir     SvxVertTextTbxCtrl::RegisterControl(SID_TEXTDIRECTION_LEFT_TO_RIGHT, pMod);
458*cdf0e10cSrcweir     SvxVertTextTbxCtrl::RegisterControl(SID_TEXTDIRECTION_TOP_TO_BOTTOM, pMod);
459*cdf0e10cSrcweir     SvxVertTextTbxCtrl::RegisterControl(SID_DRAW_CAPTION_VERTICAL, pMod);
460*cdf0e10cSrcweir     SvxVertTextTbxCtrl::RegisterControl(SID_DRAW_TEXT_VERTICAL, pMod);
461*cdf0e10cSrcweir 
462*cdf0e10cSrcweir     SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_LEFT_TO_RIGHT, pMod);
463*cdf0e10cSrcweir     SvxCTLTextTbxCtrl::RegisterControl(SID_ATTR_PARA_RIGHT_TO_LEFT, pMod);
464*cdf0e10cSrcweir 
465*cdf0e10cSrcweir 	GalleryChildWindow::RegisterChildWindow(0, pMod);
466*cdf0e10cSrcweir 
467*cdf0e10cSrcweir 	::avmedia::MediaToolBoxControl::RegisterControl(SID_AVMEDIA_TOOLBOX, pMod);
468*cdf0e10cSrcweir 	::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir     SvxSmartTagsControl::RegisterControl(SID_OPEN_SMARTTAGMENU, pMod);
471*cdf0e10cSrcweir     ::sfx2::TaskPaneWrapper::RegisterChildWindow( sal_False, pMod );
472*cdf0e10cSrcweir }
473*cdf0e10cSrcweir 
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir 
476*cdf0e10cSrcweir /*************************************************************************
477*cdf0e10cSrcweir |*
478*cdf0e10cSrcweir |* Modul laden (nur Attrappe fuer das Linken der DLL)
479*cdf0e10cSrcweir |*
480*cdf0e10cSrcweir \************************************************************************/
481*cdf0e10cSrcweir 
482*cdf0e10cSrcweir /* -----------------20.04.99 10:46-------------------
483*cdf0e10cSrcweir  *
484*cdf0e10cSrcweir  * --------------------------------------------------*/
485*cdf0e10cSrcweir void	SwModule::InitAttrPool()
486*cdf0e10cSrcweir {
487*cdf0e10cSrcweir 	DBG_ASSERT(!pAttrPool, "Pool ist schon da!");
488*cdf0e10cSrcweir 	pAttrPool = new SwAttrPool(0);
489*cdf0e10cSrcweir 	SetPool(pAttrPool);
490*cdf0e10cSrcweir }
491*cdf0e10cSrcweir /* -----------------20.04.99 10:46-------------------
492*cdf0e10cSrcweir  *
493*cdf0e10cSrcweir  * --------------------------------------------------*/
494*cdf0e10cSrcweir void	SwModule::RemoveAttrPool()
495*cdf0e10cSrcweir {
496*cdf0e10cSrcweir 	SetPool(0);
497*cdf0e10cSrcweir 	SfxItemPool::Free(pAttrPool);
498*cdf0e10cSrcweir }
499*cdf0e10cSrcweir 
500*cdf0e10cSrcweir 
501