summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-21 21:20:15 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-25 20:03:26 +0100
commitd75144cf44779a8f6cc9bccf9b0a6328b94a5b90 (patch)
tree25b9f3c677c50ad715e1a0bc6bef3d5bf79ef957 /basctl
parent8d42909cd326cb26d8ba1fb383b5578f820c72ed (diff)
convert remaining InfoBox to weld::MessageDialog
Change-Id: I91d828e38d96264cf4a76f30940942556b8f78d8 Reviewed-on: https://gerrit.libreoffice.org/50205 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basides1.cxx14
-rw-r--r--basctl/source/basicide/basidesh.cxx8
2 files changed, 17 insertions, 5 deletions
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 <svl/visitem.hxx>
#include <svl/whiter.hxx>
#include <vcl/xtextedt.hxx>
+#include <vcl/svapp.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/weld.hxx>
@@ -114,7 +115,11 @@ void Shell::ExecuteCurrent( SfxRequest& rReq )
OUString aReplStr(IDEResId(RID_STR_SEARCHREPLACES));
aReplStr = aReplStr.replaceAll("XX", OUString::number(nFound));
- ScopedVclPtrInstance<InfoBox>(pCurWin, aReplStr)->Execute();
+
+ std::unique_ptr<weld::MessageDialog> 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<InfoBox>(pCurWin, IDEResId(RID_STR_SEARCHNOTFOUND))->Execute();
+ {
+ std::unique_ptr<weld::MessageDialog> 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 <com/sun/star/container/XContainer.hpp>
#include <svx/xmlsecctrl.hxx>
#include <sfx2/viewfac.hxx>
-#include <vcl/msgbox.hxx>
+#include <vcl/weld.hxx>
#include <vcl/settings.hxx>
#include <cppuhelper/implbase.hxx>
@@ -386,8 +386,10 @@ bool Shell::PrepareClose( bool bUI )
{
if( bUI )
{
- vcl::Window *pParent = &GetViewFrame()->GetWindow();
- ScopedVclPtrInstance<InfoBox>(pParent, IDEResId(RID_STR_CANNOTCLOSE))->Execute();
+ std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetViewFrame()->GetWindow().GetFrameWeld(),
+ VclMessageType::Info, VclButtonsType::Ok,
+ IDEResId(RID_STR_CANNOTCLOSE)));
+ xInfoBox->run();
}
return false;
}