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

Generated by: LCOV version 1.10