diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-12 15:27:14 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-12 15:28:53 +0200 |
commit | a8030ce8be1c6d7dca9159374fc875c7165b6e41 (patch) | |
tree | 93a2d0ad43700b9b48bd4cf5ee82915a4858ab9a /svx | |
parent | a9b56780cec06ca9545b2ba554e405fe061fed57 (diff) |
CrashReportDialog: Enter safemode only after sending crash report
Change-Id: I2c78431f839050ca74b082f7c790d0c59fba6513
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/crashreportdlg.cxx | 22 | ||||
-rw-r--r-- | svx/source/dialog/crashreportdlg.hxx | 2 |
2 files changed, 15 insertions, 9 deletions
diff --git a/svx/source/dialog/crashreportdlg.cxx b/svx/source/dialog/crashreportdlg.cxx index 1692a444fa53..ed56b67678af 100644 --- a/svx/source/dialog/crashreportdlg.cxx +++ b/svx/source/dialog/crashreportdlg.cxx @@ -60,6 +60,19 @@ void CrashReportDialog::dispose() Dialog::dispose(); } +bool CrashReportDialog::Close() +{ + // Check whether to go to safe mode + if (mpCBSafeMode->IsChecked()) + { + sfx2::SafeMode::putFlag(); + css::task::OfficeRestartManager::get(comphelper::getProcessComponentContext())->requestRestart( + css::uno::Reference< css::task::XInteractionHandler >()); + } + + return Dialog::Close(); +} + IMPL_LINK(CrashReportDialog, BtnHdl, Button*, pBtn, void) { if (pBtn == mpBtnSend.get()) @@ -101,15 +114,6 @@ IMPL_LINK(CrashReportDialog, BtnHdl, Button*, pBtn, void) { Close(); } - - // Check whether to go to safe mode - if (mpCBSafeMode->IsChecked()) - { - sfx2::SafeMode::putFlag(); - css::uno::Reference< css::uno::XComponentContext > xContext = comphelper::getProcessComponentContext(); - css::task::OfficeRestartManager::get(xContext)->requestRestart( - css::uno::Reference< css::task::XInteractionHandler >()); - } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/dialog/crashreportdlg.hxx b/svx/source/dialog/crashreportdlg.hxx index ecdd44553eb7..b0014364bd06 100644 --- a/svx/source/dialog/crashreportdlg.hxx +++ b/svx/source/dialog/crashreportdlg.hxx @@ -26,6 +26,8 @@ public: virtual void dispose() override; + virtual bool Close() override; + private: VclPtr<Button> mpBtnSend; |