[Libreoffice-commits] core.git: bridges/source desktop/util desktop/win32 dtrans/source hwpfilter/source include/default.rc include/prewin.h jurt/source sal/osl setup_native/source shell/inc shell/source vcl/win

Mike Kaganski mike.kaganski at collabora.com
Sat Sep 16 18:16:41 UTC 2017


 bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx           |    1 +
 bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx              |    1 +
 desktop/util/officeloader.rc                                   |    1 +
 desktop/win32/source/applauncher/launcher.hxx                  |    1 +
 desktop/win32/source/applauncher/launcher.rc                   |    1 +
 desktop/win32/source/officeloader/officeloader.cxx             |    1 +
 dtrans/source/win32/dtobj/TxtCnvtHlp.hxx                       |    1 +
 hwpfilter/source/htags.h                                       |    3 +++
 hwpfilter/source/precompile.h                                  |    1 +
 include/default.rc                                             |    1 +
 include/prewin.h                                               |    1 +
 jurt/source/pipe/wrapper/wrapper.c                             |    1 +
 sal/osl/w32/file-impl.hxx                                      |    1 +
 sal/osl/w32/filetime.hxx                                       |    1 +
 setup_native/source/win32/customactions/tools/checkversion.cxx |    1 +
 setup_native/source/win32/customactions/tools/seterror.cxx     |    1 +
 shell/inc/global.hxx                                           |    3 +++
 shell/inc/utilities.hxx                                        |    3 +++
 shell/source/tools/regsvrex/regsvrex.cxx                       |    1 +
 vcl/win/gdi/salprn.cxx                                         |    8 ++++++++
 20 files changed, 33 insertions(+)

New commits:
commit 3128668599744b4fd63c9eebbeb3e9e4533b66df
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Fri Sep 15 19:45:21 2017 +0300

    Use more WIN32_LEAN_AND_MEAN
    
    https://msdn.microsoft.com/en-us/aa383745
    
    Change-Id: I83528dc8e6a5e119e7aa816219d35f1ea3723b96
    Reviewed-on: https://gerrit.libreoffice.org/42338
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx
index e71238cce721..31c7b34ac64e 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/dllinit.cxx
@@ -19,6 +19,7 @@
 
 
 #pragma warning(push,1) // disable warnings within system headers
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #pragma warning(pop)
 
diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx b/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
index 3cf882cef0aa..393e50b818ed 100644
--- a/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
+++ b/bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx
@@ -20,6 +20,7 @@
 #define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MSVC_WIN32_X86_64_MSCX_HXX
 
 #pragma warning(push, 1)
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #pragma warning(pop)
 
diff --git a/desktop/util/officeloader.rc b/desktop/util/officeloader.rc
index a7d65d2cae65..24df276cab58 100644
--- a/desktop/util/officeloader.rc
+++ b/desktop/util/officeloader.rc
@@ -16,6 +16,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include "version.hrc"
 
diff --git a/desktop/win32/source/applauncher/launcher.hxx b/desktop/win32/source/applauncher/launcher.hxx
index fdd651042481..e28cc7466e43 100644
--- a/desktop/win32/source/applauncher/launcher.hxx
+++ b/desktop/win32/source/applauncher/launcher.hxx
@@ -19,6 +19,7 @@
 
 #pragma once
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
 extern WCHAR APPLICATION_SWITCH[];
diff --git a/desktop/win32/source/applauncher/launcher.rc b/desktop/win32/source/applauncher/launcher.rc
index f717bcba14a2..b76518d7a56a 100644
--- a/desktop/win32/source/applauncher/launcher.rc
+++ b/desktop/win32/source/applauncher/launcher.rc
@@ -16,6 +16,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include "version.hrc"
 
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index c6987a72ec99..338a5fb8db96 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -20,6 +20,7 @@
 #include <cstddef>
 
 #include <systools/win32/uwinapi.h>
+#include <stdlib.h>
 #include <desktop/exithelper.h>
 
 #include "../loader.hxx"
diff --git a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
index b87256b42bca..4ac0e29e96d2 100644
--- a/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
+++ b/dtrans/source/win32/dtobj/TxtCnvtHlp.hxx
@@ -27,6 +27,7 @@
 #if defined _MSC_VER
 #pragma warning(push,1)
 #endif
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #if defined _MSC_VER
 #pragma warning(pop)
diff --git a/hwpfilter/source/htags.h b/hwpfilter/source/htags.h
index e306373c6812..2bf52b66a96f 100644
--- a/hwpfilter/source/htags.h
+++ b/hwpfilter/source/htags.h
@@ -21,6 +21,9 @@
 #define INCLUDED_HWPFILTER_SOURCE_HTAGS_H
 
 #include <memory>
+#ifdef _WIN32
+#  include <objidl.h>
+#endif
 
 class HWPFile;
 /**
diff --git a/hwpfilter/source/precompile.h b/hwpfilter/source/precompile.h
index d10749cb1f47..218b9160edf6 100644
--- a/hwpfilter/source/precompile.h
+++ b/hwpfilter/source/precompile.h
@@ -21,6 +21,7 @@
     #if defined _MSC_VER
         #pragma warning(push, 1)
     #endif
+    #define WIN32_LEAN_AND_MEAN
     #include "windows.h"
     #include "crtdbg.h"
     #if defined _MSC_VER
diff --git a/include/default.rc b/include/default.rc
index 782baab0bc22..5474d55c4c0a 100644
--- a/include/default.rc
+++ b/include/default.rc
@@ -16,6 +16,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include "version.hrc"
 
diff --git a/include/prewin.h b/include/prewin.h
index 38b2f29f387c..f0371654c2c6 100644
--- a/include/prewin.h
+++ b/include/prewin.h
@@ -39,6 +39,7 @@
 #   pragma warning (disable: 4005)
 #endif
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
 #ifdef _MSC_VER
diff --git a/jurt/source/pipe/wrapper/wrapper.c b/jurt/source/pipe/wrapper/wrapper.c
index 632b19afa08a..bb36814f5913 100644
--- a/jurt/source/pipe/wrapper/wrapper.c
+++ b/jurt/source/pipe/wrapper/wrapper.c
@@ -21,6 +21,7 @@
 
 #include <stddef.h>
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
 #include "jni.h"
diff --git a/sal/osl/w32/file-impl.hxx b/sal/osl/w32/file-impl.hxx
index a34e43301eb0..4db7b3eb257b 100644
--- a/sal/osl/w32/file-impl.hxx
+++ b/sal/osl/w32/file-impl.hxx
@@ -15,6 +15,7 @@
 #include <osl/file.h>
 #include <sal/types.h>
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
 extern "C" oslFileHandle SAL_CALL osl_createFileHandleFromOSHandle(
diff --git a/sal/osl/w32/filetime.hxx b/sal/osl/w32/filetime.hxx
index 0f47ebf5e3fe..cb7dd5d3a31e 100644
--- a/sal/osl/w32/filetime.hxx
+++ b/sal/osl/w32/filetime.hxx
@@ -12,6 +12,7 @@
 
 #include <sal/config.h>
 
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 
 #include <osl/time.h>
diff --git a/setup_native/source/win32/customactions/tools/checkversion.cxx b/setup_native/source/win32/customactions/tools/checkversion.cxx
index fdd3d91242ee..2ad7267b571f 100644
--- a/setup_native/source/win32/customactions/tools/checkversion.cxx
+++ b/setup_native/source/win32/customactions/tools/checkversion.cxx
@@ -22,6 +22,7 @@
 #ifdef _MSC_VER
 #pragma warning(push,1) // disable warnings within system headers
 #endif
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <msiquery.h>
 #ifdef _MSC_VER
diff --git a/setup_native/source/win32/customactions/tools/seterror.cxx b/setup_native/source/win32/customactions/tools/seterror.cxx
index 09aae2202ac7..d7aa3639fb00 100644
--- a/setup_native/source/win32/customactions/tools/seterror.cxx
+++ b/setup_native/source/win32/customactions/tools/seterror.cxx
@@ -22,6 +22,7 @@
 #ifdef _MSC_VER
 #pragma warning(push,1) // disable warnings within system headers
 #endif
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #ifdef _MSC_VER
 #pragma warning(pop)
diff --git a/shell/inc/global.hxx b/shell/inc/global.hxx
index 59696523a740..24dd2e0d664c 100644
--- a/shell/inc/global.hxx
+++ b/shell/inc/global.hxx
@@ -23,6 +23,9 @@
 #if defined _MSC_VER
 #pragma warning(push, 1)
 #endif
+#if !defined WIN32_LEAN_AND_MEAN
+#  define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #if defined _MSC_VER
 #pragma warning(pop)
diff --git a/shell/inc/utilities.hxx b/shell/inc/utilities.hxx
index 9d772ec9872a..d72f6b66fdd9 100644
--- a/shell/inc/utilities.hxx
+++ b/shell/inc/utilities.hxx
@@ -24,6 +24,9 @@
 #if defined _MSC_VER
 #pragma warning(push, 1)
 #endif
+#if !defined WIN32_LEAN_AND_MEAN
+  #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #if defined _MSC_VER
 #pragma warning(pop)
diff --git a/shell/source/tools/regsvrex/regsvrex.cxx b/shell/source/tools/regsvrex/regsvrex.cxx
index c4f2e053ded6..0add6ae1788e 100644
--- a/shell/source/tools/regsvrex/regsvrex.cxx
+++ b/shell/source/tools/regsvrex/regsvrex.cxx
@@ -21,6 +21,7 @@
 #if defined _MSC_VER
 #pragma warning(push, 1)
 #endif
+#define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #if defined _MSC_VER
 #pragma warning(pop)
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index f9b11d46b39c..365bf44c06e4 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -49,6 +49,14 @@
 
 #include <malloc.h>
 
+#include <winspool.h>
+#if defined GetDefaultPrinter
+#  undef GetDefaultPrinter
+#endif
+#if defined SetPrinterData
+#  undef SetPrinterData
+#endif
+
 #define CATCH_DRIVER_EX_BEGIN                                               \
     __try                                                                   \
     {


More information about the Libreoffice-commits mailing list