[Libreoffice-commits] core.git: vcl/source
Mike Kaganski
mike.kaganski at collabora.com
Mon Jan 29 14:18:48 UTC 2018
vcl/source/window/dialog.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 3b57cb72ec8b47f033be5a516617ed8c752517b0
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date: Mon Jan 22 09:34:47 2018 +0300
tdf#32935 tdf#49134 tdf#114466 Activate newly opened modal dialogs
... based on ForceFocusAndToFront setting
Change-Id: Ic76faa082f433d5a0150e49c30d7eda3c6c24c5f
Reviewed-on: https://gerrit.libreoffice.org/48287
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 272da360b503..0219f2a806d2 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>
@@ -870,12 +871,14 @@ 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++;
- css::uno::Reference< css::uno::XComponentContext > xContext(
- comphelper::getProcessComponentContext() );
css::uno::Reference<css::frame::XGlobalEventBroadcaster> xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW);
css::document::DocumentEvent aObject;
aObject.EventName = "DialogExecute";
More information about the Libreoffice-commits
mailing list