summaryrefslogtreecommitdiff
path: root/uui/source/lockfailed.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-02-26 16:53:37 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-02-27 11:22:49 +0100
commit082e69fefb7439fd4f3d543f0c402039e94c1e9c (patch)
tree8348cacdc54a15dae722b93fc198995756924fc0 /uui/source/lockfailed.cxx
parentf41a08183504a59d6ffc7a00ed7f24e6b19995ab (diff)
convert various MessBox to weld::MessageDialog
Change-Id: I4d2d0393c753114aeb9bb7e646dfdc810f6caa38 Reviewed-on: https://gerrit.libreoffice.org/50398 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 'uui/source/lockfailed.cxx')
-rw-r--r--uui/source/lockfailed.cxx22
1 files changed, 8 insertions, 14 deletions
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index 51266f0b3420..0f2167294f21 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -21,22 +21,16 @@
#include "lockfailed.hxx"
#include <unotools/resmgr.hxx>
#include <vcl/button.hxx>
+#include <vcl/svapp.hxx>
-LockFailedQueryBox::LockFailedQueryBox(vcl::Window* pParent, const std::locale& rResLocale)
- : MessBox(pParent, MessBoxStyle::NONE, 0, Translate::get(STR_LOCKFAILED_TITLE, rResLocale), OUString())
-{
- SetImage(GetStandardErrorBoxImage());
-
- AddButton(Translate::get(STR_LOCKFAILED_OPENREADONLY_BTN, rResLocale), RET_OK,
- ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
-
- AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
-
- SetMessText(Translate::get(STR_LOCKFAILED_MSG, rResLocale));
-}
-
-LockFailedQueryBox::~LockFailedQueryBox()
+LockFailedQueryBox::LockFailedQueryBox(weld::Window* pParent, const std::locale& rLocale)
+ : m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Error,
+ VclButtonsType::NONE, Translate::get(STR_LOCKFAILED_MSG, rLocale)))
{
+ m_xQueryBox->set_title(Translate::get(STR_LOCKFAILED_TITLE, rLocale));
+ m_xQueryBox->add_button(Translate::get(STR_LOCKFAILED_OPENREADONLY_BTN, rLocale), RET_OK);
+ m_xQueryBox->add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL);
+ m_xQueryBox->set_default_response(RET_OK);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */