diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-05-01 10:08:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-05-01 14:42:04 +0100 |
commit | 26bda9f4a82c9b1956a10e3dc52a99bc2f850ada (patch) | |
tree | 37766d78617725fdf87084cebb13a93111b35a6c /dbaccess | |
parent | 1680b036c5a9bf50b10580ee995f91ca6f873ef5 (diff) |
convert message box return types to an enum
Change-Id: I20889dc94aac1119c1ee9da873ce911887c1c335
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 20 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationTableView.cxx | 6 |
2 files changed, 13 insertions, 13 deletions
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index d263417cb5e6..c35fba5f4568 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -39,7 +39,7 @@ #include <tools/urlobj.hxx> -#define BUTTONID_MORE BUTTONID_RETRY + 1 +#define RET_MORE RET_RETRY + 1 #define DIALOG_WIDTH 220 #define OUTER_MARGIN 6 @@ -458,12 +458,12 @@ namespace sal_uInt16 nButtonID = 0; switch ( _eType ) { - case BUTTON_YES: nButtonID = BUTTONID_YES; break; - case BUTTON_NO: nButtonID = BUTTONID_NO; break; - case BUTTON_OK: nButtonID = BUTTONID_OK; break; - case BUTTON_CANCEL: nButtonID = BUTTONID_CANCEL; break; - case BUTTON_RETRY: nButtonID = BUTTONID_RETRY; break; - case BUTTON_HELP: nButtonID = BUTTONID_HELP; break; + 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; default: OSL_FAIL( "lcl_addButton: invalid button id!" ); break; @@ -623,7 +623,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) else { OSL_ENSURE( WB_OK & _nStyle, "OSQLMessageBox::impl_createStandardButtons: unsupported dialog style requested!" ); - AddButton( BUTTON_OK, BUTTONID_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON ); + AddButton( BUTTON_OK, RET_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON ); } if ( !m_sHelpURL.isEmpty() ) @@ -666,8 +666,8 @@ void OSQLMessageBox::impl_addDetailsButton() if ( bMoreDetailsAvailable ) { - AddButton( BUTTON_MORE, BUTTONID_MORE, 0 ); - PushButton* pButton = GetPushButton( BUTTONID_MORE ); + AddButton( BUTTON_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 ) ); pButton->SetUniqueId( UID_SQLERROR_BUTTONMORE ); diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx index 5a3d72485066..f6a0ac614298 100644 --- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx +++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx @@ -365,9 +365,9 @@ void ORelationTableView::lookForUiActivities() OSQLMessageBox aDlg(this,ModuleRes(STR_QUERY_REL_EDIT_RELATION),String(),0); aDlg.SetText(sTitle); aDlg.RemoveButton(aDlg.GetButtonId(0)); - aDlg.AddButton( ModuleRes(STR_QUERY_REL_EDIT), BUTTONID_OK, BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON); - aDlg.AddButton( ModuleRes(STR_QUERY_REL_CREATE), BUTTONID_YES, 0); - aDlg.AddButton(BUTTON_CANCEL,BUTTONID_CANCEL,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); sal_uInt16 nRet = aDlg.Execute(); if( nRet == RET_CANCEL) { |