diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-08-24 18:32:38 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-08-25 11:31:42 +0200 |
commit | db6b703d391838c481fd090065f6d329edcd4efa (patch) | |
tree | c17b58ca1f9e0f0beaa3b1b5c89d0e85bdaedaf7 /framework | |
parent | tdf#100387 tdf#100389 OOXML animation export fixes (diff) | |
download | core-db6b703d391838c481fd090065f6d329edcd4efa.tar.gz core-db6b703d391838c481fd090065f6d329edcd4efa.zip |
Allow non-modal Dialogs during FileImport/Load
When opening a file that triggers Dialogs (e.g. cannot
read/repair/FileType) the Frame from which it was
initialized gets blocked. This irritates quite some
people. Changed this to a non-modal Dialog so that
the user can continue to work with all opened docs,
open new ones, close and print/PDF/export these.
Change-Id: I048d3de3369527cec20d26396b87439254764b8a
Reviewed-on: https://gerrit.libreoffice.org/41534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/dispatch/closedispatcher.cxx | 9 | ||||
-rw-r--r-- | framework/source/loadenv/loadenv.cxx | 4 |
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) |