From 2c8dc0373377a6e801c9a9246ffdc3641f3be4ec Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 6 May 2015 14:21:26 +0200 Subject: convert BUTTONDIALOG constants to scoped enum Change-Id: Icbf73fe55ad604f762dd2b98fd39189bab82f061 Reviewed-on: https://gerrit.libreoffice.org/15648 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- uui/source/alreadyopen.cxx | 12 ++++++------ uui/source/filechanged.cxx | 4 ++-- uui/source/lockfailed.cxx | 4 ++-- uui/source/openlocked.cxx | 6 +++--- uui/source/trylater.cxx | 6 +++--- 5 files changed, 16 insertions(+), 16 deletions(-) (limited to 'uui') diff --git a/uui/source/alreadyopen.cxx b/uui/source/alreadyopen.cxx index fa83bee182e7..353fa3c7959b 100644 --- a/uui/source/alreadyopen.cxx +++ b/uui/source/alreadyopen.cxx @@ -30,16 +30,16 @@ AlreadyOpenQueryBox::AlreadyOpenQueryBox( vcl::Window* pParent, ResMgr* pResMgr, if ( bIsStoring ) { AddButton( ResId(STR_ALREADYOPEN_RETRY_SAVE_BTN, *pResMgr).toString(), RET_YES, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); - AddButton( ResId(STR_ALREADYOPEN_SAVE_BTN, *pResMgr).toString(), RET_NO, 0 ); - AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); + ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus ); + AddButton( ResId(STR_ALREADYOPEN_SAVE_BTN, *pResMgr).toString(), RET_NO); + AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); } else { AddButton( ResId(STR_ALREADYOPEN_READONLY_BTN, *pResMgr).toString(), RET_YES, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON ); - AddButton( ResId(STR_ALREADYOPEN_OPEN_BTN, *pResMgr).toString(), RET_NO, 0 ); - AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); + ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus ); + AddButton( ResId(STR_ALREADYOPEN_OPEN_BTN, *pResMgr).toString(), RET_NO); + AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); } SetButtonHelpText( RET_YES, OUString() ); diff --git a/uui/source/filechanged.cxx b/uui/source/filechanged.cxx index 9b9946cf734f..33b5dee6b777 100644 --- a/uui/source/filechanged.cxx +++ b/uui/source/filechanged.cxx @@ -28,8 +28,8 @@ FileChangedQueryBox::FileChangedQueryBox( vcl::Window* pParent, ResMgr* pResMgr SetImage( QueryBox::GetStandardImage() ); AddButton(ResId(STR_FILECHANGED_SAVEANYWAY_BTN, *pResMgr).toString(), RET_YES, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON); - AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); + ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus); + AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); SetButtonHelpText( RET_YES, OUString() ); SetMessText(ResId(STR_FILECHANGED_MSG, *pResMgr).toString()); diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx index 875add53d5c3..77ceb7e8d625 100644 --- a/uui/source/lockfailed.cxx +++ b/uui/source/lockfailed.cxx @@ -29,8 +29,8 @@ LockFailedQueryBox::LockFailedQueryBox( vcl::Window* pParent, ResMgr* pResMgr ) { SetImage( ErrorBox::GetStandardImage() ); - AddButton( StandardButtonType::OK, RET_OK, BUTTONDIALOG_OKBUTTON ); - AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); + AddButton( StandardButtonType::OK, RET_OK, ButtonDialogFlags::OK ); + AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); SetMessText(ResId(STR_LOCKFAILED_MSG, *pResMgr ).toString()); SetCheckBoxText(ResId(STR_LOCKFAILED_DONTSHOWAGAIN, *pResMgr).toString()); diff --git a/uui/source/openlocked.cxx b/uui/source/openlocked.cxx index ca6883e3fdc7..acb19a61171d 100644 --- a/uui/source/openlocked.cxx +++ b/uui/source/openlocked.cxx @@ -28,11 +28,11 @@ OpenLockedQueryBox::OpenLockedQueryBox( vcl::Window* pParent, ResMgr* pResMgr, c SetImage( QueryBox::GetStandardImage() ); AddButton(ResId(STR_OPENLOCKED_OPENREADONLY_BTN, *pResMgr).toString(), RET_YES, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON); + ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus); - AddButton(ResId(STR_OPENLOCKED_OPENCOPY_BTN, *pResMgr).toString(), RET_NO, 0); + AddButton(ResId(STR_OPENLOCKED_OPENCOPY_BTN, *pResMgr).toString(), RET_NO); - AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); + AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); SetButtonHelpText( RET_YES, OUString() ); SetButtonHelpText( RET_NO, OUString() ); diff --git a/uui/source/trylater.cxx b/uui/source/trylater.cxx index 3f5719f3c29d..90688a95e2a3 100644 --- a/uui/source/trylater.cxx +++ b/uui/source/trylater.cxx @@ -28,9 +28,9 @@ TryLaterQueryBox::TryLaterQueryBox( vcl::Window* pParent, ResMgr* pResMgr, const SetImage( QueryBox::GetStandardImage() ); AddButton(ResId(STR_TRYLATER_RETRYSAVING_BTN, *pResMgr).toString(), RET_YES, - BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_OKBUTTON | BUTTONDIALOG_FOCUSBUTTON); - AddButton(ResId(STR_TRYLATER_SAVEAS_BTN, *pResMgr).toString(), RET_NO, 0); - AddButton( StandardButtonType::Cancel, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); + ButtonDialogFlags::Default | ButtonDialogFlags::OK | ButtonDialogFlags::Focus); + AddButton(ResId(STR_TRYLATER_SAVEAS_BTN, *pResMgr).toString(), RET_NO); + AddButton( StandardButtonType::Cancel, RET_CANCEL, ButtonDialogFlags::Cancel ); SetButtonHelpText( RET_YES, OUString() ); SetButtonHelpText( RET_NO, OUString() ); -- cgit v1.2.3