LCOV - code coverage report
Current view: top level - include/sfx2 - module.hxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 2 2 100.0 %
Date: 2015-06-13 12:38:46 Functions: 2 2 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             : #ifndef INCLUDED_SFX2_MODULE_HXX
      20             : #define INCLUDED_SFX2_MODULE_HXX  // internal
      21             : #define _SFXMOD_HXX     // external
      22             : 
      23             : #include <sal/config.h>
      24             : #include <sfx2/app.hxx>
      25             : #include <sfx2/dllapi.h>
      26             : #include <sfx2/shell.hxx>
      27             : #include <svtools/imgdef.hxx>
      28             : #include <sal/types.h>
      29             : #include <tools/fldunit.hxx>
      30             : #include <com/sun/star/uno/Reference.hxx>
      31             : 
      32             : class ImageList;
      33             : 
      34             : class SfxBindings;
      35             : class SfxObjectFactory;
      36             : class ModalDialog;
      37             : class SfxObjectFactory;
      38             : class SfxModule;
      39             : class SfxModuleArr_Impl;
      40             : class SfxModule_Impl;
      41             : class SfxSlotPool;
      42             : struct SfxChildWinContextFactory;
      43             : struct SfxChildWinFactory;
      44             : struct SfxMenuCtrlFactory;
      45             : struct SfxStbCtrlFactory;
      46             : struct SfxTbxCtrlFactory;
      47             : class SfxTabPage;
      48             : namespace vcl { class Window; }
      49             : 
      50             : namespace com { namespace sun { namespace star { namespace frame {
      51             :     class XFrame;
      52             : } } } }
      53             : 
      54             : 
      55             : class SFX2_DLLPUBLIC SfxModule : public SfxShell
      56             : {
      57             : private:
      58             :     ResMgr*                     pResMgr;
      59             :     bool                        bDummy : 1;
      60             :     SfxModule_Impl*             pImpl;
      61             : 
      62             :     SAL_DLLPRIVATE void Construct_Impl();
      63             : 
      64             : public:
      65             :                                 TYPEINFO_OVERRIDE();
      66         208 :                                 SFX_DECL_INTERFACE(SFX_INTERFACE_SFXMODULE)
      67             : 
      68             : private:
      69             :     /// SfxInterface initializer.
      70         208 :     static void InitInterface_Impl() {}
      71             : 
      72             : public:
      73             : 
      74             :                                 SfxModule( ResMgr* pMgrP, bool bDummy,
      75             :                                     SfxObjectFactory* pFactoryP, ... );
      76             :                                 virtual ~SfxModule();
      77             : 
      78             :     ResMgr*                     GetResMgr();
      79             :     SfxSlotPool*                GetSlotPool() const;
      80             : 
      81             :     void                        RegisterToolBoxControl(SfxTbxCtrlFactory*);
      82             :     void                        RegisterChildWindow(SfxChildWinFactory*);
      83             :     void                        RegisterStatusBarControl(SfxStbCtrlFactory*);
      84             :     void                        RegisterMenuControl(SfxMenuCtrlFactory*);
      85             : 
      86             :     virtual VclPtr<SfxTabPage>  CreateTabPage( sal_uInt16 nId,
      87             :                                                vcl::Window* pParent,
      88             :                                                const SfxItemSet& rSet );
      89             :     virtual void                Invalidate(sal_uInt16 nId = 0) SAL_OVERRIDE;
      90             : 
      91             :     bool                        IsChildWindowAvailable( const sal_uInt16 i_nId, const SfxViewFrame* i_pViewFrame ) const;
      92             : 
      93             :     static SfxModule*           GetActiveModule( SfxViewFrame* pFrame=NULL );
      94             :     static FieldUnit            GetCurrentFieldUnit();
      95             :     /** retrieves the field unit of the module belonging to the document displayed in the given frame
      96             : 
      97             :         Effectively, this method looks up the SfxViewFrame belonging to the given XFrame, then the SfxModule belonging to
      98             :         the document in this frame, then this module's field unit.
      99             : 
     100             :         Failures in any of those steps are reported as assertion in non-product builds, and then FUNIT_100TH_MM is returned.
     101             :      */
     102             :     static FieldUnit            GetModuleFieldUnit( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > const & i_frame );
     103             :     FieldUnit                   GetFieldUnit() const;
     104             : 
     105             :     SAL_DLLPRIVATE static SfxModuleArr_Impl& GetModules_Impl();
     106             :     SAL_DLLPRIVATE static void DestroyModules_Impl();
     107             :     SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl* GetTbxCtrlFactories_Impl() const;
     108             :     SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl* GetStbCtrlFactories_Impl() const;
     109             :     SAL_DLLPRIVATE SfxMenuCtrlFactArr_Impl* GetMenuCtrlFactories_Impl() const;
     110             :     SAL_DLLPRIVATE SfxChildWinFactArr_Impl* GetChildWinFactories_Impl() const;
     111             :     SAL_DLLPRIVATE ImageList* GetImageList_Impl( bool bBig );
     112             : };
     113             : 
     114             : #endif
     115             : 
     116             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11