Coverage Report

Created: 2025-11-16 09:57

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/cppuhelper/source/supportsservice.cxx
Line
Count
Source
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 <algorithm>
13
#include <cassert>
14
15
#include <com/sun/star/lang/XServiceInfo.hpp>
16
#include <com/sun/star/uno/Sequence.hxx>
17
#include <cppuhelper/supportsservice.hxx>
18
#include <rtl/ustring.hxx>
19
20
bool cppu::supportsService(css::lang::XServiceInfo* implementation, OUString const& name)
21
92.4k
{
22
    assert(implementation != nullptr);
23
92.4k
    const css::uno::Sequence<OUString> s(implementation->getSupportedServiceNames());
24
92.4k
    return std::find(s.begin(), s.end(), name) != s.end();
25
92.4k
}
26
27
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */