From 05e03911cd1f8a355b6410d3997cffc2c794a1e9 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Wed, 21 Aug 2019 11:57:28 +0300 Subject: 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/77948 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- vbahelper/source/vbahelper/vbaapplicationbase.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vbahelper') diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 82bcf256ace5..87c82e472d7c 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -472,9 +472,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 ) ); } } -- cgit