[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Nov 22 14:49:57 UTC 2018
sw/source/uibase/app/apphdl.cxx | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
New commits:
commit 17983e15c468d2153a58a20ad6ad51553d087472
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Nov 22 11:34:00 2018 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu Nov 22 15:49:31 2018 +0100
tdf#121607 defer other requests until password dialog is dismissed
Change-Id: I82b308f482cc5eb40a00afd01a6848afc3fb8ab1
Reviewed-on: https://gerrit.libreoffice.org/63795
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 46b350c02c59..a0aead88a3ea 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -185,9 +185,27 @@ void SwModule::StateOther(SfxItemSet &rSet)
{
SwView* pView = ::GetActiveView();
std::shared_ptr<SwMailMergeConfigItem> xConfigItem;
+ bool bUnLockDispatcher = false;
+ SfxDispatcher* pDispatcher = nullptr;
if (pView)
+ {
xConfigItem = pView->EnsureMailMergeConfigItem();
+ // tdf#121607 lock the dispatcher while processing
+ // this request, and release it afterwards,
+ // that means that if this request pops up a dialog
+ // any other pending requests will be deferred
+ // until this request is finished, i.e. they won't
+ // be dispatched by the dispatcher timeout until
+ // unlock is called, serializing the password dialogs
+ pDispatcher = pView->GetViewFrame()->GetDispatcher();
+ if (!pDispatcher->IsLocked())
+ {
+ pDispatcher->Lock(true);
+ bUnLockDispatcher = true;
+ }
+ }
+
// #i51949# hide e-Mail option if e-Mail is not supported
// #i63267# printing might be disabled
if (!xConfigItem ||
@@ -199,6 +217,9 @@ void SwModule::StateOther(SfxItemSet &rSet)
{
rSet.DisableItem(nWhich);
}
+
+ if (bUnLockDispatcher)
+ pDispatcher->Lock(false);
}
break;
default:
More information about the Libreoffice-commits
mailing list