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/.
10 #include <cppuhelper/implbase.hxx>
11 #include <com/sun/star/frame/XSynchronousDispatch.hpp>
12 #include <com/sun/star/lang/XServiceInfo.hpp>
14 #include <cppuhelper/supportsservice.hxx>
16 #include <vcl/svapp.hxx>
18 #include "SafeModeDialog.hxx"
22 class SafeModeUI
: public ::cppu::WeakImplHelper
< css::lang::XServiceInfo
,
23 css::frame::XSynchronousDispatch
> // => XDispatch!
28 // css.lang.XServiceInfo
29 virtual OUString SAL_CALL
getImplementationName() override
;
31 virtual sal_Bool SAL_CALL
supportsService(const OUString
& sServiceName
) override
;
33 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames() override
;
36 virtual css::uno::Any SAL_CALL
dispatchWithReturnValue(const css::util::URL
& aURL
,
37 const css::uno::Sequence
< css::beans::PropertyValue
>& lArguments
) override
;
40 SafeModeUI::SafeModeUI()
44 OUString SAL_CALL
SafeModeUI::getImplementationName()
46 return "com.sun.star.comp.svx.SafeModeUI";
49 sal_Bool SAL_CALL
SafeModeUI::supportsService(const OUString
& sServiceName
)
51 return cppu::supportsService(this, sServiceName
);
54 css::uno::Sequence
< OUString
> SAL_CALL
SafeModeUI::getSupportedServiceNames()
56 return { "com.sun.star.dialog.SafeModeUI" };
59 css::uno::Any SAL_CALL
SafeModeUI::dispatchWithReturnValue(const css::util::URL
&,
60 const css::uno::Sequence
< css::beans::PropertyValue
>& )
62 SolarMutexGuard aGuard
;
64 SafeModeDialog
aDialog(Application::GetDefDialogParent());
71 extern "C" SAL_DLLPUBLIC_EXPORT
css::uno::XInterface
*
72 com_sun_star_comp_svx_SafeModeUI_get_implementation(
73 css::uno::XComponentContext
* /*context*/,
74 css::uno::Sequence
<css::uno::Any
> const &)
76 return cppu::acquire(new SafeModeUI
);
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */