summaryrefslogtreecommitdiff
path: root/vbahelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-08-21 11:57:28 +0300
committerTor Lillqvist <tml@collabora.com>2019-09-20 15:34:10 +0200
commit505d8ecae6465ac8fc1332b8ecddcd7576547b9f (patch)
treef0f1bfa8188f592060f11ba970fa1f0dcaf44a41 /vbahelper
parent0e39803ea6a71676127ff75cd56bb29b232276ac (diff)
More hacks for quit requests from an OLE Automation client
Actually I am now not so sure whether the TerminationVetoer thing is needed or not. Will have to experiment later with the customer use case what happens if I remove all that. Maybe adding it was a mistake, as misinterpretation of what was going on. Change-Id: I252e1233cae1622099bc3310814132dae58b2aed (cherry picked from commit 9c50273a9f3a15d1ff7ea4880638ca833570e0bd) Reviewed-on: https://gerrit.libreoffice.org/79250 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vbahelper')
-rw-r--r--vbahelper/source/vbahelper/vbaapplicationbase.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
index 35d53044cf12..b05218f1d5e4 100644
--- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx
+++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx
@@ -471,9 +471,13 @@ void VbaApplicationBase::Quit()
{
// This is the case of a call from an (OLE) Automation client.
+ // When an Automation client itself asks the proces to quit, it should obey it.
+ AsyncQuitHandler::instance().SetForceQuit();
+
// TODO: Probably we should just close any document windows open by the "application"
// (Writer or Calc) the call being handled is for. And only then, if no document windows
// are left open, quit the actual LibreOffice application.
+
Application::PostUserEvent( LINK( &AsyncQuitHandler::instance(), AsyncQuitHandler, OnAsyncQuit ) );
}
}