[Libreoffice-commits] core.git: 4 commits - include/postwin.h vcl/win

Tor Lillqvist tml at collabora.com
Sat Aug 16 08:54:32 PDT 2014


 include/postwin.h             |   18 ------------------
 vcl/win/source/gdi/salbmp.cxx |   19 +++----------------
 2 files changed, 3 insertions(+), 34 deletions(-)

New commits:
commit a8669b56b194a7cd6da771dfb9904710da24c0b4
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Aug 16 11:48:48 2014 +0300

    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

diff --git a/include/postwin.h b/include/postwin.h
index a76bcb8..64ac27e 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -34,16 +34,7 @@
 #undef WB_LEFT
 #undef WB_RIGHT
 
-#ifdef GetObject
 #undef GetObject
-#ifdef UNICODE
-#define WIN_GetObject   GetObjectW
-#else
-#define WIN_GetObject   GetObjectA
-#endif
-#else
-#define WIN_GetObject   GetObject
-#endif
 
 #ifdef SetPrinter
 #undef SetPrinter
diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx
index 2bccbd7..9121444 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 )
commit bc19caa4f17ccbcd6e08634ae635fd9c741473ad
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Aug 16 11:08:22 2014 +0300

    WIN_MOUSE_MOVED and MOUSE_MOVED are unused
    
    Change-Id: I1edfa97d9874c70fcc61d1b521c905fb499a9bd1

diff --git a/include/postwin.h b/include/postwin.h
index fd39b90..a76bcb8 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -29,9 +29,6 @@
 #undef Folder
 #undef GradientStyle_RECT
 
-#define WIN_MOUSE_MOVED 0x0001
-#undef MOUSE_MOVED
-
 #define WIN_WB_LEFT               0
 #define WIN_WB_RIGHT              1
 #undef WB_LEFT
commit 05d53a3fbd7cd2d23975700ad38d2a69a2fdddee
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Aug 16 10:52:25 2014 +0300

    WIN_HELP_HELPONHELP and HELP_HELPONHELP are unused
    
    Change-Id: I54830ba65961f8f7ab6fa3555a1e6021b14cdb1c

diff --git a/include/postwin.h b/include/postwin.h
index 68c4f5c..fd39b90 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -29,10 +29,6 @@
 #undef Folder
 #undef GradientStyle_RECT
 
-/* rename help IDs */
-#define WIN_HELP_HELPONHELP  0x0004
-#undef HELP_HELPONHELP
-
 #define WIN_MOUSE_MOVED 0x0001
 #undef MOUSE_MOVED
 
commit 3fb98875ead1e8ec24f79445f83cfd28f2800a31
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Aug 16 10:29:17 2014 +0300

    WIN_HELP_INDEX and HELP_INDEX are unused
    
    Change-Id: Icc2c34f51601304e2846d8bd9fce2f384327a4e2

diff --git a/include/postwin.h b/include/postwin.h
index f494b23..68c4f5c 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -30,9 +30,7 @@
 #undef GradientStyle_RECT
 
 /* rename help IDs */
-#define WIN_HELP_INDEX       0x0003
 #define WIN_HELP_HELPONHELP  0x0004
-#undef HELP_INDEX
 #undef HELP_HELPONHELP
 
 #define WIN_MOUSE_MOVED 0x0001


More information about the Libreoffice-commits mailing list