summaryrefslogtreecommitdiff
path: root/uui/source/filechanged.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'uui/source/filechanged.cxx')
-rw-r--r--uui/source/filechanged.cxx25
1 files changed, 9 insertions, 16 deletions
diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx
index 54917bb1bb2a..0c0b5d53dcc9 100644
--- a/uui/source/filechanged.cxx
+++ b/uui/source/filechanged.cxx
@@ -19,25 +19,18 @@
#include <strings.hrc>
#include <unotools/resmgr.hxx>
+#include <vcl/button.hxx>
+#include <vcl/svapp.hxx>
#include "filechanged.hxx"
-FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, const std::locale& rLocale ) :
- MessBox(pParent, MessBoxStyle::NONE, 0,
- Translate::get(STR_FILECHANGED_TITLE, rLocale),
- OUString() )
-{
- SetImage(GetStandardQueryBoxImage());
-
- AddButton(Translate::get(STR_FILECHANGED_SAVEANYWAY_BTN, rLocale), RET_YES,
- ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus);
- AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel );
-
- SetButtonHelpText( RET_YES, OUString() );
- SetMessText(Translate::get(STR_FILECHANGED_MSG, rLocale));
-}
-
-FileChangedQueryBox::~FileChangedQueryBox()
+FileChangedQueryBox::FileChangedQueryBox(weld::Window* pParent, const std::locale& rLocale)
+ : m_xQueryBox(Application::CreateMessageDialog(pParent, VclMessageType::Question,
+ VclButtonsType::NONE, Translate::get(STR_FILECHANGED_MSG, rLocale)))
{
+ m_xQueryBox->set_title(Translate::get(STR_FILECHANGED_TITLE, rLocale));
+ m_xQueryBox->add_button(Translate::get(STR_FILECHANGED_SAVEANYWAY_BTN, rLocale), RET_YES);
+ m_xQueryBox->add_button(Button::GetStandardText(StandardButtonType::Cancel), RET_CANCEL);
+ m_xQueryBox->set_default_response(RET_YES);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */