LCOV - code coverage report
Current view: top level - extensions/source/scanner - scanner.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 24 28 85.7 %
Date: 2012-08-25 Functions: 9 11 81.8 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 10 24 41.7 %

           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 <scanner.hxx>
      30                 :            : 
      31                 :            : // ------------------
      32                 :            : // - ScannerManager -
      33                 :            : // ------------------
      34                 :            : 
      35                 :        130 : REF( XInterface ) SAL_CALL ScannerManager_CreateInstance( const REF( com::sun::star::lang::XMultiServiceFactory )& /*rxFactory*/ ) throw ( Exception )
      36                 :            : {
      37         [ +  - ]:        130 :     return *( new ScannerManager() );
      38                 :            : }
      39                 :            : 
      40                 :            : // -----------------------------------------------------------------------------
      41                 :            : 
      42                 :        130 : ScannerManager::ScannerManager() :
      43         [ +  - ]:        130 :     mpData( NULL )
      44                 :            : {
      45         [ +  - ]:        130 :     AcquireData();
      46                 :        130 : }
      47                 :            : 
      48                 :            : // -----------------------------------------------------------------------------
      49                 :            : 
      50         [ +  - ]:        130 : ScannerManager::~ScannerManager()
      51                 :            : {
      52         [ +  - ]:        130 :     ReleaseData();
      53         [ -  + ]:        260 : }
      54                 :            : 
      55                 :            : // -----------------------------------------------------------------------------
      56                 :            : 
      57                 :        130 : ANY SAL_CALL ScannerManager::queryInterface( const Type& rType ) throw( RuntimeException )
      58                 :            : {
      59                 :            :     const ANY aRet( cppu::queryInterface( rType,
      60                 :            :                                           static_cast< XScannerManager2* >( this ),
      61         [ +  - ]:        130 :                                           static_cast< AWT::XBitmap* >( this ) ) );
      62                 :            : 
      63 [ +  - ][ #  # ]:        130 :     return( aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType ) );
      64                 :            : }
      65                 :            : 
      66                 :            : // -----------------------------------------------------------------------------
      67                 :            : 
      68                 :        520 : void SAL_CALL ScannerManager::acquire() throw()
      69                 :            : {
      70                 :        520 :     OWeakObject::acquire();
      71                 :        520 : }
      72                 :            : 
      73                 :            : // -----------------------------------------------------------------------------
      74                 :            : 
      75                 :        520 : void SAL_CALL ScannerManager::release() throw()
      76                 :            : {
      77                 :        520 :     OWeakObject::release();
      78                 :        520 : }
      79                 :            : 
      80                 :            : // -----------------------------------------------------------------------------
      81                 :            : 
      82                 :          0 : SEQ( sal_Int8 ) SAL_CALL ScannerManager::getMaskDIB() throw()
      83                 :            : {
      84                 :          0 :     return SEQ( sal_Int8 )();
      85                 :            : }
      86                 :            : 
      87                 :            : // -----------------------------------------------------------------------------
      88                 :            : 
      89                 :         32 : OUString ScannerManager::getImplementationName_Static() throw()
      90                 :            : {
      91                 :         32 :     return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) );
      92                 :            : }
      93                 :            : 
      94                 :            : // -----------------------------------------------------------------------------
      95                 :            : 
      96                 :         16 : SEQ( OUString ) ScannerManager::getSupportedServiceNames_Static() throw ()
      97                 :            : {
      98                 :         16 :     SEQ( OUString ) aSNS( 1 );
      99                 :            : 
     100 [ +  - ][ +  - ]:         16 :     aSNS.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.scanner.ScannerManager" ) );
     101                 :            : 
     102                 :         16 :     return aSNS;
     103                 :            : }
     104                 :            : 
     105                 :          0 : sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext )
     106                 :            :     throw( ScannerException )
     107                 :            : {
     108         [ #  # ]:          0 :     return configureScannerAndScan( rContext, NULL );
     109                 :            : }
     110                 :            : 
     111                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10