diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-22 14:58:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-01-23 14:53:46 +0100 |
commit | ea88508c9f23e1594a77c287d5a6c86e6b92d870 (patch) | |
tree | 9dacbea78ab45542ab090d82290425d70a5af1ba /sc | |
parent | f690e8218a74a0f7792407a1d46198883d2528ff (diff) |
make signature line dialog async
Change-Id: I64cb2ae5b3748e8034fb0624b56c3d3dfdc31654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162420
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/tabvwshb.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 1db954039a36..098ea68d33d5 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -402,9 +402,19 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) const uno::Reference<frame::XModel> xModel( GetViewData().GetDocShell()->GetBaseModel() ); VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog( + VclPtr<AbstractSignatureLineDialog> pDialog(pFact->CreateSignatureLineDialog( pWin->GetFrameWeld(), xModel, rReq.GetSlot() == SID_EDIT_SIGNATURELINE)); - pDialog->Execute(); + auto xRequest = std::make_shared<SfxRequest>(rReq); + rReq.Ignore(); // the 'old' request is not relevant any more + pDialog->StartExecuteAsync( + [pDialog, xRequest] (sal_Int32 nResult)->void + { + if (nResult == RET_OK) + pDialog->Apply(); + pDialog->disposeOnce(); + xRequest->Done(); + } + ); break; } @@ -417,8 +427,10 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq) VclPtr<AbstractSignSignatureLineDialog> pDialog( pFact->CreateSignSignatureLineDialog(GetFrameWeld(), xModel)); pDialog->StartExecuteAsync( - [pDialog] (sal_Int32 /*nResult*/)->void + [pDialog] (sal_Int32 nResult)->void { + if (nResult == RET_OK) + pDialog->Apply(); pDialog->disposeOnce(); } ); |