diff options
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/SafeModeDialog.cxx | 14 | ||||
-rw-r--r-- | svx/source/dialog/SafeModeDialog.hxx | 2 |
2 files changed, 15 insertions, 1 deletions
diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 549a62f39f7a..93581778c3e1 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -12,8 +12,14 @@ #include <config_folders.h> #include <rtl/bootstrap.hxx> #include <osl/file.hxx> +#include <comphelper/processfactory.hxx> #include <sfx2/safemode.hxx> +#include <com/sun/star/frame/Desktop.hpp> +#include <com/sun/star/frame/XDesktop2.hpp> + +using namespace css; + SafeModeDialog::SafeModeDialog(vcl::Window* pParent): Dialog(pParent, "SafeModeDialog", "svx/ui/safemodedialog.ui") { @@ -54,6 +60,12 @@ bool SafeModeDialog::Close() return Dialog::Close(); } +void SafeModeDialog::terminateOffice() +{ + uno::Reference<frame::XDesktop2> xDesktop = frame::Desktop::create( comphelper::getProcessComponentContext() ); + xDesktop->terminate(); +} + IMPL_LINK(SafeModeDialog, BtnHdl, Button*, pBtn, void) { if (pBtn == mpBtnContinue.get()) @@ -62,7 +74,7 @@ IMPL_LINK(SafeModeDialog, BtnHdl, Button*, pBtn, void) } else if (pBtn == mpBtnQuit.get()) { - Close(); + terminateOffice(); } else if (pBtn == mpBtnRestart.get()) { diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index 41acc1fde70b..d91b50dfe724 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -38,6 +38,8 @@ private: VclPtr<CheckBox> mpCBCustomizations; VclPtr<CheckBox> mpCBFull; + static void terminateOffice(); + DECL_LINK(BtnHdl, Button*, void); }; |