[Libreoffice-commits] core.git: sd/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jan 16 09:00:41 UTC 2019
sd/source/ui/func/fuolbull.cxx | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
New commits:
commit 84acbfd2ef8a895d8689fccfffce03df02240b4e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Wed Jan 16 08:56:44 2019 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Jan 16 10:00:16 2019 +0100
fix crash in draw Format->Bullets and Numbering dialog
regression from
commit a2b78c131db2bbe3555a89dfae32aefcd00949f5
make Format->Bullets and Numbering dialog async
Change-Id: Ia726612a492e644f5e40e78a3b537c5ed539aef8
Reviewed-on: https://gerrit.libreoffice.org/66423
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
Tested-by: Jenkins
diff --git a/sd/source/ui/func/fuolbull.cxx b/sd/source/ui/func/fuolbull.cxx
index 14dc697e71be..e695eaad8c70 100644
--- a/sd/source/ui/func/fuolbull.cxx
+++ b/sd/source/ui/func/fuolbull.cxx
@@ -95,20 +95,23 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
std::shared_ptr<SfxRequest> xRequest(new SfxRequest(rReq));
rReq.Ignore(); // the 'old' request is not relevant any more
- pDlg->StartExecuteAsync([this, pDlg, xRequest](sal_Int32 nResult){
+ // do not capture this, because this will go way before the dialog finishes executing
+ auto pView = mpView;
+ auto pViewShell = mpViewShell;
+ pDlg->StartExecuteAsync([pView, pViewShell, pDlg, xRequest](sal_Int32 nResult){
if( nResult == RET_OK )
{
SfxItemSet aSet( *pDlg->GetOutputItemSet() );
- OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
+ OutlinerView* pOLV = pView->GetTextEditOutlinerView();
std::unique_ptr<OutlineViewModelChangeGuard, o3tl::default_delete<OutlineViewModelChangeGuard>> aGuard;
- if (OutlineView* pView = dynamic_cast<OutlineView*>(mpView))
+ if (OutlineView* pOutlineView = dynamic_cast<OutlineView*>(pView))
{
- pOLV = pView->GetViewByWindow(mpViewShell->GetActiveWindow());
- aGuard.reset(new OutlineViewModelChangeGuard(*pView));
+ pOLV = pOutlineView->GetViewByWindow(pViewShell->GetActiveWindow());
+ aGuard.reset(new OutlineViewModelChangeGuard(*pOutlineView));
}
if( pOLV )
@@ -118,7 +121,7 @@ void FuOutlineBullet::DoExecute( SfxRequest& rReq )
/* not direct to pOlView; therefore, SdDrawView::SetAttributes can catch
changes to master page and redirect to a template */
- mpView->SetAttributes(*xRequest->GetArgs());
+ pView->SetAttributes(*xRequest->GetArgs());
}
pDlg->disposeOnce();
});
More information about the Libreoffice-commits
mailing list