diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-26 12:54:04 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-27 08:33:43 +0200 |
commit | 93ddb2cc0bedac9a97260826741f7dfcdca0947d (patch) | |
tree | ece9d5cc3e90cda21113c429439f0713a7921016 /dbaccess | |
parent | 402ae4c06c0935b0b2bfe9aeb6f961a65702e307 (diff) |
convert BUTTON_ constants to enum class
Change-Id: I0fd391a6b2850e5d7dcbf2cb95cfa39ee5561bd9
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 36 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/datasourceconnector.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationTableView.cxx | 2 |
3 files changed, 20 insertions, 20 deletions
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index f6428a221231..2fcc3bb2f5ea 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -425,12 +425,12 @@ namespace sal_uInt16 nButtonID = 0; switch ( _eType ) { - case BUTTON_YES: nButtonID = RET_YES; break; - case BUTTON_NO: nButtonID = RET_NO; break; - case BUTTON_OK: nButtonID = RET_OK; break; - case BUTTON_CANCEL: nButtonID = RET_CANCEL; break; - case BUTTON_RETRY: nButtonID = RET_RETRY; break; - case BUTTON_HELP: nButtonID = RET_HELP; break; + case StandardButtonType::YES: nButtonID = RET_YES; break; + case StandardButtonType::NO: nButtonID = RET_NO; break; + case StandardButtonType::OK: nButtonID = RET_OK; break; + case StandardButtonType::CANCEL: nButtonID = RET_CANCEL; break; + case StandardButtonType::RETRY: nButtonID = RET_RETRY; break; + case StandardButtonType::HELP: nButtonID = RET_HELP; break; default: OSL_FAIL( "lcl_addButton: invalid button id!" ); break; @@ -564,34 +564,34 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) { if ( _nStyle & WB_YES_NO_CANCEL ) { - lcl_addButton( *this, BUTTON_YES, ( _nStyle & WB_DEF_YES ) != 0 ); - lcl_addButton( *this, BUTTON_NO, ( _nStyle & WB_DEF_NO ) != 0 ); - lcl_addButton( *this, BUTTON_CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 ); + lcl_addButton( *this, StandardButtonType::YES, ( _nStyle & WB_DEF_YES ) != 0 ); + lcl_addButton( *this, StandardButtonType::NO, ( _nStyle & WB_DEF_NO ) != 0 ); + lcl_addButton( *this, StandardButtonType::CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 ); } else if ( _nStyle & WB_OK_CANCEL ) { - lcl_addButton( *this, BUTTON_OK, ( _nStyle & WB_DEF_OK ) != 0 ); - lcl_addButton( *this, BUTTON_CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 ); + lcl_addButton( *this, StandardButtonType::OK, ( _nStyle & WB_DEF_OK ) != 0 ); + lcl_addButton( *this, StandardButtonType::CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 ); } else if ( _nStyle & WB_YES_NO ) { - lcl_addButton( *this, BUTTON_YES, ( _nStyle & WB_DEF_YES ) != 0 ); - lcl_addButton( *this, BUTTON_NO, ( _nStyle & WB_DEF_NO ) != 0 ); + lcl_addButton( *this, StandardButtonType::YES, ( _nStyle & WB_DEF_YES ) != 0 ); + lcl_addButton( *this, StandardButtonType::NO, ( _nStyle & WB_DEF_NO ) != 0 ); } else if ( _nStyle & WB_RETRY_CANCEL ) { - lcl_addButton( *this, BUTTON_RETRY, ( _nStyle & WB_DEF_RETRY ) != 0 ); - lcl_addButton( *this, BUTTON_CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 ); + lcl_addButton( *this, StandardButtonType::RETRY, ( _nStyle & WB_DEF_RETRY ) != 0 ); + lcl_addButton( *this, StandardButtonType::CANCEL, ( _nStyle & WB_DEF_CANCEL ) != 0 ); } else { OSL_ENSURE( WB_OK & _nStyle, "OSQLMessageBox::impl_createStandardButtons: unsupported dialog style requested!" ); - AddButton( BUTTON_OK, RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON ); + AddButton( StandardButtonType::OK, RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON ); } if ( !m_sHelpURL.isEmpty() ) { - lcl_addButton( *this, BUTTON_HELP, false ); + lcl_addButton( *this, StandardButtonType::HELP, false ); OUString aTmp; INetURLObject aHID( m_sHelpURL ); @@ -628,7 +628,7 @@ void OSQLMessageBox::impl_addDetailsButton() if ( bMoreDetailsAvailable ) { - AddButton( BUTTON_MORE, RET_MORE, 0 ); + AddButton( StandardButtonType::MORE, RET_MORE, 0 ); PushButton* pButton = GetPushButton( RET_MORE ); OSL_ENSURE( pButton, "OSQLMessageBox::impl_addDetailsButton: just added this button, why isn't it there?" ); pButton->SetClickHdl( LINK( this, OSQLMessageBox, ButtonClickHdl ) ); diff --git a/dbaccess/source/ui/misc/datasourceconnector.cxx b/dbaccess/source/ui/misc/datasourceconnector.cxx index 24eca91203af..bc583fa9b0f1 100644 --- a/dbaccess/source/ui/misc/datasourceconnector.cxx +++ b/dbaccess/source/ui/misc/datasourceconnector.cxx @@ -161,7 +161,7 @@ namespace dbaui if ( aWarnings.hasValue() ) { OUString sMessage( ModuleRes( STR_WARNINGS_DURING_CONNECT ) ); - sMessage = sMessage.replaceFirst( "$buttontext$", Button::GetStandardText( BUTTON_MORE ) ); + sMessage = sMessage.replaceFirst( "$buttontext$", Button::GetStandardText( StandardButtonType::MORE ) ); sMessage = OutputDevice::GetNonMnemonicString( sMessage ); SQLWarning aContext; diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index ccee13854046..dd3861ba130e 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -342,7 +342,7 @@ void ORelationTableView::lookForUiActivities() aDlg.RemoveButton(aDlg.GetButtonId(0)); aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), RET_YES, 0); - aDlg.AddButton(BUTTON_CANCEL,RET_CANCEL,0); + aDlg.AddButton( StandardButtonType::CANCEL,RET_CANCEL,0); sal_uInt16 nRet = aDlg.Execute(); if( nRet == RET_CANCEL) { |