summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx30
-rw-r--r--sd/source/ui/view/drviewsc.cxx3
2 files changed, 18 insertions, 15 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 0847df373f44..e327a9e0e949 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -2662,25 +2662,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())
- {
- pDlg->GetName(aName);
- pSelected->SetName(aName);
+ 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;
diff --git a/sd/source/ui/view/drviewsc.cxx b/sd/source/ui/view/drviewsc.cxx
index 6be86e63cb8d..46ecb31d639b 100644
--- a/sd/source/ui/view/drviewsc.cxx
+++ b/sd/source/ui/view/drviewsc.cxx
@@ -62,8 +62,7 @@ void DrawViewShell::UpdateIMapDlg( SdrObject* pObj )
IMPL_LINK( DrawViewShell, NameObjectHdl, AbstractSvxObjectNameDialog&, rDialog, bool )
{
- OUString aName;
- rDialog.GetName( aName );
+ OUString aName = rDialog.GetName();
return aName.isEmpty() || ( GetDoc() && !GetDoc()->GetObj( aName ) );
}