include/postwin.h | 6 ++++++ vcl/win/source/gdi/salgdi.cxx | 2 +- vcl/win/source/window/salframe.cxx | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-)
New commits: commit c8861af86a466c1e837263e58f3214aa42c902fc Author: Noel Grandin <n...@peralex.com> Date: Thu Oct 9 16:02:04 2014 +0300 move TRANSPARENT #define from windows.h out of global namespace so it doesn't conflict with enums Change-Id: Ic4143130762d6e878d7c23276393ba09d9f86d45 Reviewed-on: https://gerrit.libreoffice.org/11880 Tested-by: LibreOffice gerrit bot <ger...@libreoffice.org> Reviewed-by: Noel Grandin <noelgran...@gmail.com> diff --git a/include/postwin.h b/include/postwin.h index 8f9be89..d220520 100644 --- a/include/postwin.h +++ b/include/postwin.h @@ -27,6 +27,12 @@ #undef Folder #undef GradientStyle_RECT +// so it doesn't conflict with enum values +#undef TRANSPARENT +#undef OPAQUE +#define WIN32_TRANSPARENT 1 +#define WIN32_OPAQUE 2 + #define WIN_WB_LEFT 0 #define WIN_WB_RIGHT 1 #undef WB_LEFT diff --git a/vcl/win/source/gdi/salgdi.cxx b/vcl/win/source/gdi/salgdi.cxx index 778e4b2..80ce1fd 100644 --- a/vcl/win/source/gdi/salgdi.cxx +++ b/vcl/win/source/gdi/salgdi.cxx @@ -489,7 +489,7 @@ void ImplSalInitGraphics( WinSalGraphics* pData ) } ::SetTextAlign( pData->getHDC(), TA_BASELINE | TA_LEFT | TA_NOUPDATECP ); - ::SetBkMode( pData->getHDC(), TRANSPARENT ); + ::SetBkMode( pData->getHDC(), WIN32_TRANSPARENT ); ::SetROP2( pData->getHDC(), R2_COPYPEN ); } diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx index 5d5daab..2de8d58 100644 --- a/vcl/win/source/window/salframe.cxx +++ b/vcl/win/source/window/salframe.cxx @@ -3409,7 +3409,7 @@ static long ImplHandleKeyMsg( HWND hWnd, UINT nMsg, // as some tools such as RichWin may have changed it if ( pFrame->mpGraphics && pFrame->mpGraphics->getHDC() ) - SetBkMode( pFrame->mpGraphics->getHDC(), TRANSPARENT ); + SetBkMode( pFrame->mpGraphics->getHDC(), WIN32_TRANSPARENT ); // determine modifiers if ( GetKeyState( VK_SHIFT ) & 0x8000 ) @@ -5144,7 +5144,7 @@ static bool ImplHandleIMEComposition( HWND hWnd, LPARAM lParam ) // as some tools such as RichWin may have changed it if ( pFrame->mpGraphics && pFrame->mpGraphics->getHDC() ) - SetBkMode( pFrame->mpGraphics->getHDC(), TRANSPARENT ); + SetBkMode( pFrame->mpGraphics->getHDC(), WIN32_TRANSPARENT ); } if ( pFrame && pFrame->mbHandleIME ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits