cui/source/customize/cfg.cxx | 2 +- dbaccess/source/ui/dlg/sqlmessage.cxx | 6 +++--- include/tools/wintypes.hxx | 4 ++-- vcl/generic/app/gensys.cxx | 8 ++++---- vcl/source/bitmap/BitmapFilterStackBlur.cxx | 2 +- vcl/source/window/layout.cxx | 2 +- vcl/source/window/msgbox.cxx | 6 +++--- 7 files changed, 15 insertions(+), 15 deletions(-)
New commits: commit f2d556ca02827d0d77d06388bfe1a40739f4d1f8 Author: Noel Grandin <n...@peralex.com> Date: Fri Mar 27 09:04:44 2015 +0200 work around Windows and OSX macro collisions with enum values Change-Id: I3d14b96b6b51e497bde33f0177b377e7fe3dbad9 diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 5132ae8..5771f57 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -5309,7 +5309,7 @@ MessBox( pWindow, WB_DEF_YES, CUI_RES( RID_SVXSTR_REPLACE_ICON_CONFIRM ), CUI_R SetImage( WarningBox::GetStandardImage() ); SetMessText( ReplaceIconName( aMessage ) ); RemoveButton( 1 ); - AddButton( StandardButtonType::YES, 2, 0 ); + AddButton( StandardButtonType::SB_YES, 2, 0 ); AddButton( CUI_RES( RID_SVXSTR_YESTOALL ), 5, 0 ); AddButton( StandardButtonType::NO, 3, 0 ); AddButton( StandardButtonType::CANCEL, 4, 0 ); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 2fcc3bb..b47fd5f 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -425,7 +425,7 @@ namespace sal_uInt16 nButtonID = 0; switch ( _eType ) { - case StandardButtonType::YES: nButtonID = RET_YES; break; + case StandardButtonType::SB_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; @@ -564,7 +564,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) { if ( _nStyle & WB_YES_NO_CANCEL ) { - lcl_addButton( *this, StandardButtonType::YES, ( _nStyle & WB_DEF_YES ) != 0 ); + lcl_addButton( *this, StandardButtonType::SB_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 ); } @@ -575,7 +575,7 @@ void OSQLMessageBox::impl_createStandardButtons( WinBits _nStyle ) } else if ( _nStyle & WB_YES_NO ) { - lcl_addButton( *this, StandardButtonType::YES, ( _nStyle & WB_DEF_YES ) != 0 ); + lcl_addButton( *this, StandardButtonType::SB_YES, ( _nStyle & WB_DEF_YES ) != 0 ); lcl_addButton( *this, StandardButtonType::NO, ( _nStyle & WB_DEF_NO ) != 0 ); } else if ( _nStyle & WB_RETRY_CANCEL ) diff --git a/include/tools/wintypes.hxx b/include/tools/wintypes.hxx index 6abb4b6..e042483 100644 --- a/include/tools/wintypes.hxx +++ b/include/tools/wintypes.hxx @@ -299,13 +299,13 @@ enum class StandardButtonType { OK = 0, CANCEL = 1, - YES = 2, + SB_YES = 2, // overlaps with YES constant on MacOS NO = 3, RETRY = 4, HELP = 5, CLOSE = 6, MORE = 7, - IGNORE = 8, + SB_IGNORE = 8, // overlaps with IGNORE constant on Windows ABORT = 9, LESS = 10, RESET = 11, diff --git a/vcl/generic/app/gensys.cxx b/vcl/generic/app/gensys.cxx index ea19ebb..5d1f395 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 8548eaf..a89e176 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 3fdb647..deb19d7 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 ) { commit 3dc9f684b3994bd125b9f27049581aa35b1e52bc Author: Noel Grandin <n...@peralex.com> Date: Fri Mar 27 09:02:08 2015 +0200 fix tb56 build Change-Id: I453d6e1840445a03c6918173dc93f32e3028ea74 error: no matching function for call to 'max(int, sal_Int32&)' diff --git a/vcl/source/bitmap/BitmapFilterStackBlur.cxx b/vcl/source/bitmap/BitmapFilterStackBlur.cxx index 126eee0..bedc2b7 100644 --- a/vcl/source/bitmap/BitmapFilterStackBlur.cxx +++ b/vcl/source/bitmap/BitmapFilterStackBlur.cxx @@ -436,7 +436,7 @@ void stackBlurVertical( void stackBlur24(Bitmap& rBitmap, sal_Int32 nRadius, sal_Int32 nComponentWidth) { // Limit radius - nRadius = std::min(254, std::max(2, nRadius)); + nRadius = std::min(254, std::max<sal_Int32>(2, nRadius)); const long nColorChannels = 3; // 3 color channel BlurSharedData aData(nRadius, nComponentWidth, nColorChannels); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits