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

2022-11-01 Thread Stephan Bergmann (via logerrit)
 include/postwin.h   |2 ++
 include/prewin.h|   11 +++
 vcl/win/app/salinst.cxx |9 -
 vcl/win/gdi/gdiimpl.cxx |9 -
 vcl/win/gdi/salbmp.cxx  |9 -
 5 files changed, 13 insertions(+), 27 deletions(-)

New commits:
commit c8fd1fb5535f2d8260d593631f77f1d2ed01b237
Author: Stephan Bergmann 
AuthorDate: Tue Nov 1 08:39:41 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Nov 1 18:27:00 2022 +0100

-Werror,-Wunused-macros (clang-cl)

...which started to hit me now either due to building against a recent 
Visual
Studio 2022 Preview 17.4 (which would presumably no longer define those 
macros
in some system headers, so that the #ifndef's started to kick in now), or 
due to
building against a more recent Windows SDK (see below), no idea which.

But just dropping the seemingly unused macro definitions from the various 
.cxx
caused builds against old Windows SDK versions like Jenkins
 to fail like

> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(479): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(480): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(481): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(482): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(503): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(504): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(505): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(506): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(667): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(668): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(669): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(670): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(691): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(692): error C3861: 'max': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(693): error C3861: 'min': 
identifier not found
> C:\Program Files (x86)\Windows 
Kits\10\Include\10.0.18362.0\um\GdiplusTypes.h(694): error C3861: 'min': 
identifier not found
[...]
> make[1]: *** 
[C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/solenv/gbuild/LinkTarget.mk:334:
 
C:/cygwin/home/tdf/jenkins/workspace/gerrit_windows/workdir/CxxObject/vcl/win/app/salinst.o]
 Error 2

so move those macro definitions to prewin.h (where they don't trigger 
clang-cl's
-Werror,-Wunused-macros from within an include file, even if they happen to 
be
unused in a translation unit).  (For simplicity, see whether it works in
practice to drop those #ifndef wrappers.  If they turn out to be relevant 
for
some build scenarios after all, they can be added back.)

Change-Id: I76d8794ae2de310bdca420e5488db2bc19de23ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142090
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/postwin.h b/include/postwin.h
index c6198ef21c5a..78523b87dcf8 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -51,6 +51,8 @@
 #undef WB_LEFT
 #undef WB_RIGHT
 #undef Yield
+#undef max
 #undef mciSetCommand
+#undef min
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/prewin.h b/include/prewin.h
index d6f2274451d5..3e19a842de5d 100644
--- a/include/prewin.h
+++ b/include/prewin.h
@@ -44,6 +44,17 @@
 
 #include 
 
+// For some old versions of the Windows SDK, at least GidplusTypes.h (as 
indirectly included from
+// gdiplus.h, which in turn we often include from between these 
prewin.h/postwin.h wrappers) expects
+// pre-existing min and max.  That is true for e.g.
+// C:/Program Files (x86)/Windows 
Kits/10/Include/10.0.19041.0/um/GdiplusTypes.h, but not for e.g.
+// C:/Program Files (x86)/Windows 
Kits/10/Include/10.0.22000.0/um/GdiplusTypes.h which explicitly
+// defines its own GDIPLUS_MIN/MAX macros.  The easiest fix appears to 

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

2022-10-27 Thread Stephan Bergmann (via logerrit)
 include/postwin.h |4 
 1 file changed, 4 deletions(-)

New commits:
commit 54b6536b1936f8bff43285ed43f51430ab30b4a2
Author: Stephan Bergmann 
AuthorDate: Thu Oct 27 15:52:38 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Oct 27 16:42:07 2022 +0200

Remove leftover INCLUDED_POSTWIN_H macro

...that had been added in 48b1c8898d2f5a54435d23c412a0c65b553ef46d "clang-cl
loplugin: vcl", apparently to avoid redeclaration warnings for some extern 
"C"
function, and had been left behind when that function declaration was 
removed in
3c443852d25a61b61353d630d8dc8753bad6ab30 "vcl: remove no longer needed
WIN_Rectangle()"

Change-Id: I2744122e8fefc56c75dbcb921e96b22025b6b766
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141909
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/include/postwin.h b/include/postwin.h
index 6b11c5827497..c6198ef21c5a 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -53,8 +53,4 @@
 #undef Yield
 #undef mciSetCommand
 
-#if !defined INCLUDED_POSTWIN_H && defined __cplusplus
-#define INCLUDED_POSTWIN_H
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


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

2019-04-06 Thread Mike Kaganski (via logerrit)
 include/postwin.h |   11 ---
 1 file changed, 11 deletions(-)

New commits:
commit e9ff7a041841b36e9db9d7cdfdef82ba2b0002b4
Author: Mike Kaganski 
AuthorDate: Sat Apr 6 18:45:35 2019 +0100
Commit: Mike Kaganski 
CommitDate: Sat Apr 6 21:21:29 2019 +0200

Remove obsolete checked defines

These are always defined when WINVER >= 0x0400; and we have it set to 0x0601
in solenv/gbuild/platform/windows.mk.

Change-Id: Ia1f6fa5589562fa710b4da3d288182d3f8a15e6b
Reviewed-on: https://gerrit.libreoffice.org/70348
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/postwin.h b/include/postwin.h
index 384950d68237..6b11c5827497 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -53,17 +53,6 @@
 #undef Yield
 #undef mciSetCommand
 
-/* new StretchBlt() Modes (simpler names) */
-#ifndef STRETCH_ANDSCANS
-#define STRETCH_ANDSCANS1
-#endif
-#ifndef STRETCH_ORSCANS
-#define STRETCH_ORSCANS 2
-#endif
-#ifndef STRETCH_DELETESCANS
-#define STRETCH_DELETESCANS 3
-#endif
-
 #if !defined INCLUDED_POSTWIN_H && defined __cplusplus
 #define INCLUDED_POSTWIN_H
 #endif
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

[Libreoffice-commits] core.git: include/postwin.h include/prewin.h vcl/Library_vcl.mk vcl/source vcl/win

2017-04-07 Thread Miklos Vajna
 include/postwin.h  |5 -
 include/prewin.h   |1 -
 vcl/Library_vcl.mk |1 -
 vcl/source/filter/ipdf/pdfread.cxx |6 --
 vcl/win/gdi/gdiimpl.cxx|4 ++--
 vcl/win/gdi/salprn.cxx |2 +-
 vcl/win/gdi/wntgdi.cxx |   37 -
 7 files changed, 3 insertions(+), 53 deletions(-)

New commits:
commit 3c443852d25a61b61353d630d8dc8753bad6ab30
Author: Miklos Vajna 
Date:   Fri Apr 7 08:56:18 2017 +0200

vcl: remove no longer needed WIN_Rectangle()

Not needed anymore after commit a5a571307fb3306b74ab46b085cde6388270a770
(tdf#82580 tools: rename Rectangle to tools::Rectangle, 2017-03-30).

Change-Id: I25a11ca0b6c2e9e96847bd01b5e82835d1dd4a95

diff --git a/include/postwin.h b/include/postwin.h
index b2df82374da8..384950d68237 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -45,7 +45,6 @@
 #undef OUT
 #undef PASSTHROUGH
 #undef RELATIVE
-#undef Rectangle
 #undef STRICT
 #undef SetPort
 #undef SetPrinter
@@ -67,10 +66,6 @@
 
 #if !defined INCLUDED_POSTWIN_H && defined __cplusplus
 #define INCLUDED_POSTWIN_H
-extern "C"
-{
-BOOL WINAPI WIN_Rectangle( HDC hDC, int X1, int Y1, int X2, int Y2 );
-}
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/prewin.h b/include/prewin.h
index 17e27e352c92..38b2f29f387c 100644
--- a/include/prewin.h
+++ b/include/prewin.h
@@ -21,7 +21,6 @@
 
 #if defined(_WIN32)
 
-#define RectangleBLA_Rectangle
 #define Folder   WIN_Folder
 #define GradientStyle_RECT  WIN_GradientStyle_RECT
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index a49eade8083c..246163c872bc 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -696,7 +696,6 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/win/gdi/salprn \
 vcl/win/gdi/salvd \
 vcl/win/gdi/winlayout \
-vcl/win/gdi/wntgdi \
 vcl/win/window/salframe \
 vcl/win/window/keynames \
 vcl/win/window/salmenu \
diff --git a/vcl/source/filter/ipdf/pdfread.cxx 
b/vcl/source/filter/ipdf/pdfread.cxx
index f11f55a0b0f7..b2f68d02b07e 100644
--- a/vcl/source/filter/ipdf/pdfread.cxx
+++ b/vcl/source/filter/ipdf/pdfread.cxx
@@ -12,14 +12,8 @@
 #include 
 
 #if HAVE_FEATURE_PDFIUM
-#ifdef WNT
-#include 
-#endif
 #include 
 #include 
-#ifdef WNT
-#include 
-#endif
 #endif
 
 #include 
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index c2278538f582..b5d32a35bd2c 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -910,7 +910,7 @@ void WinSalGraphicsImpl::invert( long nX, long nY, long 
nWidth, long nHeight, Sa
 HBRUSH  hOldBrush = SelectBrush( mrParent.getHDC(), GetStockBrush( 
NULL_BRUSH ) );
 int nOldROP = SetROP2( mrParent.getHDC(), R2_NOT );
 
-WIN_Rectangle( mrParent.getHDC(), (int)nX, (int)nY, (int)(nX+nWidth), 
(int)(nY+nHeight) );
+Rectangle( mrParent.getHDC(), (int)nX, (int)nY, (int)(nX+nWidth), 
(int)(nY+nHeight) );
 
 SetROP2( mrParent.getHDC(), nOldROP );
 SelectPen( mrParent.getHDC(), hOldPen );
@@ -1661,7 +1661,7 @@ void WinSalGraphicsImpl::drawRect( long nX, long nY, long 
nWidth, long nHeight )
 }
 }
 else
-WIN_Rectangle( mrParent.getHDC(), (int)nX, (int)nY, (int)(nX+nWidth), 
(int)(nY+nHeight) );
+Rectangle( mrParent.getHDC(), (int)nX, (int)nY, (int)(nX+nWidth), 
(int)(nY+nHeight) );
 }
 
 void WinSalGraphicsImpl::drawPolyLine( sal_uInt32 nPoints, const SalPoint* 
pPtAry )
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 00e88b09560a..860351c3e990 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -1609,7 +1609,7 @@ SalGraphics* WinSalPrinter::StartPage( ImplJobSetup* 
pSetupData, bool bNewJobDat
 // TODO: move into ImplCreateSalPrnGraphics()?
 HPENhTempPen = SelectPen( hDC, GetStockPen( NULL_PEN ) );
 HBRUSH  hTempBrush = SelectBrush( hDC, GetStockBrush( NULL_BRUSH ) );
-WIN_Rectangle( hDC, -8000, -8000, -7999, -7999 );
+Rectangle( hDC, -8000, -8000, -7999, -7999 );
 SelectPen( hDC, hTempPen );
 SelectBrush( hDC, hTempBrush );
 
diff --git a/vcl/win/gdi/wntgdi.cxx b/vcl/win/gdi/wntgdi.cxx
deleted file mode 100644
index bf0ad25fe860..
--- a/vcl/win/gdi/wntgdi.cxx
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information rega

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

2016-10-07 Thread Stephan Bergmann
 include/postwin.h |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6e98009240b492fda7cfbbdf0e8a01773eeffe64
Author: Stephan Bergmann 
Date:   Fri Oct 7 17:01:24 2016 +0200

More blind fix for --enable-pch Windows builds

Change-Id: Iaa9f697270fe47c30170925f4c66092c15efa4bf

diff --git a/include/postwin.h b/include/postwin.h
index 8a17ae5..95cd6f8 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -23,6 +23,7 @@
 #undef CompareString
 #undef CopyFile
 #undef DELETE
+#undef DocumentProperties
 #undef DrawText
 #undef FindWindow
 #undef Folder
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-12-07 Thread Stephan Bergmann
 include/postwin.h |   74 ++
 1 file changed, 26 insertions(+), 48 deletions(-)

New commits:
commit 8a086a2c08efe2037957b959109e72b8bb3e27b7
Author: Stephan Bergmann 
Date:   Mon Dec 7 08:30:32 2015 +0100

Sort undefs

Change-Id: I20940822c482d4edab8a5d4b5aaf75ba58817898

diff --git a/include/postwin.h b/include/postwin.h
index e1e151d..8a17ae5 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -19,61 +19,39 @@
 
 /* not protected, do only include once! */
 
-#undef Rectangle
-#undef DELETE
-#undef OPTIONAL
-#undef PASSTHROUGH
-#undef STRICT
 #undef ABSOLUTE
-#undef RELATIVE
+#undef CompareString
+#undef CopyFile
+#undef DELETE
+#undef DrawText
+#undef FindWindow
+#undef Folder
+#undef GetCharWidth
+#undef GetClassName
+#undef GetGlyphOutline
+#undef GetKerningPairs
+#undef GetMetaFile
+#undef GetNumberFormat
+#undef GetObject
+#undef GetPrinter
+#undef GetTimeFormat
+#undef GetUserName
+#undef GradientStyle_RECT
 #undef IGNORE
 #undef IN
+#undef OPAQUE // so it doesn't conflict with enum values
+#undef OPTIONAL
 #undef OUT
-
-#undef Folder
-#undef GradientStyle_RECT
-
-// so it doesn't conflict with enum values
-#undef OPAQUE
-
+#undef PASSTHROUGH
+#undef RELATIVE
+#undef Rectangle
+#undef STRICT
+#undef SetPort
+#undef SetPrinter
 #undef WB_LEFT
 #undef WB_RIGHT
-
-#undef GetObject
-
-#undef SetPrinter
-
-#undef GetPrinter
-
-#undef DrawText
-
-#undef mciSetCommand
-
-#undef SetPort
-
-#undef CopyFile
-
-#undef GetUserName
-
-#undef GetClassName
-
-#undef GetCharWidth
-
-#undef GetMetaFile
-
-#undef GetNumberFormat
-
-#undef GetGlyphOutline
-
-#undef GetKerningPairs
-
-#undef FindWindow
-
 #undef Yield
-
-#undef GetTimeFormat
-
-#undef CompareString
+#undef mciSetCommand
 
 /* new StretchBlt() Modes (simpler names) */
 #ifndef STRETCH_ANDSCANS
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-03-23 Thread Stephan Bergmann
 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 
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_DrawTextDrawTextW
-#else
-#define WIN_DrawTextDrawTextA
-#endif
-#else
-#define WIN_DrawTextDrawText
-#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_CopyFileCopyFileW
-#else
-#define WIN_CopyFileCopyFileA
-#endif
-#else
-#define WIN_CopyFileCopyFile
-#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 
 #include 
+#include 
 #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 );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-10-09 Thread Noel Grandin
 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 
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 
Reviewed-by: Noel Grandin 

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


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

2014-01-24 Thread Stephan Bergmann
 include/postwin.h |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 33d91958b4a10692de9f028d2303840e7a848bf2
Author: Stephan Bergmann 
Date:   Fri Jan 24 16:02:01 2014 +0100

Unbreak Windows build

Change-Id: Iaf4c3183a23d80db0576c8411867aa6476d5b39f

diff --git a/include/postwin.h b/include/postwin.h
index 86f27ad..d5cf912 100644
--- a/include/postwin.h
+++ b/include/postwin.h
@@ -24,6 +24,7 @@
 #undef Polygon
 #undef Rectangle
 #undef DELETE
+#undef OPTIONAL
 
 #undef Folder
 #undef GradientStyle_RECT
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits