Kaydet (Commit) 99cecd1f authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Noel Grandin

use StartExecuteAsync in basctl

Change-Id: Id24d03631ff60305525835144ad543d5dcb2064f
Reviewed-on: https://gerrit.libreoffice.org/65709
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 6aaed7c5
......@@ -739,9 +739,12 @@ void Shell::ExecuteGlobal( SfxRequest& rReq )
case SID_BASICIDE_MANAGE_LANG:
{
ScopedVclPtrInstance< ManageLanguageDialog > aDlg(pCurWin, m_pCurLocalizationMgr);
aDlg->Execute();
rReq.Done();
std::shared_ptr<SfxRequest> pRequest(new SfxRequest(rReq));
rReq.Ignore(); // the 'old' request is not relevant any more
auto pDlg = VclPtr<ManageLanguageDialog>::Create(pCurWin, m_pCurLocalizationMgr);
pDlg->StartExecuteAsync([=](sal_Int32 /*nResult*/){
pRequest->Done();
});
}
break;
......
......@@ -72,7 +72,7 @@ void Organize( sal_Int16 tabId )
aDesc = pCurWin->CreateEntryDescriptor();
vcl::Window* pParent = Application::GetDefDialogParent();
ScopedVclPtrInstance<OrganizeDialog>(pParent, tabId, aDesc)->Execute();
VclPtr<OrganizeDialog>::Create(pParent, tabId, aDesc)->StartExecuteAsync(nullptr);
}
bool IsValidSbxName( const OUString& rName )
......
......@@ -742,20 +742,19 @@ IMPL_LINK(MacroChooser, ButtonHdl, weld::Button&, rButton, void)
m_xBasicBox->get_selected(m_xBasicBoxIter.get());
EntryDescriptor aDesc = m_xBasicBox->GetEntryDescriptor(m_xBasicBoxIter.get());
VclPtrInstance< OrganizeDialog > pDlg( nullptr, 0, aDesc ); //TODO
sal_uInt16 nRet = pDlg->Execute();
pDlg.reset();
if ( nRet ) // not only closed
{
m_xDialog->response(Macro_Edit);
return;
}
pDlg->StartExecuteAsync([=](sal_Int32 nRet){
if ( nRet ) // not only closed
{
m_xDialog->response(Macro_Edit);
return;
}
Shell* pShell = GetShell();
if ( pShell && pShell->IsAppBasicModified() )
bForceStoreBasic = true;
Shell* pShell = GetShell();
if ( pShell && pShell->IsAppBasicModified() )
bForceStoreBasic = true;
m_xBasicBox->UpdateEntries();
m_xBasicBox->UpdateEntries();
});
}
}
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment