sd/source/ui/dlg/sddlgfact.hxx | 7 ++++++- sd/source/ui/view/drviews3.cxx | 17 +++++++---------- 2 files changed, 13 insertions(+), 11 deletions(-)
New commits: commit 9da3e7e5a0202538db0d35f74bd77be311ac54a9 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Thu Jan 10 15:07:01 2019 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jan 18 14:26:44 2019 +0100 make Insert->Header and Footer dialog async Reviewed-on: https://gerrit.libreoffice.org/66099 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> (cherry picked from commit d095a887a9b0cce81b4f828feed759b5d0b3ad3f) Change-Id: Icb2c507970c35a8ddee47912915882dede87ebca Reviewed-on: https://gerrit.libreoffice.org/66159 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Reviewed-by: Mert Tümer <mert.tu...@collabora.com> Tested-by: Mert Tümer <mert.tu...@collabora.com> diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx index 17e8a10ae976..0627bb34c1b6 100644 --- a/sd/source/ui/dlg/sddlgfact.hxx +++ b/sd/source/ui/dlg/sddlgfact.hxx @@ -34,7 +34,8 @@ public: \ virtual Bitmap createScreenshot() const override; \ virtual OString GetScreenshotId() const override; \ virtual ~Class() override; \ - virtual short Execute() override ; + virtual short Execute() override; \ + virtual bool StartExecuteAsync(AsyncContext &ctx) override; #define IMPL_ABSTDLG_BASE(Class) \ std::vector<OString> Class::getAllPageUIXMLDescriptions() const { return pDlg->getAllPageUIXMLDescriptions(); } \ @@ -47,6 +48,10 @@ Class::~Class() \ short Class::Execute() \ { \ return pDlg->Execute(); \ +} \ +bool Class::StartExecuteAsync(AsyncContext &ctx) \ +{ \ + return pDlg->StartExecuteAsync(ctx); \ } namespace sd { diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx index f8f398dd91ca..8f4d99283373 100644 --- a/sd/source/ui/view/drviews3.cxx +++ b/sd/source/ui/view/drviews3.cxx @@ -289,19 +289,16 @@ void DrawViewShell::ExecCtrl(SfxRequest& rReq) case SID_INSERT_DATE_TIME: { SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractHeaderFooterDialog> pDlg(pFact ? pFact->CreateHeaderFooterDialog( this, GetActiveWindow(), GetDoc(), mpActualPage ) : nullptr); - if( pDlg ) - { - pDlg->Execute(); - pDlg.disposeAndClear(); - + VclPtr<AbstractHeaderFooterDialog> pDlg(pFact ? pFact->CreateHeaderFooterDialog( this, GetActiveWindow(), GetDoc(), mpActualPage ) : nullptr); + std::shared_ptr<SfxRequest> xRequest(new SfxRequest(rReq)); + rReq.Ignore(); // the 'old' request is not relevant any more + pDlg->StartExecuteAsync([this, xRequest](sal_Int32 /*nResult*/){ GetActiveWindow()->Invalidate(); UpdatePreview( mpActualPage ); - } - - Invalidate(); - rReq.Done (); + Invalidate(); + xRequest->Done(); + }); break; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits