From a3ce60eb3c8bb5c69ab41556398efa8316286477 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 27 Nov 2012 14:41:16 +0200 Subject: We only support MSVC 2008 (_MSC_VER 1500) or later We can drop or simplify many conditionals. Change-Id: I37e820e515cc09845c30b62c89ddb3b6ff370f97 --- extensions/source/activex/SOActionsApproval.cxx | 2 +- extensions/source/activex/SOActionsApproval.h | 6 +++--- extensions/source/activex/SOActiveX.h | 2 +- extensions/source/activex/SOComWindowPeer.cxx | 2 +- extensions/source/activex/SOComWindowPeer.h | 6 +++--- extensions/source/activex/SODispatchInterceptor.cxx | 2 +- extensions/source/activex/SODispatchInterceptor.h | 6 +++--- extensions/source/activex/StdAfx2.cxx | 2 +- extensions/source/activex/StdAfx2.h | 4 ++-- extensions/source/activex/so_activex.rc | 4 ---- extensions/source/ole/ole2uno.hxx | 6 ++---- extensions/source/ole/oledll.cxx | 2 +- extensions/source/ole/oleobjw.hxx | 2 +- extensions/source/ole/olethread.cxx | 2 +- extensions/source/ole/servprov.cxx | 2 +- extensions/source/ole/unoobjw.cxx | 2 +- extensions/test/ole/AxTestComponents/StdAfx.h | 4 ++-- extensions/test/ole/EventListenerSample/EventListener/StdAfx.h | 4 ++-- extensions/test/ole/MfcControl/MfcControl.h | 4 ++-- extensions/test/ole/MfcControl/MfcControlCtl.h | 4 ++-- extensions/test/ole/MfcControl/MfcControlPpg.h | 4 ++-- extensions/test/ole/MfcControl/StdAfx.h | 4 ++-- extensions/test/ole/cpptest/cpptest.cxx | 4 ++-- extensions/test/ole/unoTocomCalls/Test/StdAfx.h | 4 ++-- extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h | 4 ++-- 25 files changed, 41 insertions(+), 47 deletions(-) (limited to 'extensions') diff --git a/extensions/source/activex/SOActionsApproval.cxx b/extensions/source/activex/SOActionsApproval.cxx index cb18c84dae28..d184d49d65e4 100644 --- a/extensions/source/activex/SOActionsApproval.cxx +++ b/extensions/source/activex/SOActionsApproval.cxx @@ -37,7 +37,7 @@ STDMETHODIMP SOActionsApproval::InterfaceSupportsErrorInfo(REFIID riid) for (int i=0;i= 1300) +#ifdef _MSC_VER if (InlineIsEqualGUID(*arr[i],riid)) #else if (::ATL::InlineIsEqualGUID(*arr[i],riid)) diff --git a/extensions/source/activex/SOActionsApproval.h b/extensions/source/activex/SOActionsApproval.h index 1790c782448d..de2cf52f24cc 100644 --- a/extensions/source/activex/SOActionsApproval.h +++ b/extensions/source/activex/SOActionsApproval.h @@ -22,16 +22,16 @@ #ifndef __SODOCUMENTEVENTLISTENER_H_ #define __SODOCUMENTEVENTLISTENER_H_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #include "resource.h" // main symbols #include #include #include -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG #endif diff --git a/extensions/source/activex/SOActiveX.h b/extensions/source/activex/SOActiveX.h index e2e5b68de617..4bef47a98765 100644 --- a/extensions/source/activex/SOActiveX.h +++ b/extensions/source/activex/SOActiveX.h @@ -34,7 +34,7 @@ #include #include -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG #endif #include diff --git a/extensions/source/activex/SOComWindowPeer.cxx b/extensions/source/activex/SOComWindowPeer.cxx index a9d6379ce4cf..298e32014e66 100644 --- a/extensions/source/activex/SOComWindowPeer.cxx +++ b/extensions/source/activex/SOComWindowPeer.cxx @@ -36,7 +36,7 @@ STDMETHODIMP SOComWindowPeer::InterfaceSupportsErrorInfo(REFIID riid) for (int i=0;i= 1300) +#ifdef _MSC_VER if (InlineIsEqualGUID(*arr[i],riid)) #else if (::ATL::InlineIsEqualGUID(*arr[i],riid)) diff --git a/extensions/source/activex/SOComWindowPeer.h b/extensions/source/activex/SOComWindowPeer.h index d8c4d2d83a5d..0e8dc37a9684 100644 --- a/extensions/source/activex/SOComWindowPeer.h +++ b/extensions/source/activex/SOComWindowPeer.h @@ -22,16 +22,16 @@ #ifndef __SOCOMWINDOWPEER_H_ #define __SOCOMWINDOWPEER_H_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #include "resource.h" // main symbols #include #include #include -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG #endif #include diff --git a/extensions/source/activex/SODispatchInterceptor.cxx b/extensions/source/activex/SODispatchInterceptor.cxx index 6ac0e8a61a82..4663d3f78ccc 100644 --- a/extensions/source/activex/SODispatchInterceptor.cxx +++ b/extensions/source/activex/SODispatchInterceptor.cxx @@ -39,7 +39,7 @@ STDMETHODIMP SODispatchInterceptor::InterfaceSupportsErrorInfo(REFIID riid) for (int i=0;i= 1300) +#ifdef _MSC_VER if (InlineIsEqualGUID(*arr[i],riid)) #else if (::ATL::InlineIsEqualGUID(*arr[i],riid)) diff --git a/extensions/source/activex/SODispatchInterceptor.h b/extensions/source/activex/SODispatchInterceptor.h index e90bbefec4e9..d873c6b41eac 100644 --- a/extensions/source/activex/SODispatchInterceptor.h +++ b/extensions/source/activex/SODispatchInterceptor.h @@ -22,16 +22,16 @@ #ifndef __SODISPATCHINTERCEPTOR_H_ #define __SODISPATCHINTERCEPTOR_H_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #include "resource.h" // main symbols #include #include #include -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG #endif #include diff --git a/extensions/source/activex/StdAfx2.cxx b/extensions/source/activex/StdAfx2.cxx index a2bfea986072..82a8f5454715 100644 --- a/extensions/source/activex/StdAfx2.cxx +++ b/extensions/source/activex/StdAfx2.cxx @@ -30,7 +30,7 @@ #include #endif -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG #endif diff --git a/extensions/source/activex/StdAfx2.h b/extensions/source/activex/StdAfx2.h index 18503222546c..c1ef7e523db4 100644 --- a/extensions/source/activex/StdAfx2.h +++ b/extensions/source/activex/StdAfx2.h @@ -24,9 +24,9 @@ #if !defined(AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED_) #define AFX_STDAFX_H__C1799EA0_62CC_44DE_A2DD_C9F0410FF7F1__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #define STRICT #ifndef _WIN32_WINNT diff --git a/extensions/source/activex/so_activex.rc b/extensions/source/activex/so_activex.rc index 1bc77e36b7d8..4f7246e67b75 100644 --- a/extensions/source/activex/so_activex.rc +++ b/extensions/source/activex/so_activex.rc @@ -25,15 +25,11 @@ // // Generated from the TEXTINCLUDE 2 resource. // -#if defined(_MSC_VER) && (_MSC_VER < 1500) -#include "winres.h" -#else #define WINVER 0x0500 #include #define LB_ADDSTRING (WM_USER+1) #define CB_ADDSTRING (WM_USER+3) #define IDC_STATIC (-1) -#endif ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS diff --git a/extensions/source/ole/ole2uno.hxx b/extensions/source/ole/ole2uno.hxx index 342d28bb5e8d..5b281a57d9cb 100644 --- a/extensions/source/ole/ole2uno.hxx +++ b/extensions/source/ole/ole2uno.hxx @@ -21,9 +21,9 @@ #define _OLE2UNO_HXX -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #define STRICT #ifndef _WIN32_WINNT @@ -41,9 +41,7 @@ #pragma warning (disable:4548) #include -#if (_MSC_VER >= 1200) || defined(__MINGW32__) #include -#endif #include #include diff --git a/extensions/source/ole/oledll.cxx b/extensions/source/ole/oledll.cxx index 8109f49ec9de..a4b75951ddf0 100644 --- a/extensions/source/ole/oledll.cxx +++ b/extensions/source/ole/oledll.cxx @@ -25,7 +25,7 @@ #pragma warning (push,1) #pragma warning (disable:4548) -#if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(_DEBUG_RUNTIME) +#if defined(_MSC_VER) && !defined(_DEBUG_RUNTIME) #undef _DEBUG #endif #ifdef __MINGW32__ diff --git a/extensions/source/ole/oleobjw.hxx b/extensions/source/ole/oleobjw.hxx index b84f20c5d649..f10a95acdf59 100644 --- a/extensions/source/ole/oleobjw.hxx +++ b/extensions/source/ole/oleobjw.hxx @@ -24,7 +24,7 @@ #include #define _WIN32_WINNT 0x0403 -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG // why? #endif #include diff --git a/extensions/source/ole/olethread.cxx b/extensions/source/ole/olethread.cxx index eda5aee6ffe9..a7e5fc88ae9b 100644 --- a/extensions/source/ole/olethread.cxx +++ b/extensions/source/ole/olethread.cxx @@ -17,7 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#if defined _MSC_VER && ( _MSC_VER >= 1200 ) +#ifdef _MSC_VER #define _WIN32_WINNT 0x0400 #endif diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx index e8f71955cf98..10fb507d478a 100644 --- a/extensions/source/ole/servprov.cxx +++ b/extensions/source/ole/servprov.cxx @@ -38,7 +38,7 @@ #include #define _WIN32_WINNT 0x0403 -#if defined(_MSC_VER) && (_MSC_VER >= 1300) +#ifdef _MSC_VER #undef _DEBUG #endif #include diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx index 95d9cd6a3b5f..069da1ed98b7 100644 --- a/extensions/source/ole/unoobjw.cxx +++ b/extensions/source/ole/unoobjw.cxx @@ -72,7 +72,7 @@ using namespace com::sun::star::reflection; using ::rtl::OUString; -#if _MSC_VER < 1200 +#ifndef _MSC_VER extern "C" const GUID IID_IDispatchEx; #endif diff --git a/extensions/test/ole/AxTestComponents/StdAfx.h b/extensions/test/ole/AxTestComponents/StdAfx.h index 3400227d6a5a..f25e075be701 100644 --- a/extensions/test/ole/AxTestComponents/StdAfx.h +++ b/extensions/test/ole/AxTestComponents/StdAfx.h @@ -23,9 +23,9 @@ #if !defined(AFX_STDAFX_H__BFE10EB4_8584_11D4_8335_005004526AB4__INCLUDED_) #define AFX_STDAFX_H__BFE10EB4_8584_11D4_8335_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #define STRICT #ifndef _WIN32_WINNT diff --git a/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h index 4eda34b62c78..b27537feab08 100644 --- a/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h +++ b/extensions/test/ole/EventListenerSample/EventListener/StdAfx.h @@ -23,9 +23,9 @@ #if !defined(AFX_STDAFX_H__E275407A_804A_477E_9A28_F5CA84E711C3__INCLUDED_) #define AFX_STDAFX_H__E275407A_804A_477E_9A28_F5CA84E711C3__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #define STRICT #ifndef _WIN32_WINNT diff --git a/extensions/test/ole/MfcControl/MfcControl.h b/extensions/test/ole/MfcControl/MfcControl.h index 538e65696b82..ef7a4b4132a3 100644 --- a/extensions/test/ole/MfcControl/MfcControl.h +++ b/extensions/test/ole/MfcControl/MfcControl.h @@ -19,9 +19,9 @@ #if !defined(AFX_MFCCONTROL_H__AC221FBC_A0D8_11D4_833B_005004526AB4__INCLUDED_) #define AFX_MFCCONTROL_H__AC221FBC_A0D8_11D4_833B_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif // MfcControl.h : main header file for MFCCONTROL.DLL diff --git a/extensions/test/ole/MfcControl/MfcControlCtl.h b/extensions/test/ole/MfcControl/MfcControlCtl.h index 7c02865eea64..fb95d210f8e3 100644 --- a/extensions/test/ole/MfcControl/MfcControlCtl.h +++ b/extensions/test/ole/MfcControl/MfcControlCtl.h @@ -19,9 +19,9 @@ #if !defined(AFX_MFCCONTROLCTL_H__AC221FC3_A0D8_11D4_833B_005004526AB4__INCLUDED_) #define AFX_MFCCONTROLCTL_H__AC221FC3_A0D8_11D4_833B_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif // MfcControlCtl.h : Declaration of the CMfcControlCtrl ActiveX Control class. diff --git a/extensions/test/ole/MfcControl/MfcControlPpg.h b/extensions/test/ole/MfcControl/MfcControlPpg.h index aadd3fb38624..821152a1ff38 100644 --- a/extensions/test/ole/MfcControl/MfcControlPpg.h +++ b/extensions/test/ole/MfcControl/MfcControlPpg.h @@ -19,9 +19,9 @@ #if !defined(AFX_MFCCONTROLPPG_H__AC221FC5_A0D8_11D4_833B_005004526AB4__INCLUDED_) #define AFX_MFCCONTROLPPG_H__AC221FC5_A0D8_11D4_833B_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif // MfcControlPpg.h : Declaration of the CMfcControlPropPage property page class. diff --git a/extensions/test/ole/MfcControl/StdAfx.h b/extensions/test/ole/MfcControl/StdAfx.h index 882e5d23e416..b3a303a6c19b 100644 --- a/extensions/test/ole/MfcControl/StdAfx.h +++ b/extensions/test/ole/MfcControl/StdAfx.h @@ -19,9 +19,9 @@ #if !defined(AFX_STDAFX_H__AC221FBA_A0D8_11D4_833B_005004526AB4__INCLUDED_) #define AFX_STDAFX_H__AC221FBA_A0D8_11D4_833B_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif // stdafx.h : include file for standard system include files, // or project specific include files that are used frequently, diff --git a/extensions/test/ole/cpptest/cpptest.cxx b/extensions/test/ole/cpptest/cpptest.cxx index b711c401e3a2..6c6556cda8e9 100644 --- a/extensions/test/ole/cpptest/cpptest.cxx +++ b/extensions/test/ole/cpptest/cpptest.cxx @@ -20,9 +20,9 @@ // cpptest.cpp : Defines the entry point for the console application. // -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #pragma warning(disable: 4917) #include #include diff --git a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h index 6cd33d8191b2..4a9eda2a51ad 100644 --- a/extensions/test/ole/unoTocomCalls/Test/StdAfx.h +++ b/extensions/test/ole/unoTocomCalls/Test/StdAfx.h @@ -24,9 +24,9 @@ #if !defined(AFX_STDAFX_H__180FF568_6F5C_11D4_8330_005004526AB4__INCLUDED_) #define AFX_STDAFX_H__180FF568_6F5C_11D4_8330_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers diff --git a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h index f837a8c37732..b35c1ddc8df9 100644 --- a/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h +++ b/extensions/test/ole/unoTocomCalls/XCallback_Impl/StdAfx.h @@ -23,9 +23,9 @@ #if !defined(AFX_STDAFX_H__180FF556_6F5C_11D4_8330_005004526AB4__INCLUDED_) #define AFX_STDAFX_H__180FF556_6F5C_11D4_8330_005004526AB4__INCLUDED_ -#if _MSC_VER > 1000 +#ifdef _MSC_VER #pragma once -#endif // _MSC_VER > 1000 +#endif #define STRICT #ifndef _WIN32_WINNT -- cgit