1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include "requeststringresolver.hxx"
22 #include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
23 #include <cppuhelper/exc_hlp.hxx>
24 #include <cppuhelper/supportsservice.hxx>
28 UUIInteractionRequestStringResolver::UUIInteractionRequestStringResolver(
29 uno::Reference
< uno::XComponentContext
> const &
35 UUIInteractionRequestStringResolver::~UUIInteractionRequestStringResolver()
40 UUIInteractionRequestStringResolver::getImplementationName()
42 return "com.sun.star.comp.uui.UUIInteractionRequestStringResolver";
46 UUIInteractionRequestStringResolver::supportsService(
47 OUString
const & rServiceName
)
49 return cppu::supportsService(this, rServiceName
);
53 uno::Sequence
< OUString
> SAL_CALL
54 UUIInteractionRequestStringResolver::getSupportedServiceNames()
56 return { "com.sun.star.task.InteractionRequestStringResolver" };
59 beans::Optional
< OUString
> SAL_CALL
60 UUIInteractionRequestStringResolver::getStringFromInformationalRequest(
62 task::XInteractionRequest
>& Request
)
66 return m_pImpl
.getStringFromRequest(Request
);
68 catch (uno::RuntimeException
const & ex
)
70 css::uno::Any anyEx
= cppu::getCaughtException();
71 throw css::lang::WrappedTargetRuntimeException( ex
.Message
,
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 &)
81 return cppu::acquire(new UUIInteractionRequestStringResolver(context
));
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */