[Libreoffice-commits] core.git: include/postwin.h include/vcl vcl/win
Stephan Bergmann
sbergman at redhat.com
Mon Mar 23 07:40:06 PDT 2015
include/postwin.h | 127 -------------------------------------
include/vcl/sysdata.hxx | 2
vcl/win/source/window/salframe.cxx | 2
3 files changed, 3 insertions(+), 128 deletions(-)
New commits:
commit 8edf711eb2f39c7779f2d39938d786befea1c49b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Mar 23 15:36:47 2015 +0100
Avoid KeyFuncType::DELETE shadowed by a macro on Windows
...required to remove the WIN_* defines from postwin.h, so that the latter can
be included multiple times; the WIN_* defines appeared to be unused except for
one use of WND_FindWindow anyway
Change-Id: I2080225c74c196fbc1b7d4f20b636b44e1e12150
diff --git a/include/postwin.h b/include/postwin.h
index 6fa0c36..555478d 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -37,160 +37,33 @@
#undef GetObject
-#ifdef SetPrinter
#undef SetPrinter
-#ifdef UNICODE
-#define WIN_SetPrinter SetPrinterW
-#else
-#define WIN_SetPrinter SetPrinterA
-#endif
-#else
-#define WIN_SetPrinter SetPrinter
-#endif
-#ifdef GetPrinter
#undef GetPrinter
-#ifdef UNICODE
-#define WIN_GetPrinter GetPrinterW
-#else
-#define WIN_GetPrinter GetPrinterA
-#endif
-#else
-#define WIN_GetPrinter GetPrinter
-#endif
-#ifdef DrawText
#undef DrawText
-#ifdef UNICODE
-#define WIN_DrawText DrawTextW
-#else
-#define WIN_DrawText DrawTextA
-#endif
-#else
-#define WIN_DrawText DrawText
-#endif
-#ifdef mciSetCommand
#undef mciSetCommand
-#ifdef UNICODE
-#define WIN_mciSetCommand mciSetCommandW
-#else
-#define WIN_mciSetCommand mciSetCommandA
-#endif
-#else
-#define mciSetCommand mciSetCommand
-#endif
-#ifdef SetPort
#undef SetPort
-#ifdef UNICODE
-#define WIN_SetPort SetPortW
-#else
-#define WIN_SetPort SetPortA
-#endif
-#else
-#define WIN_SetPort SetPort
-#endif
-#ifdef CopyFile
#undef CopyFile
-#ifdef UNICODE
-#define WIN_CopyFile CopyFileW
-#else
-#define WIN_CopyFile CopyFileA
-#endif
-#else
-#define WIN_CopyFile CopyFile
-#endif
-
-#ifdef GetUserName
#undef GetUserName
-#ifdef UNICODE
-#define WIN_GetUserName GetUserNameW
-#else
-#define WIN_GetUserName GetUserNameA
-#endif
-#else
-#define WIN_GetUserName GetUserName
-#endif
-#ifdef GetClassName
#undef GetClassName
-#ifdef UNICODE
-#define WIN_GetClassName GetClassNameW
-#else
-#define WIN_GetClassName GetClassNameA
-#endif
-#else
-#define WIN_GetClassName GetClassName
-#endif
-#ifdef GetCharWidth
#undef GetCharWidth
-#ifdef UNICODE
-#define WIN_GetCharWidth GetCharWidthW
-#else
-#define WIN_GetCharWidth GetCharWidthA
-#endif
-#else
-#define WIN_GetCharWidth GetCharWidth
-#endif
-#ifdef GetMetaFile
#undef GetMetaFile
-#ifdef UNICODE
-#define WIN_GetMetaFile GetMetaFileW
-#else
-#define WIN_GetMetaFile GetMetaFileA
-#endif
-#else
-#define WIN_GetMetaFile GetMetaFile
-#endif
-#ifdef GetNumberFormat
#undef GetNumberFormat
-#ifdef UNICODE
-#define WIN_GetNumberFormat GetNumberFormatW
-#else
-#define WIN_GetNumberFormat GetNumberFormatA
-#endif
-#else
-#define WIN_GetNumberFormat GetNumberFormat
-#endif
-#ifdef GetGlyphOutline
#undef GetGlyphOutline
-#ifdef UNICODE
-#define WIN_GetGlyphOutline GetGlyphOutlineW
-#else
-#define WIN_GetGlyphOutline GetGlyphOutlineA
-#endif
-#else
-#define WIN_GetGlyphOutline GetGlyphOutline
-#endif
-#ifdef GetKerningPairs
#undef GetKerningPairs
-#ifdef UNICODE
-#define WIN_GetKerningPairs GetKerningPairsW
-#else
-#define WIN_GetKerningPairs GetKerningPairsA
-#endif
-#else
-#define WIN_GetKerningPairs GetKerningPairs
-#endif
-#ifdef FindWindow
#undef FindWindow
-#ifdef UNICODE
-#define WIN_FindWindow FindWindowW
-#else
-#define WIN_FindWindow FindWindowA
-#endif
-#else
-#define WIN_FindWindow FindWindow
-#endif
#undef Yield
diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index e8b7a25..a4fad69 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -41,7 +41,9 @@ typedef struct CGContext *CGContextRef;
#endif
#if defined( WNT )
+#include <prewin.h>
#include <windef.h>
+#include <postwin.h>
#endif
struct SystemEnvData
diff --git a/vcl/win/source/window/salframe.cxx b/vcl/win/source/window/salframe.cxx
index fbd82f0..1544b2f 100644
--- a/vcl/win/source/window/salframe.cxx
+++ b/vcl/win/source/window/salframe.cxx
@@ -678,7 +678,7 @@ static const sal_uInt16 aImplTranslateKeyTab[KEY_TAB_SIZE] =
static UINT ImplSalGetWheelScrollLines()
{
UINT nScrLines = 0;
- HWND hWndMsWheel = WIN_FindWindow( MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE );
+ HWND hWndMsWheel = FindWindowA( MSH_WHEELMODULE_CLASS, MSH_WHEELMODULE_TITLE );
if ( hWndMsWheel )
{
UINT nGetScrollLinesMsgId = RegisterWindowMessage( MSH_SCROLL_LINES );
More information about the Libreoffice-commits
mailing list