1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #include <vcl/toolbox.hxx>
32 #include <sfx2/app.hxx>
33 #include "appdata.hxx"
34 #include "arrdecl.hxx"
35 #include "sfx2/sfxhelp.hxx"
36 #include <sfx2/templdlg.hxx>
37 #include "inettbc.hxx"
38 #include "sfx2/stbitem.hxx"
39 #include <sfx2/navigat.hxx>
40 #include <sfx2/taskpane.hxx>
41 #include <sfx2/module.hxx>
42 #include <sfx2/viewfrm.hxx>
43 #include "partwnd.hxx"
44 #include <sfx2/sfxsids.hrc>
45 #include "recfloat.hxx"
46 #include <sfx2/objsh.hxx>
47 #include <sfx2/viewsh.hxx>
48 #include <sfx2/objface.hxx>
49 #include <sfx2/mnuitem.hxx>
51 //===================================================================
53 void SfxApplication::Registrations_Impl()
56 SfxApplication::RegisterInterface();
57 SfxModule::RegisterInterface();
58 SfxViewFrame::RegisterInterface();
59 SfxObjectShell::RegisterInterface();
60 SfxViewShell::RegisterInterface();
63 SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
64 SfxNavigatorWrapper::RegisterChildWindow( sal_False
, NULL
, SFX_CHILDWIN_NEVERHIDE
);
65 SfxPartChildWnd_Impl::RegisterChildWindow();
66 SfxTemplateDialogWrapper::RegisterChildWindow(sal_True
);
67 SfxDockingWrapper::RegisterChildWindow();
70 SfxToolBoxControl::RegisterControl(SID_REPEAT
);
71 SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL
);
72 SfxAppToolBoxControl_Impl::RegisterControl( SID_NEWDOCDIRECT
);
73 SfxAppToolBoxControl_Impl::RegisterControl( SID_AUTOPILOTMENU
);
76 //--------------------------------------------------------------------
78 void SfxApplication::RegisterToolBoxControl_Impl( SfxModule
*pMod
, SfxTbxCtrlFactory
*pFact
)
82 pMod
->RegisterToolBoxControl( pFact
);
87 for ( sal_uInt16 n
=0; n
<pAppData_Impl
->pTbxCtrlFac
->Count(); n
++ )
89 SfxTbxCtrlFactory
*pF
= (*pAppData_Impl
->pTbxCtrlFac
)[n
];
90 if ( pF
->nTypeId
&& pF
->nTypeId
== pFact
->nTypeId
&&
91 (pF
->nSlotId
== pFact
->nSlotId
|| pF
->nSlotId
== 0) )
93 DBG_WARNING("TbxController registration is not clearly defined!");
98 pAppData_Impl
->pTbxCtrlFac
->C40_INSERT( SfxTbxCtrlFactory
, pFact
, pAppData_Impl
->pTbxCtrlFac
->Count() );
101 //--------------------------------------------------------------------
103 void SfxApplication::RegisterStatusBarControl_Impl( SfxModule
*pMod
, SfxStbCtrlFactory
*pFact
)
107 pMod
->RegisterStatusBarControl( pFact
);
112 for ( sal_uInt16 n
=0; n
<pAppData_Impl
->pStbCtrlFac
->Count(); n
++ )
114 SfxStbCtrlFactory
*pF
= (*pAppData_Impl
->pStbCtrlFac
)[n
];
115 if ( pF
->nTypeId
&& pF
->nTypeId
== pFact
->nTypeId
&&
116 (pF
->nSlotId
== pFact
->nSlotId
|| pF
->nSlotId
== 0) )
118 DBG_WARNING("StbController registration is not clearly defined!");
123 pAppData_Impl
->pStbCtrlFac
->C40_INSERT( SfxStbCtrlFactory
, pFact
, pAppData_Impl
->pStbCtrlFac
->Count() );
126 //--------------------------------------------------------------------
128 void SfxApplication::RegisterMenuControl_Impl( SfxModule
*pMod
, SfxMenuCtrlFactory
*pFact
)
132 pMod
->RegisterMenuControl( pFact
);
137 for ( sal_uInt16 n
=0; n
<pAppData_Impl
->pMenuCtrlFac
->Count(); n
++ )
139 SfxMenuCtrlFactory
*pF
= (*pAppData_Impl
->pMenuCtrlFac
)[n
];
140 if ( pF
->nTypeId
&& pF
->nTypeId
== pFact
->nTypeId
&&
141 (pF
->nSlotId
== pFact
->nSlotId
|| pF
->nSlotId
== 0) )
143 DBG_WARNING("MenuController register is not clearly defined!");
148 pAppData_Impl
->pMenuCtrlFac
->C40_INSERT( SfxMenuCtrlFactory
, pFact
, pAppData_Impl
->pMenuCtrlFac
->Count() );
151 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */