LibreOffice Module svx (master) 1
SafeModeUI.cxx
Go to the documentation of this file.
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
11#include <com/sun/star/frame/XSynchronousDispatch.hpp>
12#include <com/sun/star/lang/XServiceInfo.hpp>
13
15
16#include <vcl/svapp.hxx>
17
18#include "SafeModeDialog.hxx"
19
20namespace {
21
22class SafeModeUI : public ::cppu::WeakImplHelper< css::lang::XServiceInfo,
23 css::frame::XSynchronousDispatch > // => XDispatch!
24{
25public:
26 SafeModeUI();
27
28 // css.lang.XServiceInfo
29 virtual OUString SAL_CALL getImplementationName() override;
30
31 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
32
33 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
34
35
36 virtual css::uno::Any SAL_CALL dispatchWithReturnValue(const css::util::URL& aURL,
37 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) override;
38};
39
40SafeModeUI::SafeModeUI()
41{
42}
43
44OUString SAL_CALL SafeModeUI::getImplementationName()
45{
46 return "com.sun.star.comp.svx.SafeModeUI";
47}
48
49sal_Bool SAL_CALL SafeModeUI::supportsService(const OUString& sServiceName)
50{
51 return cppu::supportsService(this, sServiceName);
52}
53
54css::uno::Sequence< OUString > SAL_CALL SafeModeUI::getSupportedServiceNames()
55{
56 return { "com.sun.star.dialog.SafeModeUI" };
57}
58
59css::uno::Any SAL_CALL SafeModeUI::dispatchWithReturnValue(const css::util::URL&,
60 const css::uno::Sequence< css::beans::PropertyValue >& )
61{
62 SolarMutexGuard aGuard;
63 css::uno::Any aRet;
65 aDialog.run();
66 return aRet;
67}
68
69}
70
71extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
73 css::uno::XComponentContext * /*context*/,
74 css::uno::Sequence<css::uno::Any> const &)
75{
76 return cppu::acquire(new SafeModeUI);
77}
78
79/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_svx_SafeModeUI_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
Definition: SafeModeUI.cxx:72
static weld::Window * GetDefDialogParent()
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool