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 --- bridges/source/cpp_uno/msvc_win32_intel/except.cxx | 27 +++------------------- .../source/cpp_uno/msvc_win32_x86-64/except.cxx | 18 +-------------- 2 files changed, 4 insertions(+), 41 deletions(-) (limited to 'bridges/source') diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx index 9430f29d84a9..497958d0307f 100644 --- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx @@ -503,13 +503,9 @@ int msci_filterCppException( if (pRecord == 0 || pRecord->ExceptionCode != MSVC_ExceptionCode) return EXCEPTION_CONTINUE_SEARCH; -#if _MSC_VER < 1300 // MSVC -6 - bool rethrow = (pRecord->NumberParameters < 3 || - pRecord->ExceptionInformation[ 2 ] == 0); -#else bool rethrow = __CxxDetectRethrow( &pRecord ); OSL_ASSERT( pRecord == pPointers->ExceptionRecord ); -#endif + if (rethrow && pRecord == pPointers->ExceptionRecord) { // hack to get msvcrt internal _curexception field: @@ -521,15 +517,7 @@ int msci_filterCppException( // crt\src\mtdll.h: // offsetof (_tiddata, _curexception) - // offsetof (_tiddata, _tpxcptinfoptrs): -#if _MSC_VER < 1300 - 0x18 // msvcrt,dll -#elif _MSC_VER < 1310 - 0x20 // msvcr70.dll -#elif _MSC_VER < 1400 - 0x24 // msvcr71.dll -#else - 0x28 // msvcr80.dll -#endif + 0x28 // msvcr80.dll (and later?) ); } // rethrow: handle only C++ exceptions: @@ -576,12 +564,11 @@ int msci_filterCppException( uno_type_any_constructAndConvert( pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno ); -#if _MSC_VER < 1400 // msvcr80.dll cleans up, different from former msvcrs + // msvcr80.dll cleans up, different from former msvcrs // if (! rethrow): // though this unknown exception leaks now, no user-defined // exception is ever thrown thru the binary C-UNO dispatcher // call stack. -#endif } else { @@ -589,14 +576,6 @@ int msci_filterCppException( uno_any_constructAndConvert( pUnoExc, (void *) pRecord->ExceptionInformation[1], pExcTypeDescr, pCpp2Uno ); -#if _MSC_VER < 1400 // msvcr80.dll cleans up, different from former msvcrs - if (! rethrow) - { - uno_destructData( - (void *) pRecord->ExceptionInformation[1], - pExcTypeDescr, cpp_release ); - } -#endif typelib_typedescription_release( pExcTypeDescr ); } diff --git a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx index 0a48f5ce0aff..5f47dc52d252 100644 --- a/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx +++ b/bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx @@ -726,9 +726,7 @@ int mscx_filterCppException( // MSVS9/crt/src/mtdll.h: // offsetof (_tiddata, _curexception) - // offsetof (_tiddata, _tpxcptinfoptrs): -#if _MSC_VER < 1500 - error, this compiler version is not supported -#elif _MSC_VER < 1600 +#if _MSC_VER < 1600 0x48 // msvcr90.dll #else error, please find value for this compiler version @@ -792,12 +790,6 @@ int mscx_filterCppException( uno_type_any_constructAndConvert( pUnoExc, &exc, ::getCppuType( &exc ).getTypeLibType(), pCpp2Uno ); -#if _MSC_VER < 1400 // msvcr80.dll cleans up, different from former msvcrs - // if (! rethrow): - // though this unknown exception leaks now, no user-defined - // exception is ever thrown thru the binary C-UNO dispatcher - // call stack. -#endif } else { @@ -805,14 +797,6 @@ int mscx_filterCppException( uno_any_constructAndConvert( pUnoExc, (void *) pRecord->ExceptionInformation[1], pExcTD, pCpp2Uno ); -#if _MSC_VER < 1400 // msvcr80.dll cleans up, different from former msvcrs - if (! rethrow) - { - uno_destructData( - (void *) pRecord->ExceptionInformation[1], - pExcTD, cpp_release ); - } -#endif typelib_typedescription_release( pExcTD ); } -- cgit