summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/app/apphdl.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 804e358418ef..8bd7c3b62a63 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -216,9 +216,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 ||
@@ -230,6 +248,9 @@ void SwModule::StateOther(SfxItemSet &rSet)
{
rSet.DisableItem(nWhich);
}
+
+ if (bUnLockDispatcher)
+ pDispatcher->Lock(false);
}
break;
default: