summaryrefslogtreecommitdiffstats
path: root/basic
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-27 10:11:52 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-27 17:25:59 +0100
commit9fcef57a34dbd88a98621dfaf8668fa076dd98f1 (patch)
tree844e9ca54e0b30faf1b71b42397b4a8143460a43 /basic
parentofz#6571 catch exception (diff)
downloadcore-9fcef57a34dbd88a98621dfaf8668fa076dd98f1.tar.gz
core-9fcef57a34dbd88a98621dfaf8668fa076dd98f1.zip
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.cxx20
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;
}