summaryrefslogtreecommitdiffstats
path: root/basctl/source/dlged
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2018-12-29 13:26:25 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-30 08:47:26 +0100
commit99cecd1f12a1d17822b9b29ceb112c0c48945386 (patch)
treee641396959ed4c91789bf1d7baee8ad17bc88a9d /basctl/source/dlged
parentupload libqxp 0.0.2 (diff)
downloadcore-99cecd1f12a1d17822b9b29ceb112c0c48945386.tar.gz
core-99cecd1f12a1d17822b9b29ceb112c0c48945386.zip
use StartExecuteAsync in basctl
Change-Id: Id24d03631ff60305525835144ad543d5dcb2064f Reviewed-on: https://gerrit.libreoffice.org/65709 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r--basctl/source/dlged/managelang.cxx28
1 files changed, 15 insertions, 13 deletions
diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx
index 2339b5573e2c..94481c672664 100644
--- a/basctl/source/dlged/managelang.cxx
+++ b/basctl/source/dlged/managelang.cxx
@@ -145,19 +145,21 @@ void ManageLanguageDialog::ClearLanguageBox()
IMPL_LINK_NOARG(ManageLanguageDialog, AddHdl, Button*, void)
{
- ScopedVclPtrInstance< SetDefaultLanguageDialog > aDlg( this, m_xLocalizationMgr );
- if ( aDlg->Execute() == RET_OK )
- {
- // add new locales
- Sequence< Locale > aLocaleSeq = aDlg->GetLocales();
- m_xLocalizationMgr->handleAddLocales( aLocaleSeq );
- // update listbox
- ClearLanguageBox();
- FillLanguageBox();
-
- if (SfxBindings* pBindings = GetBindingsPtr())
- pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
- }
+ VclPtr< SetDefaultLanguageDialog > pDlg = VclPtr<SetDefaultLanguageDialog>::Create(this, m_xLocalizationMgr);
+ pDlg->StartExecuteAsync([pDlg,this](sal_Int32 nResult)
+ {
+ if (!nResult )
+ return;
+ // add new locales
+ Sequence< Locale > aLocaleSeq = pDlg->GetLocales();
+ m_xLocalizationMgr->handleAddLocales( aLocaleSeq );
+ // update listbox
+ ClearLanguageBox();
+ FillLanguageBox();
+
+ if (SfxBindings* pBindings = GetBindingsPtr())
+ pBindings->Invalidate( SID_BASICIDE_CURRENT_LANG );
+ });
}
IMPL_LINK_NOARG(ManageLanguageDialog, DeleteHdl, Button*, void)