LCOV - code coverage report
Current view: top level - libreoffice/sfx2/source/appl - appreg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 31 32 96.9 %
Date: 2012-12-27 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : 
      21             : #include <vcl/toolbox.hxx>
      22             : 
      23             : #include <sfx2/app.hxx>
      24             : #include "appdata.hxx"
      25             : #include "arrdecl.hxx"
      26             : #include "sfx2/sfxhelp.hxx"
      27             : #include <sfx2/templdlg.hxx>
      28             : #include "inettbc.hxx"
      29             : #include "sfx2/stbitem.hxx"
      30             : #include <sfx2/infobar.hxx>
      31             : #include <sfx2/navigat.hxx>
      32             : #include <sfx2/taskpane.hxx>
      33             : #include <sfx2/module.hxx>
      34             : #include <sfx2/viewfrm.hxx>
      35             : #include "partwnd.hxx"
      36             : #include <sfx2/sfxsids.hrc>
      37             : #include "recfloat.hxx"
      38             : #include <sfx2/objsh.hxx>
      39             : #include <sfx2/viewsh.hxx>
      40             : #include <sfx2/objface.hxx>
      41             : #include <sfx2/mnuitem.hxx>
      42             : 
      43             : //===================================================================
      44             : 
      45          19 : void SfxApplication::Registrations_Impl()
      46             : {
      47             :     // Interfaces
      48          19 :     SfxApplication::RegisterInterface();
      49          19 :     SfxModule::RegisterInterface();
      50          19 :     SfxViewFrame::RegisterInterface();
      51          19 :     SfxObjectShell::RegisterInterface();
      52          19 :     SfxViewShell::RegisterInterface();
      53             : 
      54             :     // ChildWindows
      55          19 :     SfxRecordingFloatWrapper_Impl::RegisterChildWindow();
      56          19 :     SfxNavigatorWrapper::RegisterChildWindow( sal_False, NULL, SFX_CHILDWIN_NEVERHIDE );
      57          19 :     SfxPartChildWnd_Impl::RegisterChildWindow();
      58          19 :     SfxTemplateDialogWrapper::RegisterChildWindow(sal_True);
      59          19 :     SfxDockingWrapper::RegisterChildWindow();
      60          19 :     SfxInfoBarContainerChild::RegisterChildWindow( sal_True, NULL, SFX_CHILDWIN_NEVERHIDE );
      61             : 
      62             :     // Controller
      63          19 :     SfxToolBoxControl::RegisterControl(SID_REPEAT);
      64          19 :     SfxURLToolBoxControl_Impl::RegisterControl(SID_OPENURL);
      65          19 :     SfxAppToolBoxControl_Impl::RegisterControl( SID_NEWDOCDIRECT );
      66          19 :     SfxAppToolBoxControl_Impl::RegisterControl( SID_AUTOPILOTMENU );
      67          19 : };
      68             : 
      69             : //--------------------------------------------------------------------
      70             : 
      71        1171 : void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFactory *pFact )
      72             : {
      73        1171 :     if ( pMod )
      74             :     {
      75         969 :         pMod->RegisterToolBoxControl( pFact );
      76        2140 :         return;
      77             :     }
      78             : 
      79             : #ifdef DBG_UTIL
      80             :     for ( sal_uInt16 n=0; n<pAppData_Impl->pTbxCtrlFac->size(); n++ )
      81             :     {
      82             :         SfxTbxCtrlFactory *pF = (*pAppData_Impl->pTbxCtrlFac)[n];
      83             :         if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
      84             :             (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
      85             :         {
      86             :             DBG_WARNING("TbxController registration is not clearly defined!");
      87             :         }
      88             :     }
      89             : #endif
      90             : 
      91         202 :     pAppData_Impl->pTbxCtrlFac->push_back( pFact );
      92             : }
      93             : 
      94             : //--------------------------------------------------------------------
      95             : 
      96         179 : void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlFactory *pFact )
      97             : {
      98         179 :     if ( pMod )
      99             :     {
     100         179 :         pMod->RegisterStatusBarControl( pFact );
     101         358 :         return;
     102             :     }
     103             : 
     104             : #ifdef DBG_UTIL
     105             :     for ( sal_uInt16 n=0; n<pAppData_Impl->pStbCtrlFac->size(); n++ )
     106             :     {
     107             :         SfxStbCtrlFactory *pF = (*pAppData_Impl->pStbCtrlFac)[n];
     108             :         if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
     109             :             (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
     110             :         {
     111             :             DBG_WARNING("StbController registration is not clearly defined!");
     112             :         }
     113             :     }
     114             : #endif
     115             : 
     116           0 :     pAppData_Impl->pStbCtrlFac->push_back( pFact );
     117             : }
     118             : 
     119             : //--------------------------------------------------------------------
     120             : 
     121          73 : void SfxApplication::RegisterMenuControl_Impl( SfxModule *pMod, SfxMenuCtrlFactory *pFact )
     122             : {
     123          73 :     if ( pMod )
     124             :     {
     125          55 :         pMod->RegisterMenuControl( pFact );
     126         128 :         return;
     127             :     }
     128             : 
     129             : #ifdef DBG_UTIL
     130             :     for ( sal_uInt16 n=0; n<pAppData_Impl->pMenuCtrlFac->size(); n++ )
     131             :     {
     132             :         SfxMenuCtrlFactory *pF = (*pAppData_Impl->pMenuCtrlFac)[n];
     133             :         if ( pF->nTypeId && pF->nTypeId == pFact->nTypeId &&
     134             :             (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
     135             :         {
     136             :             DBG_WARNING("MenuController register is not clearly defined!");
     137             :         }
     138             :     }
     139             : #endif
     140             : 
     141          18 :     pAppData_Impl->pMenuCtrlFac->push_back( pFact );
     142             : }
     143             : 
     144             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10