sc/source/ui/view/tabvwshf.cxx | 6 +++--- sw/source/uibase/uiview/view2.cxx | 36 ++++++++++++++++++------------------ 2 files changed, 21 insertions(+), 21 deletions(-)
New commits: commit 121d581fd5dc8687e232be45d4f37e4e2e3fa14a Author: Pranam Lashkari <[email protected]> AuthorDate: Fri Nov 28 19:15:12 2025 +0530 Commit: Pranam Lashkari <[email protected]> CommitDate: Fri Nov 28 15:27:58 2025 +0100 converted a few simple MessageDialog dialogs to async found this dialogs while working on this files not converted for any particular problem or context Change-Id: I50e1db88de660024e095471ec3e96da050a04242 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194779 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx index c471bc4be27e..6ae204bc1782 100644 --- a/sc/source/ui/view/tabvwshf.cxx +++ b/sc/source/ui/view/tabvwshf.cxx @@ -1192,9 +1192,9 @@ bool ScTabViewShell::DoAppendOrRenameTableDialog(sal_Int32 nResult, const VclPtr else { OUString aErrMsg ( ScResId( STR_INVALIDTABNAME ) ); - std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Warning, VclButtonsType::Ok, aErrMsg)); - xBox->run(); + std::shared_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog( + GetFrameWeld(), VclMessageType::Warning, VclButtonsType::Ok, aErrMsg)); + xBox->runAsync(xBox, [](sal_uInt32) {}); } } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index fa214e0e9334..32b86da7be40 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -582,10 +582,9 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) { if( bShowError ) { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(), - VclMessageType::Info, VclButtonsType::Ok, - SwResId(pResId))); - xInfoBox->run(); + std::shared_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog( + GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, SwResId(pResId))); + xInfoBox->runAsync(xInfoBox, [](sal_uInt32) {}); } rReq.Ignore(); } @@ -795,10 +794,11 @@ void SwView::Execute(SfxRequest &rReq) rIDRA.SetRedlinePassword(Sequence <sal_Int8> ()); else { // xmlsec05: message box for wrong password - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, - VclMessageType::Info, VclButtonsType::Ok, - SfxResId(RID_SVXSTR_INCORRECT_PASSWORD))); - xInfoBox->run(); + std::shared_ptr<weld::MessageDialog> xInfoBox( + Application::CreateMessageDialog( + nullptr, VclMessageType::Info, VclButtonsType::Ok, + SfxResId(RID_SVXSTR_INCORRECT_PASSWORD))); + xInfoBox->runAsync(xInfoBox, [](sal_uInt32) {}); break; } } @@ -2493,10 +2493,10 @@ void SwView::EditLinkDlg() { if (officecfg::Office::Common::Security::Scripting::DisableActiveContent::get()) { - std::unique_ptr<weld::MessageDialog> xError( + std::shared_ptr<weld::MessageDialog> xError( Application::CreateMessageDialog(nullptr, VclMessageType::Warning, VclButtonsType::Ok, SvtResId(STR_WARNING_EXTERNAL_LINK_EDIT_DISABLED))); - xError->run(); + xError->runAsync(xError, [](sal_uInt32) {}); return; } @@ -2965,10 +2965,10 @@ tools::Long SwView::InsertMedium( sal_uInt16 nSlotId, std::unique_ptr<SfxMedium> if (!bCompare && !nFound) { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetEditWin().GetFrameWeld(), - VclMessageType::Info, VclButtonsType::Ok, - SwResId(STR_NO_MERGE_ENTRY))); - xInfoBox->run(); + std::shared_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog( + GetEditWin().GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, + SwResId(STR_NO_MERGE_ENTRY))); + xInfoBox->runAsync(xInfoBox, [](sal_uInt32) {}); } if( nRet==2 && xDocSh.is() ) xDocSh->DoClose(); @@ -3151,10 +3151,10 @@ IMPL_LINK( SwView, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) std::unique_ptr<SfxMedium> pMed = m_pViewImpl->CreateMedium(); if ( !pMed ) { - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetEditWin().GetFrameWeld(), - VclMessageType::Info, VclButtonsType::Ok, - SwResId(RID_SVXSTR_TXTFILTER_FILTERERROR))); - xInfoBox->run(); + std::shared_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog( + GetEditWin().GetFrameWeld(), VclMessageType::Info, VclButtonsType::Ok, + SwResId(RID_SVXSTR_TXTFILTER_FILTERERROR))); + xInfoBox->runAsync(xInfoBox, [](sal_uInt32) {}); return; }
