diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-12 13:26:10 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-10-12 15:28:53 +0200 |
commit | 9e30dcd46d2ad31be6a9dcafaa6505e8301b8694 (patch) | |
tree | c8357372bdb69a9ebec9758be05a6b5fd2ec1728 /svx/source | |
parent | d1f01dd44813af7a10523b4d4a5171bcb12a8f5d (diff) |
SafeModeDialog: Handle restart button event
Change-Id: I6b55f79ea153aaeb8b67879bdafb6774fd91455c
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/dialog/SafeModeDialog.cxx | 12 | ||||
-rw-r--r-- | svx/source/dialog/SafeModeDialog.hxx | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/svx/source/dialog/SafeModeDialog.cxx b/svx/source/dialog/SafeModeDialog.cxx index 93581778c3e1..46e9d2f96f63 100644 --- a/svx/source/dialog/SafeModeDialog.cxx +++ b/svx/source/dialog/SafeModeDialog.cxx @@ -17,6 +17,8 @@ #include <com/sun/star/frame/Desktop.hpp> #include <com/sun/star/frame/XDesktop2.hpp> +#include <com/sun/star/task/OfficeRestartManager.hpp> +#include <com/sun/star/task/XInteractionHandler.hpp> using namespace css; @@ -66,6 +68,15 @@ void SafeModeDialog::terminateOffice() xDesktop->terminate(); } +void SafeModeDialog::applyChanges() +{ + // TODO: Apply apply changes + + // Then restart + css::task::OfficeRestartManager::get(comphelper::getProcessComponentContext())->requestRestart( + css::uno::Reference< css::task::XInteractionHandler >()); +} + IMPL_LINK(SafeModeDialog, BtnHdl, Button*, pBtn, void) { if (pBtn == mpBtnContinue.get()) @@ -79,6 +90,7 @@ IMPL_LINK(SafeModeDialog, BtnHdl, Button*, pBtn, void) else if (pBtn == mpBtnRestart.get()) { Close(); + applyChanges(); } } diff --git a/svx/source/dialog/SafeModeDialog.hxx b/svx/source/dialog/SafeModeDialog.hxx index d91b50dfe724..44e6b1869cac 100644 --- a/svx/source/dialog/SafeModeDialog.hxx +++ b/svx/source/dialog/SafeModeDialog.hxx @@ -39,6 +39,7 @@ private: VclPtr<CheckBox> mpCBFull; static void terminateOffice(); + static void applyChanges(); DECL_LINK(BtnHdl, Button*, void); }; |