summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-06-30 16:28:47 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-06-30 21:54:25 +0200
commit27ad7de6a9a8a019a0138179685268fc52e010d0 (patch)
tree09e5e7f003b08173e7d778a39b9b4d2f4700c91a /sd/source
parent1d84ac1cd25022be13bd0c3f831f24b8edfee75d (diff)
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/+/136679 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/func/fuarea.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/func/fuarea.cxx b/sd/source/ui/func/fuarea.cxx
index 2e35cac7b687..8dd7543e3ba0 100644
--- a/sd/source/ui/func/fuarea.cxx
+++ b/sd/source/ui/func/fuarea.cxx
@@ -59,10 +59,10 @@ void FuArea::DoExecute( SfxRequest& rReq )
VclPtr<AbstractSvxAreaTabDialog> pDlg(
pFact->CreateSvxAreaTabDialog(mpViewShell->GetFrameWeld(), &aNewAttr, mpDoc, true, bHasSlideBackground));
- 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[] = {
@@ -76,11 +76,11 @@ void FuArea::DoExecute( SfxRequest& rReq )
SID_ATTR_FILL_USE_SLIDE_BACKGROUND,
0 };
- mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
+ pViewShell->GetViewFrame()->GetBindings().Invalidate( SidArray );
}
// deferred until the dialog ends
- mpViewShell->Cancel();
+ pViewShell->Cancel();
pDlg->disposeOnce();
});