Version 7.1.7.1, tag libreoffice-7.1.7.1
[LibreOffice.git] / svx / source / dialog / crashreportui.cxx
blob5384e3c18c9ad9e85ee5dcd9d66eecfdfc3c3e13
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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/.
8 */
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 "crashreportdlg.hxx"
20 namespace {
22 class CrashReportUI : public ::cppu::WeakImplHelper< css::lang::XServiceInfo ,
23 css::frame::XSynchronousDispatch > // => XDispatch!
25 public:
26 explicit CrashReportUI();
28 // css.lang.XServiceInfo
30 virtual OUString SAL_CALL getImplementationName() override;
32 virtual sal_Bool SAL_CALL supportsService(const OUString& sServiceName) override;
34 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
37 virtual css::uno::Any SAL_CALL dispatchWithReturnValue(const css::util::URL& aURL,
38 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ) override;
41 CrashReportUI::CrashReportUI()
46 OUString SAL_CALL CrashReportUI::getImplementationName()
48 return "com.sun.star.comp.svx.CrashReportUI";
51 sal_Bool SAL_CALL CrashReportUI::supportsService(const OUString& sServiceName)
53 return cppu::supportsService(this, sServiceName);
56 css::uno::Sequence< OUString > SAL_CALL CrashReportUI::getSupportedServiceNames()
58 return { "com.sun.star.dialog.CrashReportUI" };
61 css::uno::Any SAL_CALL CrashReportUI::dispatchWithReturnValue(const css::util::URL&,
62 const css::uno::Sequence< css::beans::PropertyValue >& )
64 SolarMutexGuard aGuard;
65 css::uno::Any aRet;
66 CrashReportDialog aDialog(nullptr);
67 aDialog.run();
68 return aRet;
73 extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface *
74 com_sun_star_comp_svx_CrashReportUI_get_implementation(
75 css::uno::XComponentContext * /*context*/,
76 css::uno::Sequence<css::uno::Any> const &)
78 return cppu::acquire(new CrashReportUI());
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */