diff options
58 files changed, 182 insertions, 11 deletions
diff --git a/avmedia/source/vlc/wrapper/SymbolLoader.hxx b/avmedia/source/vlc/wrapper/SymbolLoader.hxx index b26afe376615..a4e941f60afe 100644 --- a/avmedia/source/vlc/wrapper/SymbolLoader.hxx +++ b/avmedia/source/vlc/wrapper/SymbolLoader.hxx @@ -10,6 +10,9 @@ #ifndef INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_SYMBOLLOADER_HXX #define INCLUDED_AVMEDIA_SOURCE_VLC_WRAPPER_SYMBOLLOADER_HXX #if defined(_WIN32) +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif # include <windows.h> # include <winreg.h> #endif diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx index a8d5c7c9410c..97470dd515a5 100644 --- a/basic/qa/cppunit/test_vba.cxx +++ b/basic/qa/cppunit/test_vba.cxx @@ -13,6 +13,9 @@ #ifdef _WIN32 #include <string.h> +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <odbcinst.h> #endif diff --git a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx index 356f36092e31..497c4fbe6347 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/dllinit.cxx @@ -18,6 +18,9 @@ */ +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #pragma warning(push,1) // disable warnings within system headers #include <windows.h> #pragma warning(pop) diff --git a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx b/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx index dfde0de49fc5..57f51f2d6bce 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/msci.hxx @@ -19,6 +19,9 @@ #ifndef INCLUDED_BRIDGES_SOURCE_CPP_UNO_MSVC_WIN32_INTEL_MSCI_HXX #define INCLUDED_BRIDGES_SOURCE_CPP_UNO_MSVC_WIN32_INTEL_MSCI_HXX +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #pragma warning(push, 1) #include <windows.h> #pragma warning(pop) diff --git a/chart2/source/view/charttypes/GL3DBarChart.cxx b/chart2/source/view/charttypes/GL3DBarChart.cxx index c0085bdf49df..dd04becc8203 100644 --- a/chart2/source/view/charttypes/GL3DBarChart.cxx +++ b/chart2/source/view/charttypes/GL3DBarChart.cxx @@ -22,6 +22,9 @@ #include <osl/time.h> #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #endif #include <memory> diff --git a/cli_ure/source/native/native_bootstrap.cxx b/cli_ure/source/native/native_bootstrap.cxx index 2ff980fa776f..19b83fa4eb91 100644 --- a/cli_ure/source/native/native_bootstrap.cxx +++ b/cli_ure/source/native/native_bootstrap.cxx @@ -24,6 +24,9 @@ #ifdef _MSC_VER #pragma warning(push, 1) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #ifdef _MSC_VER #pragma warning(pop) diff --git a/cli_ure/source/uno_bridge/cli_bridge.cxx b/cli_ure/source/uno_bridge/cli_bridge.cxx index 615941b3f36a..93e51058a170 100644 --- a/cli_ure/source/uno_bridge/cli_bridge.cxx +++ b/cli_ure/source/uno_bridge/cli_bridge.cxx @@ -20,6 +20,9 @@ #include <vcclr.h> //ToDo: remove when build with .NET 2 #pragma warning(push, 1) +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include "uno/environment.hxx" #pragma warning(pop) diff --git a/cli_ure/source/uno_bridge/cli_data.cxx b/cli_ure/source/uno_bridge/cli_data.cxx index c7c027691a08..e51c833714ae 100644 --- a/cli_ure/source/uno_bridge/cli_data.cxx +++ b/cli_ure/source/uno_bridge/cli_data.cxx @@ -18,7 +18,11 @@ */ #pragma warning(push, 1) +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include "windows.h" +#include <ole2.h> #pragma warning(pop) #include <memory> diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx index a82aa90e545f..328d377dada3 100644 --- a/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx +++ b/connectivity/source/drivers/mozab/bootstrap/MNSFolders.cxx @@ -26,6 +26,9 @@ #endif // End UNIX #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <stdlib.h> #include <shlobj.h> diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx index 58e779907ea8..59e5b67c4424 100644 --- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx +++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx @@ -27,6 +27,9 @@ #pragma warning(disable:4005) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <shellapi.h> #include <sqlext.h> diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx index 97ff3bcf3c60..a4b3114cf3bb 100644 --- a/desktop/source/app/cmdlinehelp.cxx +++ b/desktop/source/app/cmdlinehelp.cxx @@ -27,6 +27,9 @@ #include "cmdlinehelp.hxx" #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include "windows.h" #include "io.h" #include "fcntl.h" diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index d6b620e1e69b..05f4dade58a0 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -85,6 +85,9 @@ #pragma warning (push, 1) #pragma warning (disable: 4005) #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/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx index 47aa5fb72d2c..11530d0be892 100644 --- a/desktop/source/deployment/misc/lockfile.cxx +++ b/desktop/source/deployment/misc/lockfile.cxx @@ -26,6 +26,9 @@ #ifndef _WIN32 #include <unistd.h> #else +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #endif #include <comphelper/random.hxx> diff --git a/dtrans/source/win32/clipb/WinClipbImpl.cxx b/dtrans/source/win32/clipb/WinClipbImpl.cxx index 548a7ff4c5aa..c5030883900c 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.cxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.cxx @@ -31,6 +31,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> #include <ole2.h> #include <objidl.h> diff --git a/dtrans/source/win32/clipb/WinClipbImpl.hxx b/dtrans/source/win32/clipb/WinClipbImpl.hxx index 0b74185ec52d..d72b5aef8b60 100644 --- a/dtrans/source/win32/clipb/WinClipbImpl.hxx +++ b/dtrans/source/win32/clipb/WinClipbImpl.hxx @@ -30,6 +30,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/dtrans/source/win32/dtobj/DTransHelper.hxx b/dtrans/source/win32/dtobj/DTransHelper.hxx index 2143c571f047..84d34e200db2 100644 --- a/dtrans/source/win32/dtobj/DTransHelper.hxx +++ b/dtrans/source/win32/dtobj/DTransHelper.hxx @@ -23,7 +23,11 @@ #if defined _MSC_VER #pragma warning(push,1) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #if defined _MSC_VER #pragma warning(pop) #endif diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index c35cc42f43a6..9c6f40047967 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -33,6 +33,9 @@ #pragma warning(push,1) #pragma warning(disable:4917) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <shlobj.h> #if defined _MSC_VER diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.hxx b/dtrans/source/win32/dtobj/DataFmtTransl.hxx index 5412d7bdd901..1d0231f4714c 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.hxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.hxx @@ -29,7 +29,11 @@ #if defined _MSC_VER #pragma warning(push,1) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #if defined _MSC_VER #pragma warning(pop) #endif diff --git a/dtrans/source/win32/dtobj/Fetc.hxx b/dtrans/source/win32/dtobj/Fetc.hxx index 7513ebd62aec..f4b7b62fc372 100644 --- a/dtrans/source/win32/dtobj/Fetc.hxx +++ b/dtrans/source/win32/dtobj/Fetc.hxx @@ -25,7 +25,11 @@ #if defined _MSC_VER #pragma warning(push,1) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #if defined _MSC_VER #pragma warning(pop) #endif diff --git a/dtrans/source/win32/dtobj/FetcList.hxx b/dtrans/source/win32/dtobj/FetcList.hxx index 9f70d0976ab2..1015729ad6c2 100644 --- a/dtrans/source/win32/dtobj/FetcList.hxx +++ b/dtrans/source/win32/dtobj/FetcList.hxx @@ -28,6 +28,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/dtrans/source/win32/dtobj/FmtFilter.hxx b/dtrans/source/win32/dtobj/FmtFilter.hxx index f56dce98fec2..da14a374c979 100644 --- a/dtrans/source/win32/dtobj/FmtFilter.hxx +++ b/dtrans/source/win32/dtobj/FmtFilter.hxx @@ -27,7 +27,11 @@ #if defined _MSC_VER #pragma warning(push,1) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #if defined _MSC_VER #pragma warning(pop) #endif diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx index 4e916ce28682..a6a8bd075e7f 100644 --- a/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx +++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.hxx @@ -26,8 +26,11 @@ #if defined _MSC_VER #pragma warning(push,1) #endif -#include <objidl.h> +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #if defined _MSC_VER #pragma warning(pop) #endif diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index c3299b6fc0d2..f9e681a4b399 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -36,6 +36,9 @@ #pragma warning(push,1) #pragma warning(disable:4917) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <shlobj.h> #if defined _MSC_VER diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx index 5078c3fd74da..4effb8e6a89c 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.hxx +++ b/dtrans/source/win32/dtobj/XTDataObject.hxx @@ -30,6 +30,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> #include <ole2.h> #include <objidl.h> diff --git a/dtrans/source/win32/ftransl/ftransl.hxx b/dtrans/source/win32/ftransl/ftransl.hxx index 6859e0d53774..c93cd8096d5d 100644 --- a/dtrans/source/win32/ftransl/ftransl.hxx +++ b/dtrans/source/win32/ftransl/ftransl.hxx @@ -31,14 +31,6 @@ #include <vector> -#if defined _MSC_VER -#pragma warning(push,1) -#endif -#include <windows.h> -#if defined _MSC_VER -#pragma warning(pop) -#endif - class CDataFormatTranslatorUNO : public cppu::WeakImplHelper< css::datatransfer::XDataFormatTranslator, css::lang::XServiceInfo > diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index c5ffcef57f60..8047ffc9a424 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -26,6 +26,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/dtrans/source/win32/misc/ImplHelper.hxx b/dtrans/source/win32/misc/ImplHelper.hxx index 0d0097fbcb5b..3ba825062b4b 100644 --- a/dtrans/source/win32/misc/ImplHelper.hxx +++ b/dtrans/source/win32/misc/ImplHelper.hxx @@ -26,7 +26,11 @@ #if defined _MSC_VER #pragma warning(push,1) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #if defined _MSC_VER #pragma warning(pop) #endif diff --git a/embeddedobj/source/msole/platform.h b/embeddedobj/source/msole/platform.h index c69263894e35..8e5faeecf546 100644 --- a/embeddedobj/source/msole/platform.h +++ b/embeddedobj/source/msole/platform.h @@ -28,7 +28,11 @@ #pragma warning(disable: 4548 4555 4917) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include "windows.h" +#include <ole2.h> #if defined _MSC_VER #pragma warning(pop) diff --git a/embeddedobj/test/Container1/nativelib/nativeview.c b/embeddedobj/test/Container1/nativelib/nativeview.c index dfd1adbac972..29dd49437e0b 100644 --- a/embeddedobj/test/Container1/nativelib/nativeview.c +++ b/embeddedobj/test/Container1/nativelib/nativeview.c @@ -19,6 +19,9 @@ #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> // property name to register own window procedure on hwnd #define OLD_PROC_KEY "oldwindowproc" diff --git a/embedserv/source/embed/docholder.cxx b/embedserv/source/embed/docholder.cxx index 14e95f26d45b..2998395279c4 100644 --- a/embedserv/source/embed/docholder.cxx +++ b/embedserv/source/embed/docholder.cxx @@ -25,9 +25,13 @@ #include "intercept.hxx" #include "syswinwrapper.hxx" #include "iipaobj.hxx" - #include "common.h" + +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> + #include <com/sun/star/awt/XTopWindow.hpp> #include <com/sun/star/awt/PosSize.hpp> #include <com/sun/star/awt/XView.hpp> diff --git a/embedserv/source/inc/syswinwrapper.hxx b/embedserv/source/inc/syswinwrapper.hxx index fde21349095b..f255058bff26 100644 --- a/embedserv/source/inc/syswinwrapper.hxx +++ b/embedserv/source/inc/syswinwrapper.hxx @@ -20,6 +20,9 @@ #ifndef INCLUDED_EMBEDSERV_SOURCE_INC_SYSWINWRAPPER_HXX #define INCLUDED_EMBEDSERV_SOURCE_INC_SYSWINWRAPPER_HXX +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> /** diff --git a/embedserv/source/inprocserv/advisesink.hxx b/embedserv/source/inprocserv/advisesink.hxx index 7edd17cd5100..f19c61c7778d 100644 --- a/embedserv/source/inprocserv/advisesink.hxx +++ b/embedserv/source/inprocserv/advisesink.hxx @@ -24,7 +24,11 @@ #include <memory> +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> +#include <objidl.h> #include "smartpointer.hxx" namespace inprocserv { diff --git a/embedserv/source/inprocserv/inprocembobj.h b/embedserv/source/inprocserv/inprocembobj.h index a900a61598f1..691ef58d4500 100644 --- a/embedserv/source/inprocserv/inprocembobj.h +++ b/embedserv/source/inprocserv/inprocembobj.h @@ -24,6 +24,9 @@ #pragma warning(disable : 4668) #endif +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <oleidl.h> diff --git a/extensions/test/ole/OleConverterVar1/convTest.cxx b/extensions/test/ole/OleConverterVar1/convTest.cxx index 1c7538cb0752..a3ac2a23d45d 100644 --- a/extensions/test/ole/OleConverterVar1/convTest.cxx +++ b/extensions/test/ole/OleConverterVar1/convTest.cxx @@ -19,6 +19,9 @@ #pragma warning (disable: 4917) +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <comdef.h> #include <tchar.h> diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx index 41608410959f..055242cc5218 100644 --- a/extensions/test/ole/cpnt/cpnt.cxx +++ b/extensions/test/ole/cpnt/cpnt.cxx @@ -17,6 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <atlbase.h> #include <stdio.h> diff --git a/extensions/test/ole/cppToUno/testcppuno.cxx b/extensions/test/ole/cppToUno/testcppuno.cxx index 192523d3412c..0b06d694cde3 100644 --- a/extensions/test/ole/cppToUno/testcppuno.cxx +++ b/extensions/test/ole/cppToUno/testcppuno.cxx @@ -19,6 +19,9 @@ #pragma warning(disable: 4917) +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <comdef.h> #include <tchar.h> diff --git a/fpicker/source/win32/filepicker/FilterContainer.cxx b/fpicker/source/win32/filepicker/FilterContainer.cxx index 0601affcf320..a1afc6c581eb 100644 --- a/fpicker/source/win32/filepicker/FilterContainer.cxx +++ b/fpicker/source/win32/filepicker/FilterContainer.cxx @@ -29,6 +29,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/fpicker/source/win32/filepicker/afxres.h b/fpicker/source/win32/filepicker/afxres.h index 61f5ab91ce4c..6b84f154296e 100644 --- a/fpicker/source/win32/filepicker/afxres.h +++ b/fpicker/source/win32/filepicker/afxres.h @@ -1,4 +1,7 @@ /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include <dlgs.h> diff --git a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx index a2e530c76496..63b290a698eb 100644 --- a/fpicker/source/win32/filepicker/workbench/Test_fps.cxx +++ b/fpicker/source/win32/filepicker/workbench/Test_fps.cxx @@ -42,6 +42,9 @@ #include <osl/thread.h> #include <stdio.h> +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #include "..\FPServiceInfo.hxx" diff --git a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx index d6d421de018f..3c6e29d336dc 100644 --- a/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx +++ b/fpicker/source/win32/folderpicker/workbench/Test_fops.cxx @@ -37,6 +37,9 @@ #define _WIN32_DCOM +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> diff --git a/fpicker/source/win32/misc/WinImplHelper.hxx b/fpicker/source/win32/misc/WinImplHelper.hxx index 2e78cdaed136..9102dbfd4dd3 100644 --- a/fpicker/source/win32/misc/WinImplHelper.hxx +++ b/fpicker/source/win32/misc/WinImplHelper.hxx @@ -27,6 +27,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/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h index 0c8e718d7208..1e34e608d6ba 100644 --- a/include/LibreOfficeKit/LibreOfficeKitInit.h +++ b/include/LibreOfficeKit/LibreOfficeKitInit.h @@ -76,6 +76,9 @@ extern "C" #else #pragma warning(disable:4996) + #if !defined WIN32_LEAN_AND_MEAN + #define WIN32_LEAN_AND_MEAN + #endif #include <windows.h> #define TARGET_LIB "sofficeapp" ".dll" #define TARGET_MERGED_LIB "mergedlo" ".dll" diff --git a/include/comphelper/windowsStart.hxx b/include/comphelper/windowsStart.hxx index 09a9108811fb..90e1ff1bb0da 100644 --- a/include/comphelper/windowsStart.hxx +++ b/include/comphelper/windowsStart.hxx @@ -7,6 +7,9 @@ #define INCLUDED_COMPHELPER_WINSTART_HXX #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #endif diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx index b435aa846669..5d28e0240b58 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx @@ -21,6 +21,9 @@ #ifdef _WIN32 # include <stdio.h> # include <sys/stat.h> +# if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +# endif # include <windows.h> #endif diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 798fae528bb6..f1bf45816af6 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -42,6 +42,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/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx index 6f964580308b..fbb885b1d0c2 100644 --- a/jvmfwk/source/fwkutil.cxx +++ b/jvmfwk/source/fwkutil.cxx @@ -22,6 +22,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/odk/source/unoapploader/win/unoapploader.c b/odk/source/unoapploader/win/unoapploader.c index 70530379be82..cabcfedf62ef 100644 --- a/odk/source/unoapploader/win/unoapploader.c +++ b/odk/source/unoapploader/win/unoapploader.c @@ -25,6 +25,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/odk/source/unowinreg/win/unowinreg.cxx b/odk/source/unowinreg/win/unowinreg.cxx index 92f71967d8f2..64c612e362da 100644 --- a/odk/source/unowinreg/win/unowinreg.cxx +++ b/odk/source/unowinreg/win/unowinreg.cxx @@ -21,6 +21,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/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx index 7b321643a37a..79697bade9dc 100644 --- a/sal/cppunittester/cppunittester.cxx +++ b/sal/cppunittester/cppunittester.cxx @@ -18,6 +18,9 @@ */ #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #endif diff --git a/sal/osl/w32/file_url.hxx b/sal/osl/w32/file_url.hxx index c8eec0632d22..43bed9100bdb 100644 --- a/sal/osl/w32/file_url.hxx +++ b/sal/osl/w32/file_url.hxx @@ -29,7 +29,9 @@ #pragma warning(push,1) #endif -#define WINDOWS_LEAN_AND_MEAN +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #ifdef _MSC_VER diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx index 4a3b014b095c..d3aaf7e2fdef 100644 --- a/sal/qa/osl/file/osl_File.cxx +++ b/sal/qa/osl/file/osl_File.cxx @@ -32,6 +32,9 @@ #include <memory> #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #endif diff --git a/sal/qa/osl/process/osl_Thread.cxx b/sal/qa/osl/process/osl_Thread.cxx index 8248255ba78b..c6c016afb7e4 100644 --- a/sal/qa/osl/process/osl_Thread.cxx +++ b/sal/qa/osl/process/osl_Thread.cxx @@ -19,6 +19,9 @@ #include <algorithm> #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #else #include <unistd.h> diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx index 917fca1a89f2..06709c9c6677 100644 --- a/sal/qa/osl/process/osl_process.cxx +++ b/sal/qa/osl/process/osl_process.cxx @@ -44,6 +44,9 @@ #endif #if defined(_WIN32) // Windows +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif # include <windows.h> # include <tchar.h> #else diff --git a/sal/qa/osl/security/osl_Security.cxx b/sal/qa/osl/security/osl_Security.cxx index 1595377ac25d..c1268b256bc6 100644 --- a/sal/qa/osl/security/osl_Security.cxx +++ b/sal/qa/osl/security/osl_Security.cxx @@ -19,6 +19,9 @@ #include <algorithm> #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #undef min #endif diff --git a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx index c8173831f757..f882b104c9bc 100644 --- a/sal/qa/rtl/doublelock/rtl_doublelocking.cxx +++ b/sal/qa/rtl/doublelock/rtl_doublelocking.cxx @@ -34,6 +34,9 @@ #include <cppunit/plugin/TestPlugIn.h> #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #else #include <unistd.h> diff --git a/sal/qa/rtl/uuid/rtl_Uuid.cxx b/sal/qa/rtl/uuid/rtl_Uuid.cxx index 21d5ca65fb4b..b77e84afe2ff 100644 --- a/sal/qa/rtl/uuid/rtl_Uuid.cxx +++ b/sal/qa/rtl/uuid/rtl_Uuid.cxx @@ -29,6 +29,9 @@ #include <cppunit/plugin/TestPlugIn.h> #ifdef _WIN32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #elif defined UNX #include <unistd.h> diff --git a/shell/qa/zip/ziptest.cxx b/shell/qa/zip/ziptest.cxx index a6bb57ccb30b..2bcfef30c84e 100644 --- a/shell/qa/zip/ziptest.cxx +++ b/shell/qa/zip/ziptest.cxx @@ -20,6 +20,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/testtools/source/performance/ubtest.cxx b/testtools/source/performance/ubtest.cxx index 065d473d1dac..18e6ae98e512 100644 --- a/testtools/source/performance/ubtest.cxx +++ b/testtools/source/performance/ubtest.cxx @@ -33,6 +33,9 @@ #include <osl/time.h> #ifdef SAL_W32 +#if !defined WIN32_LEAN_AND_MEAN +# define WIN32_LEAN_AND_MEAN +#endif #include <windows.h> #else #include <sys/times.h> |