diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-06-30 16:28:47 +0100 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-07-01 11:11:17 +0200 |
commit | 744439e73038ea5bdbdd18b10e0e90c22bb9928c (patch) | |
tree | d0a2bd9aa69369638f0d373d89748c4cfed2e3a1 | |
parent | allow pretty names in --enable-macosx-code/package-signing (diff) | |
download | core-744439e73038ea5bdbdd18b10e0e90c22bb9928c.tar.gz core-744439e73038ea5bdbdd18b10e0e90c22bb9928c.zip |
tdf#149787 capture a copy of mpViewShell and mpView
so the callback can outlive the FuArea
Change-Id: I392ffa46b6f13795faef7284c1cae74428655b5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136694
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sd/source/ui/func/fuarea.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx index e75ab54a8f9a..345b2c70b6dc 100644 --- a/sd/source/ui/func/fuarea.cxx +++ b/sd/source/ui/func/fuarea.cxx @@ -57,10 +57,10 @@ void FuArea::DoExecute( SfxRequest& rReq ) SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); VclPtr<AbstractSvxAreaTabDialog> pDlg(pFact->CreateSvxAreaTabDialog(mpViewShell->GetFrameWeld(), &aNewAttr, mpDoc, true)); - pDlg->StartExecuteAsync([pDlg, this](sal_Int32 nResult){ + pDlg->StartExecuteAsync([pDlg, pView = this->mpView, pViewShell = this->mpViewShell](sal_Int32 nResult){ if (nResult == RET_OK) { - mpView->SetAttributes (*(pDlg->GetOutputItemSet ())); + pView->SetAttributes (*(pDlg->GetOutputItemSet ())); // attributes changed, update Listboxes in Objectbars static const sal_uInt16 SidArray[] = { @@ -73,11 +73,11 @@ void FuArea::DoExecute( SfxRequest& rReq ) SID_ATTR_FILL_FLOATTRANSPARENCE, 0 }; - mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); + pViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray ); } // deferred until the dialog ends - mpViewShell->Cancel(); + pViewShell->Cancel(); pDlg->disposeOnce(); }); |