diff options
author | Rashesh <rashesh.padia@collabora.com> | 2024-08-30 11:41:42 +0530 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-09 15:16:22 +0200 |
commit | 7e93e2721f200940547a23814eccc2348e1d6adf (patch) | |
tree | 5fed0506443051e6fa41c9f99e92f34169b2b519 /sc/source/ui/view | |
parent | 9672841f6d4afb11debe268ee45a686643c54a4e (diff) |
sc: make SelectRange dialog async
Change-Id: Id1ac622d7a2f15d432fa122b87217c0bfa9a39a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172626
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Gökay ŞATIR <gokaysatir@collabora.com>
(cherry picked from commit 832eee15118babf772f19a820ef88603fb6e5ccd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173066
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r-- | sc/source/ui/view/cellsh2.cxx | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index a1580b8958cc..0323ca8c219f 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -766,14 +766,23 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); - ScopedVclPtr<AbstractScSelEntryDlg> pDlg(pFact->CreateScSelEntryDlg(pTabViewShell->GetFrameWeld(), aList)); - if ( pDlg->Execute() == RET_OK ) - { - OUString aName = pDlg->GetSelectedEntry(); - pTabViewShell->GotoDBArea( aName ); - rReq.AppendItem( SfxStringItem( SID_SELECT_DB, aName ) ); - rReq.Done(); - } + VclPtr<AbstractScSelEntryDlg> pDlg( + pFact->CreateScSelEntryDlg(pTabViewShell->GetFrameWeld(), aList)); + pDlg->StartExecuteAsync( + [pTabViewShell, pDlg](sal_Int32 nResult) + { + if (nResult == RET_OK) + { + OUString aName = pDlg->GetSelectedEntry(); + pTabViewShell->GotoDBArea(aName); + SfxRequest aRequest(pTabViewShell->GetViewFrame(), + SID_SELECT_DB); + aRequest.AppendItem(SfxStringItem(SID_SELECT_DB, aName)); + aRequest.Done(); + } + + pDlg->disposeOnce(); + }); } } } |