LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/unoidl - facreg.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 50 96 52.1 %
Date: 2012-12-27 Functions: 4 4 100.0 %
Legend: Lines: hit not hit

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

Generated by: LCOV version 1.10