summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-01-25 10:29:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-01-30 17:08:11 +0100
commit93c4bfc96acf7f387120ff05883068d358a608c1 (patch)
tree33e55e442ee32464bce35c20f8e433b085939f4a /cui
parentcd3286cdc79765229d3e58ed35b3866baca9da18 (diff)
make writer databases dialog async
Change-Id: I9f3c3bc3c555ef8a115258ff6d186ceeead3cc99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162556 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/factory/dlgfact.cxx20
1 files changed, 12 insertions, 8 deletions
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index 2392fa46edc6..e0ad91cd52b1 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -821,18 +821,23 @@ void AbstractPasswordToOpenModifyDialog_Impl::AllowEmpty()
// Create dialogs with simplest interface
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Window* pParent, sal_uInt32 nResId)
{
- std::unique_ptr<OfaTreeOptionsDialog> xDlg;
switch ( nResId )
{
- case SID_OPTIONS_TREEDIALOG :
case SID_OPTIONS_DATABASES :
+ {
+ Reference< frame::XFrame > xFrame;
+ auto xDlg = std::make_shared<OfaTreeOptionsDialog>(pParent, xFrame, /*bActivateLastSelection*/false);
+ xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
+ return VclPtr<CuiAbstractControllerAsync_Impl>::Create(std::move(xDlg));
+ }
+ case SID_OPTIONS_TREEDIALOG :
case SID_LANGUAGE_OPTIONS :
{
bool bActivateLastSelection = false;
if (nResId == SID_OPTIONS_TREEDIALOG)
bActivateLastSelection = true;
Reference< frame::XFrame > xFrame;
- xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection);
+ auto xDlg = std::make_unique<OfaTreeOptionsDialog>(pParent, xFrame, bActivateLastSelection);
if (nResId == SID_OPTIONS_DATABASES)
{
xDlg->ActivatePage(SID_SB_DBREGISTEROPTIONS);
@@ -842,15 +847,14 @@ VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateVclDialog(weld::Wind
//open the tab page "tools/options/languages"
xDlg->ActivatePage(OFA_TP_LANGUAGES_FOR_SET_DOCUMENT_LANGUAGE);
}
+ return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
}
break;
+
default:
- break;
+ assert(false);
+ return nullptr;
}
-
- if (xDlg)
- return VclPtr<CuiAbstractController_Impl>::Create(std::move(xDlg));
- return nullptr;
}
VclPtr<VclAbstractDialog> AbstractDialogFactory_Impl::CreateFrameDialog(weld::Window* pParent, const Reference< frame::XFrame >& rxFrame,