LibreOffice Module svx (master) 1
crashreportui.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 "crashreportdlg.hxx"
19
20namespace {
21
22class CrashReportUI : public ::cppu::WeakImplHelper< css::lang::XServiceInfo ,
23 css::frame::XSynchronousDispatch > // => XDispatch!
24{
25public:
26 explicit CrashReportUI();
27
28 // css.lang.XServiceInfo
29
30 virtual OUString SAL_CALL getImplementationName() override;
31
32 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
33
34 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
35
36
37 virtual css::uno::Any SAL_CALL dispatchWithReturnValue(const css::util::URL& aURL,
38 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) override;
39};
40
41CrashReportUI::CrashReportUI()
42{
43
44}
45
46OUString SAL_CALL CrashReportUI::getImplementationName()
47{
48 return "com.sun.star.comp.svx.CrashReportUI";
49}
50
51sal_Bool SAL_CALL CrashReportUI::supportsService(const OUString& sServiceName)
52{
53 return cppu::supportsService(this, sServiceName);
54}
55
56css::uno::Sequence< OUString > SAL_CALL CrashReportUI::getSupportedServiceNames()
57{
58 return { "com.sun.star.dialog.CrashReportUI" };
59}
60
61css::uno::Any SAL_CALL CrashReportUI::dispatchWithReturnValue(const css::util::URL&,
62 const css::uno::Sequence< css::beans::PropertyValue >& )
63{
64 SolarMutexGuard aGuard;
65 css::uno::Any aRet;
66 CrashReportDialog aDialog(nullptr);
67 aDialog.run();
68 return aRet;
69}
70
71}
72
73extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
75 css::uno::XComponentContext * /*context*/,
76 css::uno::Sequence<css::uno::Any> const &)
77{
78 return cppu::acquire(new CrashReportUI());
79}
80
81/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * com_sun_star_comp_svx_CrashReportUI_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
css::uno::Sequence< OUString > getSupportedServiceNames()
OUString getImplementationName()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
unsigned char sal_Bool