LCOV - code coverage report
Current view: top level - extensions/source/scanner - scanner.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 19 25 76.0 %
Date: 2015-06-13 12:38:46 Functions: 8 11 72.7 %
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 <scanner.hxx>
      21             : 
      22             : #include <cppuhelper/supportsservice.hxx>
      23             : 
      24             : // - ScannerManager -
      25             : 
      26             : 
      27         126 : Reference< XInterface > SAL_CALL ScannerManager_CreateInstance( const Reference< com::sun::star::lang::XMultiServiceFactory >& /*rxFactory*/ ) throw ( Exception )
      28             : {
      29         126 :     return *( new ScannerManager() );
      30             : }
      31             : 
      32             : 
      33             : 
      34         126 : ScannerManager::ScannerManager() :
      35         126 :     mpData( NULL )
      36             : {
      37         126 :     AcquireData();
      38         126 : }
      39             : 
      40             : 
      41             : 
      42         378 : ScannerManager::~ScannerManager()
      43             : {
      44         126 :     ReleaseData();
      45         252 : }
      46             : 
      47           0 : Sequence< sal_Int8 > SAL_CALL ScannerManager::getMaskDIB() throw(std::exception)
      48             : {
      49           0 :     return Sequence< sal_Int8 >();
      50             : }
      51             : 
      52           1 : OUString ScannerManager::getImplementationName()
      53             :     throw (css::uno::RuntimeException, std::exception)
      54             : {
      55           1 :     return getImplementationName_Static();
      56             : }
      57             : 
      58           0 : sal_Bool ScannerManager::supportsService(OUString const & ServiceName)
      59             :     throw (css::uno::RuntimeException, std::exception)
      60             : {
      61           0 :     return cppu::supportsService(this, ServiceName);
      62             : }
      63             : 
      64           1 : css::uno::Sequence<OUString> ScannerManager::getSupportedServiceNames()
      65             :     throw (css::uno::RuntimeException, std::exception)
      66             : {
      67           1 :     return getSupportedServiceNames_Static();
      68             : }
      69             : 
      70          29 : OUString ScannerManager::getImplementationName_Static() throw()
      71             : {
      72          29 :     return OUString( "com.sun.star.scanner.ScannerManager" );
      73             : }
      74             : 
      75             : 
      76             : 
      77          15 : Sequence< OUString > ScannerManager::getSupportedServiceNames_Static() throw ()
      78             : {
      79          15 :     Sequence< OUString > aSNS( 1 );
      80             : 
      81          15 :     aSNS.getArray()[0] = "com.sun.star.scanner.ScannerManager";
      82             : 
      83          15 :     return aSNS;
      84             : }
      85             : 
      86           0 : sal_Bool SAL_CALL ScannerManager::configureScanner( ScannerContext& rContext )
      87             :     throw( ScannerException, std::exception )
      88             : {
      89           0 :     return configureScannerAndScan( rContext, NULL );
      90             : }
      91             : 
      92             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11