diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2018-01-22 09:34:47 +0300 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-02-04 22:10:40 +0100 |
commit | 3f4b0788ba688dbdf7d4487b7ef83edc7e81c1e8 (patch) | |
tree | d68b2de066245bb57d6cd9088d490d30881ad6be | |
parent | ea4c135fca3045a47c079bd3c346ff28d3af084a (diff) |
... based on ForceFocusAndToFront setting
Change-Id: Ic76faa082f433d5a0150e49c30d7eda3c6c24c5f
Reviewed-on: https://gerrit.libreoffice.org/48287
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/49214
Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | vcl/source/window/dialog.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 4db7c9674a83..13c8cf491b8e 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -24,6 +24,7 @@ #include <com/sun/star/frame/theGlobalEventBroadcaster.hpp> #include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> +#include <officecfg/Office/Common.hxx> #include <osl/file.hxx> #include <tools/debug.hxx> @@ -838,7 +839,11 @@ bool Dialog::ImplStartExecuteModal() // FIXME: no layouting, workaround some clipping issues ImplAdjustNWFSizes(); - Show(); + css::uno::Reference< css::uno::XComponentContext > xContext( + comphelper::getProcessComponentContext()); + bool bForceFocusAndToFront(officecfg::Office::Common::View::NewDocumentHandling::ForceFocusAndToFront::get(xContext)); + ShowFlags showFlags = bForceFocusAndToFront ? ShowFlags::ForegroundTask : ShowFlags::NONE; + Show(true, showFlags); pSVData->maAppData.mnModalMode++; return true; |