diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-11-10 20:47:58 -0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 10:55:41 +0000 |
commit | 1a494d9a00208eef790400bdbd8b3e5c7fed4886 (patch) | |
tree | 9e305bbf11be0aacfa3af942a7c250f423b629a9 /vcl | |
parent | d7801c39826f2f24f7340e1b25809d3bb65d6099 (diff) |
Windows header sanitization
Isolation of windows headers using prewin.h
and postwin.h headers and making headers
dependent on them more self contained.
Conversion of TCHAR to WCHAR and
LPCTSTR to LPCWSTR etc. and cleanup
of unnecessary casts.
Change-Id: I7eff5c477d9223a064bfb4d962ff6d61960ee69c
Reviewed-on: https://gerrit.libreoffice.org/19901
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/sft.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/dibtools.cxx | 5 | ||||
-rw-r--r-- | vcl/win/source/app/salinst.cxx | 3 | ||||
-rw-r--r-- | vcl/win/source/gdi/gdiimpl.cxx | 8 | ||||
-rw-r--r-- | vcl/win/source/gdi/salbmp.cxx | 10 |
5 files changed, 12 insertions, 16 deletions
diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index 5d17e09ed8cc..220518c5e1f4 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -93,6 +93,7 @@ namespace vcl FW_EXTRABOLD = 800, /**< Extra-bold (Ultra-bold) */ FW_BLACK = 900 /**< Black (Heavy) */ }; +#endif /* FW_THIN */ /** Value of the width member of the TTGlobalFontInfo struct */ enum WidthClass { @@ -106,7 +107,6 @@ namespace vcl FWIDTH_EXTRA_EXPANDED = 8, /**< 150% of normal */ FWIDTH_ULTRA_EXPANDED = 9 /**< 200% of normal */ }; -#endif /* FW_THIN */ /** Type of the 'kern' table, stored in _TrueTypeFont::kerntype */ enum KernType { diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index 6095ff38fdfb..59db04c7456d 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -41,6 +41,9 @@ typedef sal_Int32 FXPT2DOT30; +// Avoid conflict with wingdi.h +namespace +{ struct CIEXYZ { FXPT2DOT30 aXyzX; @@ -141,7 +144,7 @@ struct DIBV5Header : public DIBInfoHeader ~DIBV5Header() {} }; - +} namespace { inline sal_uInt16 discretizeBitcount( sal_uInt16 nInputCount ) diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx index 8321ecfc473f..f8a96dad2754 100644 --- a/vcl/win/source/app/salinst.cxx +++ b/vcl/win/source/app/salinst.cxx @@ -63,6 +63,8 @@ #define GetObject GetObjectA #endif +#include "prewin.h" + #include <gdiplus.h> #include <gdiplusenums.h> #include <gdipluscolor.h> @@ -71,6 +73,7 @@ #ifdef _WIN32_WINNT_WINBLUE #include <VersionHelpers.h> #endif +#include "postwin.h" #ifdef __MINGW32__ #ifdef GetObject diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx index c6afb9d3c78d..ad5f22e597b0 100644 --- a/vcl/win/source/gdi/gdiimpl.cxx +++ b/vcl/win/source/gdi/gdiimpl.cxx @@ -48,9 +48,7 @@ #endif #endif -#if defined _MSC_VER -#pragma warning(push, 1) -#endif +#include "prewin.h" #ifdef __MINGW32__ #ifdef GetObject @@ -62,9 +60,7 @@ #include <gdiplusenums.h> #include <gdipluscolor.h> -#if defined _MSC_VER -#pragma warning(pop) -#endif +#include "postwin.h" #define SAL_POLYPOLYCOUNT_STACKBUF 8 #define SAL_POLYPOLYPOINTS_STACKBUF 64 diff --git a/vcl/win/source/gdi/salbmp.cxx b/vcl/win/source/gdi/salbmp.cxx index eeaa1cd49aec..3dc08c714701 100644 --- a/vcl/win/source/gdi/salbmp.cxx +++ b/vcl/win/source/gdi/salbmp.cxx @@ -39,15 +39,9 @@ #endif #endif -#if defined _MSC_VER -#pragma warning(push, 1) -#endif - +#include "prewin.h" #include <gdiplus.h> - -#if defined _MSC_VER -#pragma warning(pop) -#endif +#include "postwin.h" // - Inlines - |