diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-08-16 11:48:48 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-08-16 18:45:57 +0300 |
commit | a8669b56b194a7cd6da771dfb9904710da24c0b4 (patch) | |
tree | 4ccf0d74b1a8170a51fab26fecc39c115c3174ce /vcl | |
parent | bc19caa4f17ccbcd6e08634ae635fd9c741473ad (diff) |
fdo#82580: Win32 GetObject() simplification
We call the Win32 GetObject() in just one source file and there it is
the A version we mean. (As such, as we call it to get BITMAP objects,
which do not have different A and W variants, we could as well call
GetObjectW().)
Note that we have several own member functions called GetObject(), so
until those are renamed we still need to #undef the GetObject
definition (from <windows.h>).
(No, I am not working on the EasyHack fdo#82580 as a whole. It is
intended for some less mature LO contributor. I just did a few small
things because I couldn't resist.)
Change-Id: Idab79503b3d899ef19f0608677752a62b20302ff
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index 2bccbd797560..912144401069 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -43,21 +43,8 @@ #pragma warning(push, 1) #endif -#ifdef __MINGW32__ -#ifdef GetObject -#undef GetObject -#endif -#define GetObject GetObjectA -#endif - #include <gdiplus.h> -#ifdef __MINGW32__ -#ifdef GetObject -#undef GetObject -#endif -#endif - #if defined _MSC_VER #pragma warning(pop) #endif @@ -555,7 +542,7 @@ bool WinSalBitmap::Create( HANDLE hBitmap, bool bDIB, bool bCopyHandle ) { BITMAP aDDBInfo; - if( WIN_GetObject( mhDDB, sizeof( BITMAP ), &aDDBInfo ) ) + if( GetObjectA( mhDDB, sizeof( BITMAP ), &aDDBInfo ) ) { maSize = Size( aDDBInfo.bmWidth, aDDBInfo.bmHeight ); mnBitCount = aDDBInfo.bmPlanes * aDDBInfo.bmBitsPixel; @@ -651,7 +638,7 @@ bool WinSalBitmap::Create( const SalBitmap& rSSalBmp, SalGraphics* pSGraphics ) GlobalUnlock( rSalBmp.mhDIB ); - if( hNewDDB && WIN_GetObject( hNewDDB, sizeof( BITMAP ), &aDDBInfo ) ) + if( hNewDDB && GetObjectA( hNewDDB, sizeof( BITMAP ), &aDDBInfo ) ) { mhDDB = hNewDDB; maSize = Size( aDDBInfo.bmWidth, aDDBInfo.bmHeight ); @@ -839,7 +826,7 @@ HANDLE WinSalBitmap::ImplCopyDIBOrDDB( HANDLE hHdl, bool bDIB ) BITMAP aBmp; // find out size of source bitmap - WIN_GetObject( hHdl, sizeof( BITMAP ), (LPSTR) &aBmp ); + GetObjectA( hHdl, sizeof( BITMAP ), (LPSTR) &aBmp ); // create destination bitmap if ( (hCopy = CreateBitmapIndirect( &aBmp )) != 0 ) |