LanguageTool: don't crash if REST protocol isn't set
[LibreOffice.git] / sfx2 / source / appl / appreg.cxx
blob5d27a45c50b83c49b6792feac4553620d66133b6
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 <sfx2/objsh.hxx>
35 #include <sfx2/viewsh.hxx>
38 void SfxApplication::Registrations_Impl()
40 // Interfaces
41 SfxApplication::RegisterInterface();
42 SfxModule::RegisterInterface();
43 SfxViewFrame::RegisterInterface();
44 SfxObjectShell::RegisterInterface();
45 SfxViewShell::RegisterInterface();
47 // ChildWindows
48 SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
49 SfxPartChildWnd_Impl::RegisterChildWindow();
50 SfxDockingWrapper::RegisterChildWindow();
51 SfxInfoBarContainerChild::RegisterChildWindow( true, nullptr, SfxChildWindowFlags::NEVERHIDE );
53 // Controller
54 SfxToolBoxControl::RegisterControl(SID_REPEAT);
55 SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
59 void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, const SfxTbxCtrlFactory& rFact )
61 if ( pMod )
63 pMod->RegisterToolBoxControl( rFact );
64 return;
67 #ifdef DBG_UTIL
68 for ( size_t n=0; n<pImpl->maTbxCtrlFactories.size(); n++ )
70 SfxTbxCtrlFactory *pF = &pImpl->maTbxCtrlFactories[n];
71 if ( pF->nTypeId == rFact.nTypeId &&
72 (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
74 SAL_INFO("sfx", "TbxController registration is not clearly defined!");
77 #endif
79 pImpl->maTbxCtrlFactories.push_back( rFact );
83 void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, const SfxStbCtrlFactory& rFact )
85 if ( pMod )
87 pMod->RegisterStatusBarControl( rFact );
88 return;
91 #ifdef DBG_UTIL
92 for ( size_t n=0; n<pImpl->maStbCtrlFactories.size(); n++ )
94 SfxStbCtrlFactory *pF = &pImpl->maStbCtrlFactories[n];
95 if ( pF->nTypeId == rFact.nTypeId &&
96 (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
98 SAL_INFO("sfx", "StbController registration is not clearly defined!");
101 #endif
103 pImpl->maStbCtrlFactories.push_back( rFact );
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */