LCOV - code coverage report
Current view: top level - filter/source/flash - swfuno.cxx (source / functions) Hit Total Coverage
Test: commit 0e63ca4fde4e446f346e35849c756a30ca294aab Lines: 0 16 0.0 %
Date: 2014-04-11 Functions: 0 1 0.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 <stdio.h>
      21             : 
      22             : #include <osl/mutex.hxx>
      23             : #include <osl/thread.h>
      24             : #include <cppuhelper/factory.hxx>
      25             : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
      26             : 
      27             : using namespace ::rtl;
      28             : using namespace ::cppu;
      29             : using namespace ::com::sun::star::uno;
      30             : using namespace ::com::sun::star::lang;
      31             : using namespace ::com::sun::star::registry;
      32             : 
      33             : namespace swf {
      34             : extern OUString FlashExportFilter_getImplementationName() throw ( RuntimeException );
      35             : extern sal_Bool SAL_CALL FlashExportFilter_supportsService( const OUString& ServiceName ) throw ( RuntimeException );
      36             : extern Sequence< OUString > SAL_CALL FlashExportFilter_getSupportedServiceNames()  throw ( RuntimeException );
      37             : extern Reference< XInterface > SAL_CALL FlashExportFilter_createInstance( const Reference< XMultiServiceFactory > & rSMgr) throw ( Exception );
      38             : }
      39             : 
      40             : extern OUString SWFDialog_getImplementationName () throw (com::sun::star::uno::RuntimeException);
      41             : extern com::sun::star::uno::Sequence< OUString > SAL_CALL SWFDialog_getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException);
      42             : extern com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL SWFDialog_createInstance( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & rSMgr) throw( com::sun::star::uno::Exception );
      43             : 
      44             : using namespace ::swf;
      45             : 
      46             : extern "C"
      47             : {
      48           0 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL flash_component_getFactory(
      49             :     const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
      50             : {
      51           0 :     void * pRet = 0;
      52             : 
      53           0 :     if( pServiceManager )
      54             :     {
      55           0 :         Reference< XSingleServiceFactory > xFactory;
      56             : 
      57           0 :         OUString implName = OUString::createFromAscii( pImplName );
      58           0 :         if ( implName.equals(FlashExportFilter_getImplementationName()) )
      59             :         {
      60           0 :             xFactory = createSingleFactory(
      61             :                 reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
      62             :                 OUString::createFromAscii( pImplName ),
      63           0 :                 FlashExportFilter_createInstance, FlashExportFilter_getSupportedServiceNames() );
      64             : 
      65             :         }
      66           0 :         else if ( implName.equals(SWFDialog_getImplementationName()) )
      67             :         {
      68           0 :             xFactory = createSingleFactory(
      69             :                 reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
      70             :                 OUString::createFromAscii( pImplName ),
      71           0 :                 SWFDialog_createInstance, SWFDialog_getSupportedServiceNames() );
      72             :         }
      73             : 
      74           0 :         if (xFactory.is())
      75             :         {
      76           0 :             xFactory->acquire();
      77           0 :             pRet = xFactory.get();
      78           0 :         }
      79             :     }
      80             : 
      81           0 :     return pRet;
      82             : }
      83             : }
      84             : 
      85             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10