LCOV - code coverage report
Current view: top level - cppuhelper/source - supportsservice.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 6 6 100.0 %
Date: 2015-06-13 12:38:46 Functions: 1 1 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             : 
      10             : #include <sal/config.h>
      11             : 
      12             : #include <cassert>
      13             : 
      14             : #include <com/sun/star/lang/XServiceInfo.hpp>
      15             : #include <com/sun/star/uno/Sequence.hxx>
      16             : #include <cppuhelper/supportsservice.hxx>
      17             : #include <rtl/ustring.hxx>
      18             : #include <sal/types.h>
      19             : 
      20       75394 : bool cppu::supportsService(
      21             :     css::lang::XServiceInfo * implementation, rtl::OUString const & name)
      22             : {
      23             :     assert(implementation != 0);
      24             :     css::uno::Sequence< rtl::OUString > s(
      25       75394 :         implementation->getSupportedServiceNames());
      26      456769 :     for (sal_Int32 i = 0; i != s.getLength(); ++i) {
      27      400743 :         if (s[i] == name) {
      28       19368 :             return true;
      29             :         }
      30             :     }
      31       56026 :     return false;
      32             : }
      33             : 
      34             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11