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_sfx2.hxx" 30*cdf0e10cSrcweir 31*cdf0e10cSrcweir #include <vcl/toolbox.hxx> 32*cdf0e10cSrcweir 33*cdf0e10cSrcweir #ifndef GCC 34*cdf0e10cSrcweir #endif 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir #include <sfx2/app.hxx> 37*cdf0e10cSrcweir #include "appdata.hxx" 38*cdf0e10cSrcweir #include "arrdecl.hxx" 39*cdf0e10cSrcweir #include "sfx2/sfxhelp.hxx" 40*cdf0e10cSrcweir #include <sfx2/templdlg.hxx> 41*cdf0e10cSrcweir #include "objmnctl.hxx" 42*cdf0e10cSrcweir #include "inettbc.hxx" 43*cdf0e10cSrcweir #include "sfx2/stbitem.hxx" 44*cdf0e10cSrcweir #include <sfx2/navigat.hxx> 45*cdf0e10cSrcweir #include <sfx2/taskpane.hxx> 46*cdf0e10cSrcweir #include <sfx2/module.hxx> 47*cdf0e10cSrcweir #include <sfx2/viewfrm.hxx> 48*cdf0e10cSrcweir #include "partwnd.hxx" 49*cdf0e10cSrcweir #include <sfx2/sfxsids.hrc> 50*cdf0e10cSrcweir #include "recfloat.hxx" 51*cdf0e10cSrcweir #include <sfx2/objsh.hxx> 52*cdf0e10cSrcweir #include <sfx2/viewsh.hxx> 53*cdf0e10cSrcweir #include <sfx2/objface.hxx> 54*cdf0e10cSrcweir 55*cdf0e10cSrcweir //=================================================================== 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir void SfxApplication::Registrations_Impl() 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir // Interfaces 60*cdf0e10cSrcweir SfxApplication::RegisterInterface(); 61*cdf0e10cSrcweir SfxModule::RegisterInterface(); 62*cdf0e10cSrcweir SfxViewFrame::RegisterInterface(); 63*cdf0e10cSrcweir SfxObjectShell::RegisterInterface(); 64*cdf0e10cSrcweir SfxViewShell::RegisterInterface(); 65*cdf0e10cSrcweir 66*cdf0e10cSrcweir // ChildWindows 67*cdf0e10cSrcweir SfxRecordingFloatWrapper_Impl::RegisterChildWindow(); 68*cdf0e10cSrcweir SfxNavigatorWrapper::RegisterChildWindow( sal_False, NULL, SFX_CHILDWIN_NEVERHIDE ); 69*cdf0e10cSrcweir SfxPartChildWnd_Impl::RegisterChildWindow(); 70*cdf0e10cSrcweir SfxTemplateDialogWrapper::RegisterChildWindow(sal_True); 71*cdf0e10cSrcweir SfxDockingWrapper::RegisterChildWindow(); 72*cdf0e10cSrcweir 73*cdf0e10cSrcweir // Controller 74*cdf0e10cSrcweir SfxToolBoxControl::RegisterControl(SID_REPEAT); 75*cdf0e10cSrcweir SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL); 76*cdf0e10cSrcweir SfxAppToolBoxControl_Impl::RegisterControl( SID_NEWDOCDIRECT ); 77*cdf0e10cSrcweir SfxAppToolBoxControl_Impl::RegisterControl( SID_AUTOPILOTMENU ); 78*cdf0e10cSrcweir }; 79*cdf0e10cSrcweir 80*cdf0e10cSrcweir //-------------------------------------------------------------------- 81*cdf0e10cSrcweir 82*cdf0e10cSrcweir void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFactory *pFact ) 83*cdf0e10cSrcweir { 84*cdf0e10cSrcweir if ( pMod ) 85*cdf0e10cSrcweir { 86*cdf0e10cSrcweir pMod->RegisterToolBoxControl( pFact ); 87*cdf0e10cSrcweir return; 88*cdf0e10cSrcweir } 89*cdf0e10cSrcweir 90*cdf0e10cSrcweir #ifdef DBG_UTIL 91*cdf0e10cSrcweir for ( sal_uInt16 n=0; n<pAppData_Impl->pTbxCtrlFac->Count(); n++ ) 92*cdf0e10cSrcweir { 93*cdf0e10cSrcweir SfxTbxCtrlFactory *pF = (*pAppData_Impl->pTbxCtrlFac)[n]; 94*cdf0e10cSrcweir if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId && 95*cdf0e10cSrcweir (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) ) 96*cdf0e10cSrcweir { 97*cdf0e10cSrcweir DBG_WARNING("TbxController-Registrierung ist nicht eindeutig!"); 98*cdf0e10cSrcweir } 99*cdf0e10cSrcweir } 100*cdf0e10cSrcweir #endif 101*cdf0e10cSrcweir 102*cdf0e10cSrcweir pAppData_Impl->pTbxCtrlFac->C40_INSERT( SfxTbxCtrlFactory, pFact, pAppData_Impl->pTbxCtrlFac->Count() ); 103*cdf0e10cSrcweir } 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir //-------------------------------------------------------------------- 106*cdf0e10cSrcweir 107*cdf0e10cSrcweir void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlFactory *pFact ) 108*cdf0e10cSrcweir { 109*cdf0e10cSrcweir if ( pMod ) 110*cdf0e10cSrcweir { 111*cdf0e10cSrcweir pMod->RegisterStatusBarControl( pFact ); 112*cdf0e10cSrcweir return; 113*cdf0e10cSrcweir } 114*cdf0e10cSrcweir 115*cdf0e10cSrcweir #ifdef DBG_UTIL 116*cdf0e10cSrcweir for ( sal_uInt16 n=0; n<pAppData_Impl->pStbCtrlFac->Count(); n++ ) 117*cdf0e10cSrcweir { 118*cdf0e10cSrcweir SfxStbCtrlFactory *pF = (*pAppData_Impl->pStbCtrlFac)[n]; 119*cdf0e10cSrcweir if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId && 120*cdf0e10cSrcweir (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) ) 121*cdf0e10cSrcweir { 122*cdf0e10cSrcweir DBG_WARNING("StbController-Registrierung ist nicht eindeutig!"); 123*cdf0e10cSrcweir } 124*cdf0e10cSrcweir } 125*cdf0e10cSrcweir #endif 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir pAppData_Impl->pStbCtrlFac->C40_INSERT( SfxStbCtrlFactory, pFact, pAppData_Impl->pStbCtrlFac->Count() ); 128*cdf0e10cSrcweir } 129*cdf0e10cSrcweir 130*cdf0e10cSrcweir //-------------------------------------------------------------------- 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir void SfxApplication::RegisterMenuControl_Impl( SfxModule *pMod, SfxMenuCtrlFactory *pFact ) 133*cdf0e10cSrcweir { 134*cdf0e10cSrcweir if ( pMod ) 135*cdf0e10cSrcweir { 136*cdf0e10cSrcweir pMod->RegisterMenuControl( pFact ); 137*cdf0e10cSrcweir return; 138*cdf0e10cSrcweir } 139*cdf0e10cSrcweir 140*cdf0e10cSrcweir #ifdef DBG_UTIL 141*cdf0e10cSrcweir for ( sal_uInt16 n=0; n<pAppData_Impl->pMenuCtrlFac->Count(); n++ ) 142*cdf0e10cSrcweir { 143*cdf0e10cSrcweir SfxMenuCtrlFactory *pF = (*pAppData_Impl->pMenuCtrlFac)[n]; 144*cdf0e10cSrcweir if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId && 145*cdf0e10cSrcweir (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) ) 146*cdf0e10cSrcweir { 147*cdf0e10cSrcweir DBG_WARNING("MenuController-Registrierung ist nicht eindeutig!"); 148*cdf0e10cSrcweir } 149*cdf0e10cSrcweir } 150*cdf0e10cSrcweir #endif 151*cdf0e10cSrcweir 152*cdf0e10cSrcweir pAppData_Impl->pMenuCtrlFac->C40_INSERT( SfxMenuCtrlFactory, pFact, pAppData_Impl->pMenuCtrlFac->Count() ); 153*cdf0e10cSrcweir } 154