Version 7.1.7.1, tag libreoffice-7.1.7.1
[LibreOffice.git] / sfx2 / source / appl / appreg.cxx
blob4e74737d3aaddc48121d542e8fb15c61bdae0523
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 .
21 #include <sal/log.hxx>
23 #include <sfx2/app.hxx>
24 #include <appdata.hxx>
25 #include <inettbc.hxx>
26 #include <sfx2/stbitem.hxx>
27 #include <sfx2/infobar.hxx>
28 #include <sfx2/navigat.hxx>
29 #include <sfx2/module.hxx>
30 #include <sfx2/viewfrm.hxx>
31 #include <partwnd.hxx>
32 #include <sfx2/sfxsids.hrc>
33 #include <recfloat.hxx>
34 #include <ctrlfactoryimpl.hxx>
35 #include <sfx2/objsh.hxx>
36 #include <sfx2/viewsh.hxx>
39 void SfxApplication::Registrations_Impl()
41 // Interfaces
42 SfxApplication::RegisterInterface();
43 SfxModule::RegisterInterface();
44 SfxViewFrame::RegisterInterface();
45 SfxObjectShell::RegisterInterface();
46 SfxViewShell::RegisterInterface();
48 // ChildWindows
49 SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
50 SfxNavigatorWrapper::RegisterChildWindow( false, nullptr, SfxChildWindowFlags::NEVERHIDE );
51 SfxPartChildWnd_Impl::RegisterChildWindow();
52 SfxDockingWrapper::RegisterChildWindow();
53 SfxInfoBarContainerChild::RegisterChildWindow( true, nullptr, SfxChildWindowFlags::NEVERHIDE );
55 // Controller
56 SfxToolBoxControl::RegisterControl(SID_REPEAT);
57 SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
61 void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, const SfxTbxCtrlFactory& rFact )
63 if ( pMod )
65 pMod->RegisterToolBoxControl( rFact );
66 return;
69 #ifdef DBG_UTIL
70 for ( size_t n=0; n<pImpl->pTbxCtrlFac->size(); n++ )
72 SfxTbxCtrlFactory *pF = &(*pImpl->pTbxCtrlFac)[n];
73 if ( pF->nTypeId == rFact.nTypeId &&
74 (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
76 SAL_INFO("sfx", "TbxController registration is not clearly defined!");
79 #endif
81 pImpl->pTbxCtrlFac->push_back( rFact );
85 void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, const SfxStbCtrlFactory& rFact )
87 if ( pMod )
89 pMod->RegisterStatusBarControl( rFact );
90 return;
93 #ifdef DBG_UTIL
94 for ( size_t n=0; n<pImpl->pStbCtrlFac->size(); n++ )
96 SfxStbCtrlFactory *pF = &(*pImpl->pStbCtrlFac)[n];
97 if ( pF->nTypeId == rFact.nTypeId &&
98 (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
100 SAL_INFO("sfx", "StbController registration is not clearly defined!");
103 #endif
105 pImpl->pStbCtrlFac->push_back( rFact );
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */