diff options
author | Noel Grandin <noel@peralex.com> | 2015-03-27 09:04:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-03-27 09:04:44 +0200 |
commit | f2d556ca02827d0d77d06388bfe1a40739f4d1f8 (patch) | |
tree | 4c0ab405b27e11c65c9856651a1de048492cda45 /vcl | |
parent | 3dc9f684b3994bd125b9f27049581aa35b1e52bc (diff) |
work around Windows and OSX macro collisions with enum values
Change-Id: I3d14b96b6b51e497bde33f0177b377e7fe3dbad9
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/generic/app/gensys.cxx | 8 | ||||
-rw-r--r-- | vcl/source/window/layout.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/msgbox.cxx | 6 |
3 files changed, 8 insertions, 8 deletions
diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index ea19ebb04dbb..5d1f395920cd 100644 --- a/vcl/generic/app/gensys.cxx +++ b/vcl/generic/app/gensys.cxx @@ -65,10 +65,10 @@ OUString GetNativeMessageBoxButtonText( StandardButtonType nButtonId, bool bUseR case StandardButtonType::RETRY: aText = "Retry"; break; - case StandardButtonType::IGNORE: + case StandardButtonType::SB_IGNORE: aText = "Ignore"; break; - case StandardButtonType::YES: + case StandardButtonType::SB_YES: aText = "Yes"; break; case StandardButtonType::NO: @@ -109,7 +109,7 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri if( nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO_CANCEL || nButtonCombination == SALSYSTEM_SHOWNATIVEMSGBOX_BTNCOMBI_YES_NO ) { - aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::YES, bUseResources ) ); + aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::SB_YES, bUseResources ) ); nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_YES; aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::NO, bUseResources ) ); nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_NO; @@ -136,7 +136,7 @@ int SalGenericSystem::ShowNativeMessageBox( const OUString& rTitle, const OUStri nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_ABORT; aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::RETRY, bUseResources ) ); nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_RETRY; - aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::IGNORE, bUseResources ) ); + aButtons.push_back( GetNativeMessageBoxButtonText( StandardButtonType::SB_IGNORE, bUseResources ) ); nButtonIds[nBut++] = SALSYSTEM_SHOWNATIVEMSGBOX_BTN_IGNORE; switch( nDefaultButton ) { diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 8548eafd5059..a89e176ce492 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2171,7 +2171,7 @@ short MessageDialog::Execute() break; case VCL_BUTTONS_YES_NO: pBtn = new PushButton(pButtonBox); - pBtn->SetText(Button::GetStandardText(StandardButtonType::YES)); + pBtn->SetText(Button::GetStandardText(StandardButtonType::SB_YES)); pBtn->Show(); m_aOwnedButtons.push_back(pBtn); m_aResponses[pBtn] = RET_YES; diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 3fdb64787bc4..deb19d763b02 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -86,7 +86,7 @@ void MessBox::ImplInitButtons() nNoFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON; nNoFlags |= BUTTONDIALOG_CANCELBUTTON; - AddButton( StandardButtonType::YES, RET_YES, nYesFlags ); + AddButton( StandardButtonType::SB_YES, RET_YES, nYesFlags ); AddButton( StandardButtonType::NO, RET_NO, nNoFlags ); } else if ( nStyle & WB_YES_NO_CANCEL ) @@ -98,7 +98,7 @@ void MessBox::ImplInitButtons() else nCancelFlags |= BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON; - AddButton( StandardButtonType::YES, RET_YES, nYesFlags ); + AddButton( StandardButtonType::SB_YES, RET_YES, nYesFlags ); AddButton( StandardButtonType::NO, RET_NO, nNoFlags ); AddButton( StandardButtonType::CANCEL, RET_CANCEL, nCancelFlags ); } @@ -126,7 +126,7 @@ void MessBox::ImplInitButtons() AddButton( StandardButtonType::ABORT, RET_CANCEL, nAbortFlags ); AddButton( StandardButtonType::RETRY, RET_RETRY, nRetryFlags ); - AddButton( StandardButtonType::IGNORE, RET_IGNORE, nIgnoreFlags ); + AddButton( StandardButtonType::SB_IGNORE, RET_IGNORE, nIgnoreFlags ); } else if ( nStyle & WB_OK ) { |