[Libreoffice-commits] core.git: vcl/win

Fridrich Å trba fridrich.strba at bluewin.ch
Mon Jun 17 01:12:40 PDT 2013


 vcl/win/source/gdi/salbmp.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 919684989da543d8884bb68d7d1c33c2cbe8a9b7
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Mon Jun 17 10:09:49 2013 +0200

    Fixing the joy of MSVC preprocessor
    
    Change-Id: I4e97f93de568b1704a58ab5e5c47e85e09327779

diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 2173e16..2094dc6 100644
--- a/vcl/win/source/gdi/salbmp.cxx
+++ b/vcl/win/source/gdi/salbmp.cxx
@@ -808,7 +808,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const
     if( nColors )
     {
         // copy the palette entries if any
-        const sal_uInt16 nMinCount = std::min( nColors, rPal.GetEntryCount() );
+        const sal_uInt16 nMinCount = (std::min)( nColors, rPal.GetEntryCount() );
         if( nMinCount )
             memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof(RGBQUAD) );
     }
@@ -976,7 +976,7 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
                 PBITMAPINFO     pBI = (PBITMAPINFO) GlobalLock( mhDIB );
                 const sal_uInt16    nCount = pBuffer->maPalette.GetEntryCount();
                 const sal_uInt16    nDIBColorCount = ImplGetDIBColorCount( mhDIB );
-                memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), std::min( nDIBColorCount, nCount ) * sizeof( RGBQUAD ) );
+                memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), (std::min)( nDIBColorCount, nCount ) * sizeof( RGBQUAD ) );
                 GlobalUnlock( mhDIB );
             }
 


More information about the Libreoffice-commits mailing list