summaryrefslogtreecommitdiff
path: root/sc/source/ui/docshell/docsh4.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/docshell/docsh4.cxx')
-rw-r--r--sc/source/ui/docshell/docsh4.cxx23
1 files changed, 16 insertions, 7 deletions
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e6fa6417dacb..9396b59518fe 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -973,14 +973,23 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
- ScopedVclPtr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(GetActiveDialogParent(), aName, true, bSheetProtected));
+ VclPtr<AbstractScNewScenarioDlg> pNewDlg(pFact->CreateScNewScenarioDlg(GetActiveDialogParent(), aName, true, bSheetProtected));
pNewDlg->SetScenarioData( aName, aComment, aColor, nFlags );
- if ( pNewDlg->Execute() == RET_OK )
- {
- pNewDlg->GetScenarioData( aName, aComment, aColor, nFlags );
- ModifyScenario( nTab, aName, aComment, aColor, nFlags );
- rReq.Done();
- }
+ pNewDlg->StartExecuteAsync(
+ [this, pNewDlg, nTab] (sal_Int32 nResult)->void
+ {
+ if (nResult == RET_OK)
+ {
+ OUString aName2, aComment2;
+ Color aColor2;
+ ScScenarioFlags nFlags2;
+ pNewDlg->GetScenarioData( aName2, aComment2, aColor2, nFlags2 );
+ ModifyScenario( nTab, aName2, aComment2, aColor2, nFlags2 );
+ }
+ pNewDlg->disposeOnce();
+ }
+ );
+ rReq.Done();
}
}
}