diff options
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 3237f808a601..8dbb3142e4c3 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -2665,24 +2665,29 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) OUString aName(pSelected->GetName()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetFrameWeld(), aName)); + VclPtr<AbstractSvxObjectNameDialog> pDlg(pFact->CreateSvxObjectNameDialog(GetFrameWeld(), aName)); pDlg->SetCheckNameHdl(LINK(this, DrawViewShell, NameObjectHdl)); - if(RET_OK == pDlg->Execute()) - { - pSelected->SetName(pDlg->GetName()); + pDlg->StartExecuteAsync( + [this, pDlg, pSelected] (sal_Int32 nResult)->void + { + if (nResult == RET_OK) + { + pSelected->SetName(pDlg->GetName()); - SdPage* pPage = GetActualPage(); - if (pPage) - pPage->notifyObjectRenamed(pSelected); - } + SdPage* pPage = GetActualPage(); + if (pPage) + pPage->notifyObjectRenamed(pSelected); + } + pDlg->disposeOnce(); + SfxBindings& rBindings = GetViewFrame()->GetBindings(); + rBindings.Invalidate( SID_NAVIGATOR_STATE, true ); + rBindings.Invalidate( SID_CONTEXT ); + } + ); } - SfxBindings& rBindings = GetViewFrame()->GetBindings(); - rBindings.Invalidate( SID_NAVIGATOR_STATE, true ); - rBindings.Invalidate( SID_CONTEXT ); - Cancel(); rReq.Ignore(); break; |