From 3dacf98b70088e6435fb46c3e225bea35a451028 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 24 Nov 2018 15:09:10 +0000 Subject: weld SfxMacroAssignDlg MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I80045f1d1ca189fc490dc88b3471d68782df6f1c Reviewed-on: https://gerrit.libreoffice.org/63976 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- cui/source/tabpages/macroass.cxx | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'cui/source/tabpages') diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 4788ccc404cf..75176ba85e30 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -318,23 +318,12 @@ void SfxMacroTabPage::AssignDeleteHdl(const weld::Widget* pBtn) IMPL_LINK( SfxMacroTabPage, TimeOut_Impl, Timer*,, void ) { // FillMacroList() can take a long time -> show wait cursor and disable input - SfxTabDialog* pTabDlg = GetTabDialog(); - // perhaps the tabpage is part of a SingleTabDialog then pTabDlg == NULL - if ( pTabDlg ) - { - pTabDlg->EnterWait(); - pTabDlg->EnableInput( false ); - } + weld::Window* pDialog = GetDialogFrameWeld(); + // perhaps the tabpage is part of a SingleTabDialog then pDialog == nullptr + std::unique_ptr xWait(pDialog ? new weld::WaitObject(pDialog) : nullptr); // fill macro list - mpImpl->m_xGroupLB->Init( - comphelper::getProcessComponentContext(), - GetFrame(), - OUString(), false); - if ( pTabDlg ) - { - pTabDlg->EnableInput(); - pTabDlg->LeaveWait(); - } + mpImpl->m_xGroupLB->Init(comphelper::getProcessComponentContext(), GetFrame(), + OUString(), false); } void SfxMacroTabPage::InitAndSetHandler() @@ -398,14 +387,15 @@ VclPtr SfxMacroTabPage::Create(TabPageParent pParent, const SfxItemS return CreateSfxMacroTabPage(pParent, *rAttrSet); } -SfxMacroAssignDlg::SfxMacroAssignDlg(vcl::Window* pParent, +SfxMacroAssignDlg::SfxMacroAssignDlg(weld::Window* pParent, const Reference< XFrame >& rxDocumentFrame, const SfxItemSet& rSet) - : SfxSingleTabDialog(pParent, rSet, "EventAssignDialog", - "cui/ui/eventassigndialog.ui") + : SfxSingleTabDialogController(pParent, rSet,"cui/ui/eventassigndialog.ui", + "EventAssignDialog") { - VclPtr pPage = CreateSfxMacroTabPage(get_content_area(), rSet); - pPage->SetFrame( rxDocumentFrame ); - SetTabPage( pPage ); + TabPageParent pPageParent(get_content_area(), this); + VclPtr pPage = CreateSfxMacroTabPage(pPageParent, rSet); + pPage->SetFrame(rxDocumentFrame); + SetTabPage(pPage); pPage->LaunchFillGroup(); } -- cgit