LCOV - code coverage report
Current view: top level - filter/source/t602 - filterenv.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 10 16 62.5 %
Date: 2012-08-25 Functions: 1 1 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 12 52 23.1 %

           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 <osl/mutex.hxx>
      30                 :            : #include <osl/thread.h>
      31                 :            : #include <cppuhelper/factory.hxx>
      32                 :            : 
      33                 :            : #include <com/sun/star/lang/XSingleServiceFactory.hpp>
      34                 :            : 
      35                 :            : #include "t602filter.hxx"
      36                 :            : 
      37                 :            : using namespace ::rtl;
      38                 :            : using namespace ::cppu;
      39                 :            : using namespace ::com::sun::star::uno;
      40                 :            : using namespace ::com::sun::star::lang;
      41                 :            : using namespace ::com::sun::star::registry;
      42                 :            : 
      43                 :            : using namespace T602ImportFilter;
      44                 :            : 
      45                 :            : extern "C"
      46                 :            : {
      47                 :          6 : SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
      48                 :            :     const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
      49                 :            : {
      50                 :          6 :     void * pRet = 0;
      51                 :            : 
      52                 :          6 :     OUString implName = OUString::createFromAscii( pImplName );
      53 [ +  - ][ +  - ]:          6 :     if ( pServiceManager && implName.equals(T602ImportFilter_getImplementationName()) )
                 [ +  - ]
           [ +  -  #  # ]
                 [ +  - ]
      54                 :            :     {
      55                 :            :         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
      56                 :            :             reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
      57                 :            :             OUString::createFromAscii( pImplName ),
      58 [ +  - ][ +  - ]:          6 :             T602ImportFilter_createInstance, T602ImportFilter_getSupportedServiceNames() ) );
         [ +  - ][ +  - ]
      59                 :            : 
      60         [ +  - ]:          6 :         if (xFactory.is())
      61                 :            :         {
      62         [ +  - ]:          6 :             xFactory->acquire();
      63         [ +  - ]:          6 :             pRet = xFactory.get();
      64                 :          6 :         }
      65                 :            :     }
      66 [ #  # ][ #  # ]:          0 :     else if ( pServiceManager && implName.equals(T602ImportFilterDialog_getImplementationName()) )
         [ #  # ][ #  # ]
           [ #  #  #  # ]
      67                 :            :     {
      68                 :            :         Reference< XSingleServiceFactory > xFactory( createSingleFactory(
      69                 :            :             reinterpret_cast< XMultiServiceFactory * >( pServiceManager ),
      70                 :            :             OUString::createFromAscii( pImplName ),
      71 [ #  # ][ #  # ]:          0 :             T602ImportFilterDialog_createInstance, T602ImportFilterDialog_getSupportedServiceNames() ) );
         [ #  # ][ #  # ]
      72                 :            : 
      73         [ #  # ]:          0 :         if (xFactory.is())
      74                 :            :         {
      75         [ #  # ]:          0 :             xFactory->acquire();
      76         [ #  # ]:          0 :             pRet = xFactory.get();
      77                 :          0 :         }
      78                 :            :     }
      79                 :            : 
      80                 :            : 
      81                 :          6 :     return pRet;
      82                 :            : }
      83                 :            : }
      84                 :            : 
      85                 :            : 
      86                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10