summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2018-03-11 18:44:58 -0400
committerJan Holesovsky <kendy@collabora.com>2018-03-14 17:32:59 +0100
commit952a3a62090a8bd2a28798d2f1b4e26d37ac7399 (patch)
tree164d6488046cfb34507f72bd9be07174dfad7125 /sc
parent02e8420af6bd75bf172296ea7f6f94db7b63e0c5 (diff)
lokdialog: convert the show sheet dialog to async exec
To trigger this dialog: Sheet -> Show Sheet... Change-Id: I501d9444ef9798a26b4db06ab51e4fb691144b17 Reviewed-on: https://gerrit.libreoffice.org/51094 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/51095 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/tabvwshf.cxx28
1 files changed, 17 insertions, 11 deletions
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 35d89eb15acb..ff3c764c89f4 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -131,7 +131,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- ScopedVclPtr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent()));
+ VclPtr<AbstractScShowTabDlg> pDlg(pFact->CreateScShowTabDlg(GetDialogParent()));
OSL_ENSURE(pDlg, "Dialog create fail!");
OUString aTabName;
@@ -146,18 +146,24 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
}
}
- if ( pDlg->Execute() == RET_OK )
- {
- const sal_Int32 nCount = pDlg->GetSelectEntryCount();
- for (sal_Int32 nPos=0; nPos<nCount; ++nPos)
+ std::shared_ptr<SfxRequest> pReq = std::make_shared<SfxRequest>(rReq);
+ pDlg->StartExecuteAsync([this, pDlg, pReq](sal_Int32 nResult){
+ OUString sTable;
+ std::vector<OUString> sTables;
+ if (RET_OK == nResult)
{
- aName = pDlg->GetSelectEntry(nPos);
- rReq.AppendItem( SfxStringItem( FID_TABLE_SHOW, aName ) );
- rNames.push_back(aName);
+ const sal_Int32 nCount = pDlg->GetSelectEntryCount();
+ for (sal_Int32 nPos=0; nPos<nCount; ++nPos)
+ {
+ sTable = pDlg->GetSelectEntry(nPos);
+ pReq->AppendItem( SfxStringItem( FID_TABLE_SHOW, sTable ) );
+ sTables.push_back(sTable);
+ }
+ ShowTable( sTables );
+ pReq->Done();
}
- ShowTable( rNames );
- rReq.Done();
- }
+ });
+ rReq.Ignore();
}
}
break;