From d75144cf44779a8f6cc9bccf9b0a6328b94a5b90 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 21 Feb 2018 21:20:15 +0000 Subject: convert remaining InfoBox to weld::MessageDialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- basctl/source/basicide/basides1.cxx | 14 ++++++++++++-- basctl/source/basicide/basidesh.cxx | 8 +++++--- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'basctl') diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index 22afa37f5d2a..5fce14ec5114 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -48,6 +48,7 @@ #include #include #include +#include #include #include @@ -114,7 +115,11 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) OUString aReplStr(IDEResId(RID_STR_SEARCHREPLACES)); aReplStr = aReplStr.replaceAll("XX", OUString::number(nFound)); - ScopedVclPtrInstance(pCurWin, aReplStr)->Execute(); + + std::unique_ptr xInfoBox(Application::CreateMessageDialog(pCurWin->GetFrameWeld(), + VclMessageType::Info, VclButtonsType::Ok, + aReplStr)); + xInfoBox->run(); } else { @@ -181,7 +186,12 @@ void Shell::ExecuteCurrent( SfxRequest& rReq ) SetCurWindow( pWin, true ); } if ( !nFound && !bCanceled ) - ScopedVclPtrInstance(pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND))->Execute(); + { + std::unique_ptr xInfoBox(Application::CreateMessageDialog(pCurWin->GetFrameWeld(), + VclMessageType::Info, VclButtonsType::Ok, + IDEResId(RID_STR_SEARCHNOTFOUND))); + xInfoBox->run(); + } } rReq.Done(); diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index e4791604572b..58b4d42c50c7 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -62,7 +62,7 @@ #include #include #include -#include +#include #include #include @@ -386,8 +386,10 @@ bool Shell::PrepareClose( bool bUI ) { if( bUI ) { - vcl::Window *pParent = &GetViewFrame()->GetWindow(); - ScopedVclPtrInstance(pParent, IDEResId(RID_STR_CANNOTCLOSE))->Execute(); + std::unique_ptr xInfoBox(Application::CreateMessageDialog(GetViewFrame()->GetWindow().GetFrameWeld(), + VclMessageType::Info, VclButtonsType::Ok, + IDEResId(RID_STR_CANNOTCLOSE))); + xInfoBox->run(); } return false; } -- cgit