Coverage Report

Created: 2025-12-08 09:28

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/uui/source/requeststringresolver.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
 * 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 "requeststringresolver.hxx"
21
#include "iahndl.hxx"
22
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
23
#include <cppuhelper/exc_hlp.hxx>
24
#include <cppuhelper/supportsservice.hxx>
25
26
using namespace css;
27
28
UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver(
29
    uno::Reference< uno::XComponentContext > const &
30
        rxContext)
31
0
        : m_pImpl(rxContext)
32
0
{
33
0
}
34
35
UUIInteractionRequestStringResolver::~UUIInteractionRequestStringResolver()
36
0
{
37
0
}
38
39
OUString SAL_CALL
40
UUIInteractionRequestStringResolver::getImplementationName()
41
0
{
42
0
    return u"com.sun.star.comp.uui.UUIInteractionRequestStringResolver"_ustr;
43
0
}
44
45
sal_Bool SAL_CALL
46
UUIInteractionRequestStringResolver::supportsService(
47
        OUString const & rServiceName)
48
0
{
49
0
    return cppu::supportsService(this, rServiceName);
50
0
}
51
52
53
uno::Sequence< OUString > SAL_CALL
54
UUIInteractionRequestStringResolver::getSupportedServiceNames()
55
0
{
56
0
    return { u"com.sun.star.task.InteractionRequestStringResolver"_ustr };
57
0
}
58
59
beans::Optional< OUString > SAL_CALL
60
UUIInteractionRequestStringResolver::getStringFromInformationalRequest(
61
    const uno::Reference<
62
        task::XInteractionRequest >& Request )
63
0
{
64
0
    try
65
0
    {
66
0
        return m_pImpl.getStringFromRequest(Request);
67
0
    }
68
0
    catch (uno::RuntimeException const & ex)
69
0
    {
70
0
        css::uno::Any anyEx = cppu::getCaughtException();
71
0
        throw css::lang::WrappedTargetRuntimeException( ex.Message,
72
0
                *this, anyEx );
73
0
    }
74
0
}
75
76
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
77
com_sun_star_comp_uui_UUIInteractionRequestStringResolver_get_implementation(
78
    css::uno::XComponentContext *context,
79
    css::uno::Sequence<css::uno::Any> const &)
80
0
{
81
0
    return cppu::acquire(new UUIInteractionRequestStringResolver(context));
82
0
}
83
84
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */