diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-02-27 10:11:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-02-27 17:25:59 +0100 |
commit | 9fcef57a34dbd88a98621dfaf8668fa076dd98f1 (patch) | |
tree | 844e9ca54e0b30faf1b71b42397b4a8143460a43 /basic | |
parent | aa4548d1f91e15b8711bbcbd2ad939247579f9a8 (diff) |
convert Redline warning dialog to .ui to get helpids
etc.
Change-Id: Ic5e6031fe99347f19002d5d8527b5632333fefb0
Reviewed-on: https://gerrit.libreoffice.org/50431
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/iosys.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 49932c9e8316..76acd11775a9 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -21,8 +21,8 @@ #include <vcl/dialog.hxx> #include <vcl/edit.hxx> #include <vcl/button.hxx> -#include <vcl/msgbox.hxx> #include <vcl/svapp.hxx> +#include <vcl/weld.hxx> #include <osl/file.hxx> #include <tools/urlobj.hxx> @@ -720,12 +720,10 @@ void SbiIoSystem::Shutdown() // anything left to PRINT? if( !aOut.isEmpty() ) { -#if defined __GNUC__ vcl::Window* pParent = Application::GetDefDialogParent(); - ScopedVclPtrInstance<MessBox>( pParent, MessBoxStyle::Ok, 0, OUString(), aOut )->Execute(); -#else - ScopedVclPtrInstance<MessBox>( Application::GetDefDialogParent(), MessBoxStyle::Ok, 0, OUString(), aOut )->Execute(); -#endif + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Warning, + VclButtonsType::Ok, aOut)); + xBox->run(); } aOut.clear(); } @@ -860,10 +858,12 @@ void SbiIoSystem::WriteCon(const OUString& rText) } { SolarMutexGuard aSolarGuard; - if( !ScopedVclPtrInstance<MessBox>( - Application::GetDefDialogParent(), - MessBoxStyle::OkCancel | MessBoxStyle::DefaultOk, - 0, OUString(), s)->Execute() ) + + vcl::Window* pParent = Application::GetDefDialogParent(); + std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent ? pParent->GetFrameWeld() : nullptr, VclMessageType::Warning, + VclButtonsType::OkCancel, s)); + xBox->set_default_response(RET_OK); + if (!xBox->run()) { nError = ERRCODE_BASIC_USER_ABORT; } |