summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/macrodlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/macrodlg.cxx')
-rw-r--r--basctl/source/basicide/macrodlg.cxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index 252328fb07eb..279aa235ed5e 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -50,7 +50,7 @@ using std::map;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
-MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame >& xDocFrame)
+MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame >& xDocFrame, bool bCreateEntries)
: SfxDialogController(pParnt, "modules/BasicIDE/ui/basicmacrodialog.ui", "BasicMacroDialog")
, m_xDocumentFrame(xDocFrame)
// the Sfx doesn't ask the BasicManager whether modified or not
@@ -107,7 +107,8 @@ MacroChooser::MacroChooser(weld::Window* pParnt, const Reference< frame::XFrame
if (SfxDispatcher* pDispatcher = GetDispatcher())
pDispatcher->Execute( SID_BASICIDE_STOREALLMODULESOURCES );
- m_xBasicBox->ScanAllEntries();
+ if (bCreateEntries)
+ m_xBasicBox->ScanAllEntries();
}
MacroChooser::~MacroChooser()
@@ -742,24 +743,23 @@ 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
- pDlg->StartExecuteAsync([this](sal_Int32 nRet){
- if ( nRet ) // not only closed
- {
- m_xDialog->response(Macro_Edit);
- return;
- }
+ auto xDlg(std::make_shared<OrganizeDialog>(m_xDialog.get(), 0, aDesc));
+ weld::DialogController::runAsync(xDlg, [this](sal_Int32 nRet) {
+ if (nRet == RET_OK) // 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();
+ });
}
}
-
void MacroChooser::UpdateFields()
{
auto nMacroEntry = m_xMacroBox->get_selected_index();