diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-21 21:20:15 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-25 20:03:26 +0100 |
commit | d75144cf44779a8f6cc9bccf9b0a6328b94a5b90 (patch) | |
tree | 25b9f3c677c50ad715e1a0bc6bef3d5bf79ef957 /sw/source/uibase/app | |
parent | 8d42909cd326cb26d8ba1fb383b5578f820c72ed (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 'sw/source/uibase/app')
-rw-r--r-- | sw/source/uibase/app/docsh.cxx | 12 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 5 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx index 1cc101938fa9..9291e0a2f763 100644 --- a/sw/source/uibase/app/docsh.cxx +++ b/sw/source/uibase/app/docsh.cxx @@ -21,7 +21,7 @@ #include <hintids.hxx> #include <vcl/layout.hxx> -#include <vcl/msgbox.hxx> +#include <vcl/weld.hxx> #include <vcl/svapp.hxx> #include <vcl/wrkwin.hxx> #include <vcl/jobset.hxx> @@ -177,7 +177,10 @@ Reader* SwDocShell::StartConvertFrom(SfxMedium& rMedium, SwReader** ppRdr, { if(!bAPICall) { - ScopedVclPtrInstance<InfoBox>(nullptr, SwResId(STR_CANTOPEN))->Execute(); + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Info, VclButtonsType::Ok, + SwResId(STR_CANTOPEN))); + xInfoBox->run(); } return nullptr; } @@ -550,7 +553,10 @@ bool SwDocShell::ConvertTo( SfxMedium& rMedium ) SwReaderWriter::GetWriter( pFlt->GetUserData(), rMedium.GetBaseURL( true ), xWriter ); if( !xWriter.is() ) { // Filter not available - ScopedVclPtrInstance<InfoBox>(nullptr, SwResId(STR_DLLNOTFOUND))->Execute(); + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Info, VclButtonsType::Ok, + SwResId(STR_DLLNOTFOUND))); + xInfoBox->run(); return false; } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index c52304ff341a..a78e295d0604 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -1099,7 +1099,10 @@ void SwDocShell::Execute(SfxRequest& rReq) } if( !bDone && !rReq.IsAPI() ) { - ScopedVclPtrInstance<InfoBox>(nullptr, SwResId( STR_CANTCREATE))->Execute(); + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Info, VclButtonsType::Ok, + SwResId(STR_CANTCREATE))); + xInfoBox->run(); } } } |