summaryrefslogtreecommitdiff
path: root/vcl/source/window/syswin.cxx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-06-05 00:22:16 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-06-05 12:16:24 -0400
commit80fb93fe6c08f25a404ff2afa989fca246ac9efd (patch)
treeaad95dd4c2b914065fa9050ca98a1098ccce2344 /vcl/source/window/syswin.cxx
parent1227601d74ecddb06dcbe69e260aa32835900ed3 (diff)
Intercept the window close event and end the preview when clicking 'x'.
This is to prevent the preview window from closing the whole document when pressing the window frame's 'x' button. Instead, pressing the 'x' will end the preview mode and bring it back to the normal Calc window. Change-Id: If4d42928784e3e05bc6357d811a1954efb221f01
Diffstat (limited to 'vcl/source/window/syswin.cxx')
-rw-r--r--vcl/source/window/syswin.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index d4399432ef55..a7a8ce0dff75 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -57,6 +57,7 @@ public:
TaskPaneList* mpTaskPaneList;
Size maMaxOutSize;
rtl::OUString maRepresentedURL;
+ Link maCloseHdl;
};
SystemWindow::ImplData::ImplData()
@@ -1034,4 +1035,14 @@ void SystemWindow::SetApplicationID(const rtl::OUString &rApplicationID)
mpWindowImpl->mpFrame->SetApplicationID( rApplicationID );
}
+void SystemWindow::SetCloseHdl(const Link& rLink)
+{
+ mpImplData->maCloseHdl = rLink;
+}
+
+const Link& SystemWindow::GetCloseHdl() const
+{
+ return mpImplData->maCloseHdl;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */