summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2019-08-21 11:57:28 +0300
committerTor Lillqvist <tml@collabora.com>2019-08-22 12:38:50 +0200
commit05e03911cd1f8a355b6410d3997cffc2c794a1e9 (patch)
treecb0cc5484e40345a1994b2b4f358cdbb5d2d2711 /include/comphelper
parentb50d1a42064c8333926166ec047d3467c83d2fd0 (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/77948 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/asyncquithandler.hxx14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/comphelper/asyncquithandler.hxx b/include/comphelper/asyncquithandler.hxx
index 9c7a3c1a6289..a20ac99da64f 100644
--- a/include/comphelper/asyncquithandler.hxx
+++ b/include/comphelper/asyncquithandler.hxx
@@ -31,7 +31,12 @@
class AsyncQuitHandler
{
- AsyncQuitHandler() {}
+ AsyncQuitHandler()
+ : mbForceQuit(false)
+ {
+ }
+
+ bool mbForceQuit;
public:
AsyncQuitHandler(const AsyncQuitHandler&) = delete;
@@ -50,6 +55,13 @@ public:
xDesktop->terminate();
}
+ // Hack for the TerminationVetoer in extensions/source/ole/unoobjw.cxx. When it is an Automation
+ // client itself that explicitly requests a quit (see VbaApplicationBase::Quit()), we do quit.
+ // The flag can only be set to true, not back to false.
+ void SetForceQuit() { mbForceQuit = true; }
+
+ bool IsForceQuit() { return mbForceQuit; }
+
DECL_STATIC_LINK(AsyncQuitHandler, OnAsyncQuit, void*, void);
};