Kaydet (Commit) 205aeffd authored tarafından Caolán McNamara's avatar Caolán McNamara

tdf#121607 defer other requests until password dialog is dismissed

Change-Id: I82b308f482cc5eb40a00afd01a6848afc3fb8ab1
Reviewed-on: https://gerrit.libreoffice.org/63793
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 278a3910
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment