summaryrefslogtreecommitdiffstats
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/source/dispatch/closedispatcher.cxx9
-rw-r--r--framework/source/loadenv/loadenv.cxx4
2 files changed, 13 insertions, 0 deletions
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 8ee7791ecd60..2d89836b3453 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -38,6 +38,7 @@
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
#include <vcl/syswin.hxx>
+#include <vcl/dialog.hxx>
#include <unotools/moduleoptions.hxx>
#include <comphelper/processfactory.hxx>
@@ -366,6 +367,14 @@ IMPL_LINK_NOARG(CloseDispatcher, impl_asyncCallback, LinkParamNone*, void)
}
}
+ // if we still have dialogs open, temporary suppress termination
+ if (bTerminateApp && Dialog::AreDialogsOpen())
+ {
+ Application::SetShutdownDelayed();
+ bCloseFrame = true;
+ bTerminateApp = false;
+ }
+
// Do it now ...
bool bSuccess = false;
if (bCloseFrame)
diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx
index 0bff7d4127ef..ea57962e9b26 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -371,6 +371,10 @@ void LoadEnv::startLoading()
if (!bStarted)
bStarted = impl_loadContent();
+ // This may have triggered Dialogs (error cases) that may have
+ // delayed the shutdown, so give delayed shutdown a chance
+ Application::TriggerShutdownDelayed();
+
// not started => general error
// We can't say - what was the reason for.
if (!bStarted)