LCOV - code coverage report
Current view: top level - sd/source/ui/app - sddll.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 27 27 100.0 %
Date: 2012-08-25 Functions: 3 3 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 25 38 65.8 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      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.
      15                 :            :  *
      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).
      21                 :            :  *
      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.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include <editeng/eeitem.hxx>
      30                 :            : 
      31                 :            : #include <editeng/editeng.hxx>
      32                 :            : #include <svx/svdobj.hxx>
      33                 :            : #include <unotools/moduleoptions.hxx>
      34                 :            : #include <svx/fmobjfac.hxx>
      35                 :            : #include <svx/svdfield.hxx>
      36                 :            : #include <svx/objfac3d.hxx>
      37                 :            : 
      38                 :            : #include "sddll.hxx"
      39                 :            : #include "DrawDocShell.hxx"
      40                 :            : #include "GraphicDocShell.hxx"
      41                 :            : #include "sdresid.hxx"
      42                 :            : #include "sdobjfac.hxx"
      43                 :            : #include "cfgids.hxx"
      44                 :            : #include "strmname.h"
      45                 :            : #include "SdShapeTypes.hxx"
      46                 :            : 
      47                 :            : #include <svx/SvxShapeTypes.hxx>
      48                 :            : #include <sfx2/docfilt.hxx>
      49                 :            : #include <sfx2/docfile.hxx>
      50                 :            : #include <sfx2/fcontnr.hxx>
      51                 :            : #include <svtools/FilterConfigItem.hxx>
      52                 :            : #include <com/sun/star/util/XArchiver.hpp>
      53                 :            : #include <comphelper/processfactory.hxx>
      54                 :            : 
      55                 :            : using namespace ::rtl;
      56                 :            : using namespace ::com::sun::star;
      57                 :            : 
      58                 :            : 
      59                 :            : /*************************************************************************
      60                 :            : |*
      61                 :            : |* Init
      62                 :            : |*
      63                 :            : \************************************************************************/
      64                 :            : 
      65                 :        315 : void SdDLL::Init()
      66                 :            : {
      67         [ +  + ]:        315 :     if ( SD_MOD() )
      68                 :        315 :         return;
      69                 :            : 
      70                 :         25 :     SfxObjectFactory* pDrawFact = NULL;
      71                 :         25 :     SfxObjectFactory* pImpressFact = NULL;
      72                 :            : 
      73 [ +  - ][ +  + ]:         25 :     if (SvtModuleOptions().IsImpress())
      74                 :         22 :         pImpressFact = &::sd::DrawDocShell::Factory();
      75                 :            : 
      76 [ +  - ][ +  + ]:         25 :     if (SvtModuleOptions().IsDraw())
      77                 :         22 :         pDrawFact = &::sd::GraphicDocShell::Factory();
      78                 :            : 
      79                 :            :     // the SdModule must be created
      80                 :         25 :      SdModule** ppShlPtr = (SdModule**) GetAppData(SHL_DRAW);
      81                 :            : 
      82                 :            :      // #i46427#
      83                 :            :      // The SfxModule::SfxModule stops when the first given factory
      84                 :            :      // is 0, so we must not give a 0 as first factory
      85         [ +  + ]:         25 :      if( pImpressFact )
      86                 :            :      {
      87         [ +  - ]:         22 :         (*ppShlPtr) = new SdModule( pImpressFact, pDrawFact );
      88                 :            :      }
      89                 :            :      else
      90                 :            :      {
      91         [ +  - ]:          3 :         (*ppShlPtr) = new SdModule( pDrawFact, pImpressFact );
      92                 :            :      }
      93                 :            : 
      94 [ +  - ][ +  + ]:         25 :     if (SvtModuleOptions().IsImpress())
      95                 :            :     {
      96                 :            :         // Register the Impress shape types in order to make the shapes accessible.
      97                 :         22 :         ::accessibility::RegisterImpressShapeTypes ();
      98 [ +  - ][ +  - ]:         22 :         ::sd::DrawDocShell::Factory().SetDocumentServiceName( "com.sun.star.presentation.PresentationDocument" );
      99                 :            :     }
     100                 :            : 
     101 [ +  - ][ +  + ]:         25 :     if (SvtModuleOptions().IsDraw())
     102                 :            :     {
     103 [ +  - ][ +  - ]:         22 :         ::sd::GraphicDocShell::Factory().SetDocumentServiceName( "com.sun.star.drawing.DrawingDocument" );
     104                 :            :     }
     105                 :            : 
     106                 :            :     // register your view-factories here
     107                 :         25 :     RegisterFactorys();
     108                 :            : 
     109                 :            :     // register your shell-interfaces here
     110                 :         25 :     RegisterInterfaces();
     111                 :            : 
     112                 :            :     // register your controllers here
     113                 :         25 :     RegisterControllers();
     114                 :            : 
     115                 :            :     // SvDraw-Felder registrieren
     116                 :         25 :     SdrRegisterFieldClasses();
     117                 :            : 
     118                 :            :     // 3D-Objekt-Factory eintragen
     119                 :         25 :     E3dObjFactory();
     120                 :            : 
     121                 :            :     // ::com::sun::star::form::component::Form-Objekt-Factory eintragen
     122                 :         25 :     FmFormObjFactory();
     123                 :            : 
     124                 :            :     // Objekt-Factory eintragen
     125         [ +  - ]:         25 :     SdrObjFactory::InsertMakeUserDataHdl(LINK(&aSdObjectFactory, SdObjectFactory, MakeUserData));
     126                 :            : 
     127                 :            :     // register your exotic remote controlls here
     128                 :         25 :     RegisterRemotes();
     129 [ +  - ][ +  - ]:         75 : }
     130                 :            : 
     131                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10