Kaydet (Commit) d1f01dd4 authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

SafeModeDialog: Handle quit button event

Change-Id: Id24e9cb526bc0143a663e8d39a5dda59f929f8bf
üst ad067cb0
......@@ -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())
{
......
......@@ -38,6 +38,8 @@ private:
VclPtr<CheckBox> mpCBCustomizations;
VclPtr<CheckBox> mpCBFull;
static void terminateOffice();
DECL_LINK(BtnHdl, Button*, void);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment