LCOV - code coverage report
Current view: top level - sd/source/ui/unoidl - facreg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 76 96 79.2 %
Date: 2012-08-25 Functions: 4 4 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 124 342 36.3 %

           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 <com/sun/star/registry/XRegistryKey.hpp>
      30                 :            : 
      31                 :            : #include "sddll.hxx"
      32                 :            : 
      33                 :            : #include <cppuhelper/factory.hxx>
      34                 :            : #include <uno/lbnames.h>
      35                 :            : #include <sfx2/sfxmodelfactory.hxx>
      36                 :            : #include "osl/diagnose.h"
      37                 :            : #include "sal/types.h"
      38                 :            : 
      39                 :            : #include <string.h>
      40                 :            : 
      41                 :            : #include <comphelper/stl_types.hxx>
      42                 :            : #include <boost/unordered_map.hpp>
      43                 :            : #include <boost/shared_ptr.hpp>
      44                 :            : 
      45                 :            : using namespace com::sun::star;
      46                 :            : 
      47                 :            : using ::rtl::OUString;
      48                 :            : 
      49                 :            : // Forward declarations of the factories.
      50                 :            : 
      51                 :            : extern uno::Reference< uno::XInterface > SAL_CALL SdDrawingDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory, const sal_uInt64 _nCreationFlags );
      52                 :            : extern OUString SdDrawingDocument_getImplementationName() throw( uno::RuntimeException );
      53                 :            : extern uno::Sequence< OUString > SAL_CALL SdDrawingDocument_getSupportedServiceNames() throw( uno::RuntimeException );
      54                 :            : 
      55                 :            : extern uno::Reference< uno::XInterface > SAL_CALL SdPresentationDocument_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory, const sal_uInt64 _nCreationFlags );
      56                 :            : extern OUString SdPresentationDocument_getImplementationName() throw( uno::RuntimeException );
      57                 :            : extern uno::Sequence< OUString > SAL_CALL SdPresentationDocument_getSupportedServiceNames() throw( uno::RuntimeException );
      58                 :            : 
      59                 :            : extern uno::Reference< uno::XInterface > SAL_CALL SdHtmlOptionsDialog_CreateInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
      60                 :            : extern OUString SdHtmlOptionsDialog_getImplementationName() throw( uno::RuntimeException );
      61                 :            : extern uno::Sequence< OUString > SAL_CALL SdHtmlOptionsDialog_getSupportedServiceNames() throw( uno::RuntimeException );
      62                 :            : 
      63                 :            : extern uno::Reference< uno::XInterface > SAL_CALL SdUnoModule_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
      64                 :            : extern OUString SdUnoModule_getImplementationName() throw( uno::RuntimeException );
      65                 :            : extern uno::Sequence< OUString > SAL_CALL SdUnoModule_getSupportedServiceNames() throw( uno::RuntimeException );
      66                 :            : 
      67                 :            : namespace sd
      68                 :            : {
      69                 :            : extern uno::Reference< uno::XInterface > SAL_CALL RandomNode_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
      70                 :            : extern OUString RandomNode__getImplementationName() throw( uno::RuntimeException );
      71                 :            : extern uno::Sequence< OUString > SAL_CALL RandomNode_getSupportedServiceNames() throw( uno::RuntimeException );
      72                 :            : 
      73                 :            : extern uno::Reference< uno::XInterface > SAL_CALL SlideLayoutController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
      74                 :            : extern OUString SlideLayoutController_getImplementationName() throw( uno::RuntimeException );
      75                 :            : extern uno::Sequence< OUString >  SlideLayoutController_getSupportedServiceNames() throw( uno::RuntimeException );
      76                 :            : 
      77                 :            : extern uno::Reference< uno::XInterface > SAL_CALL InsertSlideController_createInstance( const uno::Reference< lang::XMultiServiceFactory > & _rxFactory );
      78                 :            : extern OUString InsertSlideController_getImplementationName() throw( uno::RuntimeException );
      79                 :            : extern uno::Sequence< OUString >  InsertSlideController_getSupportedServiceNames() throw( uno::RuntimeException );
      80                 :            : }
      81                 :            : 
      82                 :            : namespace sd { namespace framework {
      83                 :            : 
      84                 :            : extern uno::Reference<uno::XInterface> SAL_CALL Configuration_createInstance(
      85                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
      86                 :            :     throw(uno::Exception);
      87                 :            : extern OUString Configuration_getImplementationName(void) throw (uno::RuntimeException);
      88                 :            : extern uno::Sequence<OUString> SAL_CALL Configuration_getSupportedServiceNames (void)
      89                 :            :     throw (uno::RuntimeException);
      90                 :            : 
      91                 :            : extern uno::Reference<uno::XInterface> SAL_CALL ConfigurationController_createInstance(
      92                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
      93                 :            :     throw(uno::Exception);
      94                 :            : extern OUString ConfigurationController_getImplementationName(void) throw (uno::RuntimeException);
      95                 :            : extern uno::Sequence<OUString> SAL_CALL ConfigurationController_getSupportedServiceNames (void)
      96                 :            :     throw (uno::RuntimeException);
      97                 :            : 
      98                 :            : extern uno::Reference<uno::XInterface> SAL_CALL ModuleController_createInstance(
      99                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     100                 :            :     throw(uno::Exception);
     101                 :            : extern OUString ModuleController_getImplementationName(void) throw (uno::RuntimeException);
     102                 :            : extern uno::Sequence<OUString> SAL_CALL ModuleController_getSupportedServiceNames (void)
     103                 :            :     throw (uno::RuntimeException);
     104                 :            : 
     105                 :            : extern uno::Reference<uno::XInterface> SAL_CALL BasicPaneFactory_createInstance(
     106                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     107                 :            :     throw(uno::Exception);
     108                 :            : extern OUString BasicPaneFactory_getImplementationName(void) throw (uno::RuntimeException);
     109                 :            : extern uno::Sequence<OUString> SAL_CALL BasicPaneFactory_getSupportedServiceNames (void)
     110                 :            :     throw (uno::RuntimeException);
     111                 :            : 
     112                 :            : extern uno::Reference<uno::XInterface> SAL_CALL BasicToolBarFactory_createInstance(
     113                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     114                 :            :     throw(uno::Exception);
     115                 :            : extern OUString BasicToolBarFactory_getImplementationName(void) throw (uno::RuntimeException);
     116                 :            : extern uno::Sequence<OUString> SAL_CALL BasicToolBarFactory_getSupportedServiceNames (void)
     117                 :            :     throw (uno::RuntimeException);
     118                 :            : 
     119                 :            : extern uno::Reference<uno::XInterface> SAL_CALL BasicViewFactory_createInstance(
     120                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     121                 :            :     throw(uno::Exception);
     122                 :            : extern OUString BasicViewFactory_getImplementationName(void) throw (uno::RuntimeException);
     123                 :            : extern uno::Sequence<OUString> SAL_CALL BasicViewFactory_getSupportedServiceNames (void)
     124                 :            :     throw (uno::RuntimeException);
     125                 :            : 
     126                 :            : extern uno::Reference<uno::XInterface> SAL_CALL TaskPanelFactory_createInstance(
     127                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     128                 :            :     throw(uno::Exception);
     129                 :            : extern OUString TaskPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
     130                 :            : extern uno::Sequence<OUString> SAL_CALL TaskPanelFactory_getSupportedServiceNames (void)
     131                 :            :     throw (uno::RuntimeException);
     132                 :            : 
     133                 :            : extern uno::Reference<uno::XInterface> SAL_CALL ResourceId_createInstance(
     134                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     135                 :            :     throw(uno::Exception);
     136                 :            : extern OUString ResourceId_getImplementationName(void) throw (uno::RuntimeException);
     137                 :            : extern uno::Sequence<OUString> SAL_CALL ResourceId_getSupportedServiceNames (void)
     138                 :            :     throw (uno::RuntimeException);
     139                 :            : 
     140                 :            : extern uno::Reference<uno::XInterface> SAL_CALL PresentationFactoryProvider_createInstance(
     141                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     142                 :            :     throw(uno::Exception);
     143                 :            : extern OUString PresentationFactoryProvider_getImplementationName(void)
     144                 :            :     throw (uno::RuntimeException);
     145                 :            : extern uno::Sequence<OUString> SAL_CALL PresentationFactoryProvider_getSupportedServiceNames (void)
     146                 :            :     throw (uno::RuntimeException);
     147                 :            : } }
     148                 :            : 
     149                 :            : 
     150                 :            : namespace sd { namespace toolpanel {
     151                 :            : 
     152                 :            : extern uno::Reference<uno::XInterface> SAL_CALL ToolPanelFactory_createInstance(
     153                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     154                 :            :     throw(uno::Exception);
     155                 :            : extern OUString ToolPanelFactory_getImplementationName(void) throw (uno::RuntimeException);
     156                 :            : extern uno::Sequence<OUString> SAL_CALL ToolPanelFactory_getSupportedServiceNames (void)
     157                 :            :     throw (uno::RuntimeException);
     158                 :            : 
     159                 :            : } }
     160                 :            : 
     161                 :            : namespace sd { namespace presenter {
     162                 :            : extern uno::Reference<uno::XInterface> SAL_CALL SlideRenderer_createInstance(
     163                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     164                 :            :     throw(uno::Exception);
     165                 :            : extern OUString SlideRenderer_getImplementationName(void)
     166                 :            :     throw (uno::RuntimeException);
     167                 :            : extern uno::Sequence<OUString> SAL_CALL SlideRenderer_getSupportedServiceNames (void)
     168                 :            :     throw (uno::RuntimeException);
     169                 :            : 
     170                 :            : extern uno::Reference<uno::XInterface> SAL_CALL PresenterCanvas_createInstance(
     171                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     172                 :            :     throw(uno::Exception);
     173                 :            : extern OUString PresenterCanvas_getImplementationName(void)
     174                 :            :     throw (uno::RuntimeException);
     175                 :            : extern uno::Sequence<OUString> SAL_CALL PresenterCanvas_getSupportedServiceNames (void)
     176                 :            :     throw (uno::RuntimeException);
     177                 :            : 
     178                 :            : extern uno::Reference<uno::XInterface> SAL_CALL PresenterTextViewService_createInstance(
     179                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     180                 :            :     throw(uno::Exception);
     181                 :            : extern OUString PresenterTextViewService_getImplementationName(void)
     182                 :            :     throw (uno::RuntimeException);
     183                 :            : extern uno::Sequence<OUString> SAL_CALL PresenterTextViewService_getSupportedServiceNames (void)
     184                 :            :     throw (uno::RuntimeException);
     185                 :            : 
     186                 :            : extern uno::Reference<uno::XInterface> SAL_CALL PresenterHelperService_createInstance(
     187                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     188                 :            :     throw(uno::Exception);
     189                 :            : extern OUString PresenterHelperService_getImplementationName(void)
     190                 :            :     throw (uno::RuntimeException);
     191                 :            : extern uno::Sequence<OUString> SAL_CALL PresenterHelperService_getSupportedServiceNames (void)
     192                 :            :     throw (uno::RuntimeException);
     193                 :            : 
     194                 :            : extern uno::Reference<uno::XInterface> SAL_CALL PresenterPreviewCache_createInstance(
     195                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     196                 :            :     throw(uno::Exception);
     197                 :            : extern OUString PresenterPreviewCache_getImplementationName(void)
     198                 :            :     throw (uno::RuntimeException);
     199                 :            : extern uno::Sequence<OUString> SAL_CALL PresenterPreviewCache_getSupportedServiceNames (void)
     200                 :            :     throw (uno::RuntimeException);
     201                 :            : } }
     202                 :            : 
     203                 :            : 
     204                 :            : namespace sd { namespace slidesorter {
     205                 :            : extern uno::Reference<uno::XInterface> SAL_CALL SlideSorterService_createInstance(
     206                 :            :     const uno::Reference<uno::XComponentContext>& rxContext)
     207                 :            :     throw(uno::Exception);
     208                 :            : extern OUString SlideSorterService_getImplementationName(void)
     209                 :            :     throw (uno::RuntimeException);
     210                 :            : extern uno::Sequence<OUString> SAL_CALL SlideSorterService_getSupportedServiceNames (void)
     211                 :            :     throw (uno::RuntimeException);
     212                 :            : } }
     213                 :            : 
     214                 :            : using namespace ::sd;
     215                 :            : using namespace ::sd::framework;
     216                 :            : using namespace ::sd::presenter;
     217                 :            : using namespace ::sd::slidesorter;
     218                 :            : using namespace ::sd::toolpanel;
     219                 :            : 
     220                 :            : 
     221                 :            : 
     222                 :            : 
     223                 :            : // ----------------------------------------------------------------------------
     224                 :            : // Declaration and initialization of a map from service names to locally
     225                 :            : // unique factory identifiers.
     226                 :            : 
     227                 :            : enum FactoryId
     228                 :            : {
     229                 :            :     SdDrawingDocumentFactoryId,
     230                 :            :     SdPresentationDocumentFactoryId,
     231                 :            :     SdHtmlOptionsDialogFactoryId,
     232                 :            :     SdUnoModuleFactoryId,
     233                 :            :     RandomNodeFactoryId,
     234                 :            : 
     235                 :            :     ConfigurationFactoryId,
     236                 :            :     ConfigurationControllerFactoryId,
     237                 :            :     ModuleControllerFactoryId,
     238                 :            :     BasicPaneFactoryFactoryId,
     239                 :            :     BasicToolBarFactoryFactoryId,
     240                 :            :     BasicViewFactoryFactoryId,
     241                 :            :     TaskPanelFactoryFactoryId,
     242                 :            :     ToolPanelFactoryFactoryId,
     243                 :            :     ResourceIdFactoryId,
     244                 :            :     PresentationFactoryProviderFactoryId,
     245                 :            :     SlideRendererFactoryId,
     246                 :            :     PresenterCanvasFactoryId,
     247                 :            :     PresenterTextViewServiceFactoryId,
     248                 :            :     PresenterHelperServiceFactoryId,
     249                 :            :     PresenterPreviewCacheFactoryId,
     250                 :            :     SlideSorterServiceFactoryId,
     251                 :            :     SlideLayoutControllerFactoryId,
     252                 :            :     InsertSlideControllerFactoryId,
     253                 :            : };
     254                 :            : typedef ::boost::unordered_map<OUString, FactoryId, rtl::OUStringHash, comphelper::UStringEqual> FactoryMap;
     255                 :            : 
     256                 :            : 
     257                 :            : namespace {
     258                 :         25 : static ::boost::shared_ptr<FactoryMap> spFactoryMap;
     259                 :        164 : ::boost::shared_ptr<FactoryMap> GetFactoryMap (void)
     260                 :            : {
     261         [ +  + ]:        164 :     if (spFactoryMap.get() == NULL)
     262                 :            :     {
     263 [ +  - ][ +  - ]:         22 :         spFactoryMap.reset(new FactoryMap);
                 [ +  - ]
     264         [ +  - ]:         22 :         (*spFactoryMap)[SdDrawingDocument_getImplementationName()] = SdDrawingDocumentFactoryId;
     265         [ +  - ]:         22 :         (*spFactoryMap)[SdPresentationDocument_getImplementationName()] = SdPresentationDocumentFactoryId;
     266         [ +  - ]:         22 :         (*spFactoryMap)[SdHtmlOptionsDialog_getImplementationName()] = SdHtmlOptionsDialogFactoryId;
     267         [ +  - ]:         22 :         (*spFactoryMap)[SdUnoModule_getImplementationName()] = SdUnoModuleFactoryId;
     268         [ +  - ]:         22 :         (*spFactoryMap)[RandomNode__getImplementationName()] = RandomNodeFactoryId;
     269         [ +  - ]:         22 :         (*spFactoryMap)[Configuration_getImplementationName()] = ConfigurationFactoryId;
     270         [ +  - ]:         22 :         (*spFactoryMap)[ConfigurationController_getImplementationName()] = ConfigurationControllerFactoryId;
     271         [ +  - ]:         22 :         (*spFactoryMap)[ModuleController_getImplementationName()] = ModuleControllerFactoryId;
     272         [ +  - ]:         22 :         (*spFactoryMap)[BasicPaneFactory_getImplementationName()] = BasicPaneFactoryFactoryId;
     273         [ +  - ]:         22 :         (*spFactoryMap)[BasicToolBarFactory_getImplementationName()] = BasicToolBarFactoryFactoryId;
     274         [ +  - ]:         22 :         (*spFactoryMap)[BasicViewFactory_getImplementationName()] = BasicViewFactoryFactoryId;
     275         [ +  - ]:         22 :         (*spFactoryMap)[TaskPanelFactory_getImplementationName()] = TaskPanelFactoryFactoryId;
     276         [ +  - ]:         22 :         (*spFactoryMap)[ToolPanelFactory_getImplementationName()] = ToolPanelFactoryFactoryId;
     277         [ +  - ]:         22 :         (*spFactoryMap)[ResourceId_getImplementationName()] = ResourceIdFactoryId;
     278         [ +  - ]:         22 :         (*spFactoryMap)[PresentationFactoryProvider_getImplementationName()] = PresentationFactoryProviderFactoryId;
     279         [ +  - ]:         22 :         (*spFactoryMap)[SlideRenderer_getImplementationName()] = SlideRendererFactoryId;
     280         [ +  - ]:         22 :         (*spFactoryMap)[PresenterCanvas_getImplementationName()] = PresenterCanvasFactoryId;
     281         [ +  - ]:         22 :         (*spFactoryMap)[PresenterTextViewService_getImplementationName()] = PresenterTextViewServiceFactoryId;
     282         [ +  - ]:         22 :         (*spFactoryMap)[PresenterHelperService_getImplementationName()] = PresenterHelperServiceFactoryId;
     283         [ +  - ]:         22 :         (*spFactoryMap)[PresenterPreviewCache_getImplementationName()] = PresenterPreviewCacheFactoryId;
     284         [ +  - ]:         22 :         (*spFactoryMap)[SlideSorterService_getImplementationName()] = SlideSorterServiceFactoryId;
     285         [ +  - ]:         22 :         (*spFactoryMap)[SlideLayoutController_getImplementationName()] = SlideLayoutControllerFactoryId;
     286         [ +  - ]:         22 :         (*spFactoryMap)[InsertSlideController_getImplementationName()] = InsertSlideControllerFactoryId;
     287                 :            :     }
     288                 :        164 :     return spFactoryMap;
     289                 :            : };
     290                 :            : } // end of anonymous namespace
     291                 :            : 
     292                 :            : 
     293                 :            : extern "C"
     294                 :            : {
     295                 :            : 
     296                 :        164 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL sd_component_getFactory(
     297                 :            :     const sal_Char * pImplName,
     298                 :            :     void           * pServiceManager,
     299                 :            :     void           *  )
     300                 :            : {
     301                 :        164 :     void * pRet = 0;
     302                 :            : 
     303         [ +  - ]:        164 :     if( pServiceManager )
     304                 :            :     {
     305         [ +  - ]:        164 :         uno::Reference< lang::XMultiServiceFactory > xMSF( reinterpret_cast< lang::XMultiServiceFactory * >( pServiceManager ) );
     306                 :            : 
     307                 :        164 :         uno::Reference<lang::XSingleServiceFactory> xFactory;
     308                 :        164 :         uno::Reference<lang::XSingleComponentFactory> xComponentFactory;
     309                 :            : 
     310         [ +  - ]:        164 :         ::boost::shared_ptr<FactoryMap> pFactoryMap (GetFactoryMap());
     311                 :        164 :         OUString sImplementationName (OUString::createFromAscii(pImplName));
     312         [ +  - ]:        164 :         FactoryMap::const_iterator iFactory (pFactoryMap->find(sImplementationName));
     313 [ +  - ][ +  - ]:        164 :         if (iFactory != pFactoryMap->end())
     314                 :            :         {
     315 [ +  - ][ -  +  :        164 :             switch (iFactory->second)
          +  -  -  -  +  
          +  +  +  +  +  
          +  +  +  -  -  
          -  -  -  -  +  
                   +  - ]
     316                 :            :             {
     317                 :            :                 case SdHtmlOptionsDialogFactoryId:
     318                 :            :                     xFactory = ::cppu::createSingleFactory(
     319                 :            :                         xMSF,
     320                 :            :                         SdHtmlOptionsDialog_getImplementationName(),
     321                 :            :                         SdHtmlOptionsDialog_CreateInstance,
     322 [ #  # ][ #  # ]:          0 :                         SdHtmlOptionsDialog_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     323                 :          0 :                     break;
     324                 :            : 
     325                 :            :                 case SdDrawingDocumentFactoryId:
     326                 :            :                     xFactory = ::sfx2::createSfxModelFactory(
     327                 :            :                         xMSF,
     328                 :            :                         SdDrawingDocument_getImplementationName(),
     329                 :            :                         SdDrawingDocument_createInstance,
     330 [ +  - ][ +  - ]:         16 :                         SdDrawingDocument_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     331                 :         16 :                     break;
     332                 :            : 
     333                 :            :                 case SdPresentationDocumentFactoryId:
     334                 :            :                     xFactory = ::sfx2::createSfxModelFactory(
     335                 :            :                         xMSF,
     336                 :            :                         SdPresentationDocument_getImplementationName(),
     337                 :            :                         SdPresentationDocument_createInstance,
     338 [ +  - ][ +  - ]:         14 :                         SdPresentationDocument_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     339                 :         14 :                     break;
     340                 :            : 
     341                 :            :                 case SdUnoModuleFactoryId:
     342                 :            :                     xFactory = ::cppu::createSingleFactory(
     343                 :            :                         xMSF,
     344                 :            :                         SdUnoModule_getImplementationName(),
     345                 :            :                         SdUnoModule_createInstance,
     346 [ #  # ][ #  # ]:          0 :                         SdUnoModule_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     347                 :          0 :                     break;
     348                 :            : 
     349                 :            :                 case RandomNodeFactoryId:
     350                 :            :                     xFactory = ::cppu::createSingleFactory(
     351                 :            :                         xMSF,
     352                 :            :                         sd::RandomNode__getImplementationName(),
     353                 :            :                         sd::RandomNode_createInstance,
     354 [ #  # ][ #  # ]:          0 :                         sd::RandomNode_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     355                 :          0 :                     break;
     356                 :            : 
     357                 :            :                 case ConfigurationFactoryId:
     358                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     359                 :            :                         sd::framework::Configuration_createInstance,
     360                 :            :                         sd::framework::Configuration_getImplementationName(),
     361 [ #  # ][ #  # ]:          0 :                         sd::framework::Configuration_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     362                 :          0 :                     break;
     363                 :            : 
     364                 :            :                 case ConfigurationControllerFactoryId:
     365                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     366                 :            :                         sd::framework::ConfigurationController_createInstance,
     367                 :            :                         sd::framework::ConfigurationController_getImplementationName(),
     368 [ +  - ][ +  - ]:         16 :                         sd::framework::ConfigurationController_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     369                 :         16 :                     break;
     370                 :            : 
     371                 :            :                 case ModuleControllerFactoryId:
     372                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     373                 :            :                         sd::framework::ModuleController_createInstance,
     374                 :            :                         sd::framework::ModuleController_getImplementationName(),
     375 [ +  - ][ +  - ]:         16 :                         sd::framework::ModuleController_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     376                 :         16 :                     break;
     377                 :            : 
     378                 :            :                 case BasicPaneFactoryFactoryId:
     379                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     380                 :            :                         sd::framework::BasicPaneFactory_createInstance,
     381                 :            :                         sd::framework::BasicPaneFactory_getImplementationName(),
     382 [ +  - ][ +  - ]:         16 :                         sd::framework::BasicPaneFactory_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     383                 :         16 :                     break;
     384                 :            : 
     385                 :            :                 case BasicToolBarFactoryFactoryId:
     386                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     387                 :            :                         sd::framework::BasicToolBarFactory_createInstance,
     388                 :            :                         sd::framework::BasicToolBarFactory_getImplementationName(),
     389 [ +  - ][ +  - ]:          8 :                         sd::framework::BasicToolBarFactory_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     390                 :          8 :                     break;
     391                 :            : 
     392                 :            :                 case BasicViewFactoryFactoryId:
     393                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     394                 :            :                         sd::framework::BasicViewFactory_createInstance,
     395                 :            :                         sd::framework::BasicViewFactory_getImplementationName(),
     396 [ +  - ][ +  - ]:         16 :                         sd::framework::BasicViewFactory_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     397                 :         16 :                     break;
     398                 :            : 
     399                 :            :                 case TaskPanelFactoryFactoryId:
     400                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     401                 :            :                         sd::framework::TaskPanelFactory_createInstance,
     402                 :            :                         sd::framework::TaskPanelFactory_getImplementationName(),
     403 [ +  - ][ +  - ]:          6 :                         sd::framework::TaskPanelFactory_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     404                 :          6 :                     break;
     405                 :            : 
     406                 :            :                 case ToolPanelFactoryFactoryId:
     407                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     408                 :            :                         sd::toolpanel::ToolPanelFactory_createInstance,
     409                 :            :                         sd::toolpanel::ToolPanelFactory_getImplementationName(),
     410 [ +  - ][ +  - ]:          8 :                         sd::toolpanel::ToolPanelFactory_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     411                 :          8 :                     break;
     412                 :            : 
     413                 :            :                 case ResourceIdFactoryId:
     414                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     415                 :            :                         sd::framework::ResourceId_createInstance,
     416                 :            :                         sd::framework::ResourceId_getImplementationName(),
     417 [ +  - ][ +  - ]:         16 :                         sd::framework::ResourceId_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     418                 :         16 :                     break;
     419                 :            : 
     420                 :            :                 case PresentationFactoryProviderFactoryId:
     421                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     422                 :            :                         sd::framework::PresentationFactoryProvider_createInstance,
     423                 :            :                         sd::framework::PresentationFactoryProvider_getImplementationName(),
     424 [ +  - ][ +  - ]:         16 :                         sd::framework::PresentationFactoryProvider_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     425                 :         16 :                     break;
     426                 :            : 
     427                 :            :                 case SlideRendererFactoryId:
     428                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     429                 :            :                         sd::presenter::SlideRenderer_createInstance,
     430                 :            :                         sd::presenter::SlideRenderer_getImplementationName(),
     431 [ #  # ][ #  # ]:          0 :                         sd::presenter::SlideRenderer_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     432                 :          0 :                     break;
     433                 :            : 
     434                 :            :                 case PresenterCanvasFactoryId:
     435                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     436                 :            :                         sd::presenter::PresenterCanvas_createInstance,
     437                 :            :                         sd::presenter::PresenterCanvas_getImplementationName(),
     438 [ #  # ][ #  # ]:          0 :                         sd::presenter::PresenterCanvas_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     439                 :          0 :                     break;
     440                 :            : 
     441                 :            :                 case PresenterTextViewServiceFactoryId:
     442                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     443                 :            :                         sd::presenter::PresenterTextViewService_createInstance,
     444                 :            :                         sd::presenter::PresenterTextViewService_getImplementationName(),
     445 [ #  # ][ #  # ]:          0 :                         sd::presenter::PresenterTextViewService_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     446                 :          0 :                     break;
     447                 :            : 
     448                 :            :                 case PresenterHelperServiceFactoryId:
     449                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     450                 :            :                         sd::presenter::PresenterHelperService_createInstance,
     451                 :            :                         sd::presenter::PresenterHelperService_getImplementationName(),
     452 [ #  # ][ #  # ]:          0 :                         sd::presenter::PresenterHelperService_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     453                 :          0 :                     break;
     454                 :            : 
     455                 :            :                 case PresenterPreviewCacheFactoryId:
     456                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     457                 :            :                         sd::presenter::PresenterPreviewCache_createInstance,
     458                 :            :                         sd::presenter::PresenterPreviewCache_getImplementationName(),
     459 [ #  # ][ #  # ]:          0 :                         sd::presenter::PresenterPreviewCache_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     460                 :          0 :                     break;
     461                 :            : 
     462                 :            :                 case SlideSorterServiceFactoryId:
     463                 :            :                     xComponentFactory = ::cppu::createSingleComponentFactory(
     464                 :            :                         sd::slidesorter::SlideSorterService_createInstance,
     465                 :            :                         sd::slidesorter::SlideSorterService_getImplementationName(),
     466 [ #  # ][ #  # ]:          0 :                         sd::slidesorter::SlideSorterService_getSupportedServiceNames());
         [ #  # ][ #  # ]
                 [ #  # ]
     467                 :          0 :                     break;
     468                 :            : 
     469                 :            :                 case SlideLayoutControllerFactoryId:
     470                 :            :                     xFactory = ::cppu::createSingleFactory(
     471                 :            :                         xMSF,
     472                 :            :                         sd::SlideLayoutController_getImplementationName(),
     473                 :            :                         sd::SlideLayoutController_createInstance,
     474 [ +  - ][ +  - ]:          8 :                         sd::SlideLayoutController_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     475                 :          8 :                     break;
     476                 :            : 
     477                 :            :                 case InsertSlideControllerFactoryId:
     478                 :            :                     xFactory = ::cppu::createSingleFactory(
     479                 :            :                         xMSF,
     480                 :            :                         sd::InsertSlideController_getImplementationName(),
     481                 :            :                         sd::InsertSlideController_createInstance,
     482 [ +  - ][ +  - ]:          8 :                         sd::InsertSlideController_getSupportedServiceNames());
         [ +  - ][ +  - ]
                 [ +  - ]
     483                 :            :                 default:
     484                 :          8 :                     break;
     485                 :            :             }
     486         [ +  + ]:        164 :             if (xComponentFactory.is())
     487                 :            :             {
     488         [ +  - ]:        118 :                 xComponentFactory->acquire();
     489         [ +  - ]:        118 :                 pRet = xComponentFactory.get();
     490                 :            :             }
     491         [ +  - ]:         46 :             else if (xFactory.is())
     492                 :            :             {
     493         [ +  - ]:         46 :                 xFactory->acquire();
     494         [ +  - ]:         46 :                 pRet = xFactory.get();
     495                 :            :             }
     496         [ +  - ]:        164 :         }
     497                 :            :     }
     498                 :            : 
     499         [ +  - ]:        164 :     if (pRet != NULL)
     500                 :        164 :         SdDLL::Init();
     501                 :        164 :     return pRet;
     502                 :            : }
     503                 :            : 
     504 [ +  - ][ +  - ]:         75 : } // end of extern "C"
     505                 :            : 
     506                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10