diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:11:09 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:11:09 +0100 |
commit | 3d874bdf409ca4a099853b30aeb9932e45c56f60 (patch) | |
tree | 3b88c39fa7cf3aa598a286534afc7de6f4ec98ab /dtrans | |
parent | 4edacef4f14f1992f8e0cbded5a86730c8353b4d (diff) |
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'dtrans')
-rw-r--r-- | dtrans/source/cnttype/wbench/testcnttype.cxx | 6 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/APNDataObject.cxx | 2 | ||||
-rwxr-xr-x | dtrans/source/win32/dtobj/DOTransferable.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/DataFmtTransl.cxx | 6 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/FetcList.cxx | 4 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/XNotifyingDataObject.cxx | 2 | ||||
-rw-r--r-- | dtrans/source/win32/dtobj/XTDataObject.cxx | 12 | ||||
-rwxr-xr-x | dtrans/source/win32/ftransl/ftransl.cxx | 8 | ||||
-rw-r--r-- | dtrans/source/win32/misc/ImplHelper.cxx | 8 | ||||
-rw-r--r-- | dtrans/source/win32/mtaole/MtaOleClipb.cxx | 12 | ||||
-rw-r--r-- | dtrans/source/win32/workbench/test_wincb.cxx | 6 |
11 files changed, 34 insertions, 34 deletions
diff --git a/dtrans/source/cnttype/wbench/testcnttype.cxx b/dtrans/source/cnttype/wbench/testcnttype.cxx index 517d84a8ce79..d6b1fe10b1f8 100644 --- a/dtrans/source/cnttype/wbench/testcnttype.cxx +++ b/dtrans/source/cnttype/wbench/testcnttype.cxx @@ -120,7 +120,7 @@ void ShutdownServiceMgr( Reference< XMultiServiceFactory >& SrvMgr ) Reference< XComponent > xComponent( SrvMgr, UNO_QUERY ); if ( !xComponent.is() ) - OSL_ENSURE(sal_False, "Error shuting down"); + OSL_FAIL("Error shuting down"); // Dispose and clear factory xComponent->dispose(); @@ -232,7 +232,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) // Print a message if an error occurred. if ( !g_xFactory.is( ) ) { - OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); + OSL_FAIL("Can't create RegistryServiceFactory"); return(-1); } @@ -250,7 +250,7 @@ int SAL_CALL main( int nArgc, char* argv[] ) if ( !xMCntTypeFactory.is( ) ) { - OSL_ENSURE( sal_False, "Error creating MimeContentTypeFactory Service" ); + OSL_FAIL( "Error creating MimeContentTypeFactory Service" ); return(-1); } diff --git a/dtrans/source/win32/dtobj/APNDataObject.cxx b/dtrans/source/win32/dtobj/APNDataObject.cxx index 80a8c1e737e6..17ba6685a9c1 100644 --- a/dtrans/source/win32/dtobj/APNDataObject.cxx +++ b/dtrans/source/win32/dtobj/APNDataObject.cxx @@ -93,7 +93,7 @@ CAPNDataObject::CAPNDataObject( IDataObjectPtr rIDataObject ) : // to a defined value if (FAILED(hr_marshal)) { - OSL_ENSURE(sal_False, "marshalling failed"); + OSL_FAIL("marshalling failed"); #if OSL_DEBUG_LEVEL > 0 HGLOBAL hGlobal = diff --git a/dtrans/source/win32/dtobj/DOTransferable.cxx b/dtrans/source/win32/dtobj/DOTransferable.cxx index bdbf09546a9c..f63e13b59ae7 100755 --- a/dtrans/source/win32/dtobj/DOTransferable.cxx +++ b/dtrans/source/win32/dtobj/DOTransferable.cxx @@ -530,7 +530,7 @@ sal_Bool SAL_CALL CDOTransferable::compareDataFlavors( } catch( IllegalArgumentException& ) { - OSL_ENSURE( sal_False, "Invalid content type detected" ); + OSL_FAIL( "Invalid content type detected" ); bRet = sal_False; } diff --git a/dtrans/source/win32/dtobj/DataFmtTransl.cxx b/dtrans/source/win32/dtobj/DataFmtTransl.cxx index c3171c91d0ee..a1d56a562c53 100644 --- a/dtrans/source/win32/dtobj/DataFmtTransl.cxx +++ b/dtrans/source/win32/dtobj/DataFmtTransl.cxx @@ -127,13 +127,13 @@ CFormatEtc CDataFormatTranslator::getFormatEtcFromDataFlavor( const DataFlavor& OSL_ENSURE( CF_INVALID != cf, "RegisterClipboardFormat failed" ); } else - OSL_ENSURE( sal_False, "Wrong Any-Type detected" ); + OSL_FAIL( "Wrong Any-Type detected" ); } } } catch( ... ) { - OSL_ENSURE( sal_False, "Unexpected error" ); + OSL_FAIL( "Unexpected error" ); } return sal::static_int_cast<CFormatEtc>(getFormatEtcForClipformat( sal::static_int_cast<CLIPFORMAT>(cf) )); @@ -190,7 +190,7 @@ DataFlavor CDataFormatTranslator::getDataFlavorFromFormatEtc( const FORMATETC& a } catch( ... ) { - OSL_ENSURE( sal_False, "Unexpected error" ); + OSL_FAIL( "Unexpected error" ); } return aFlavor; diff --git a/dtrans/source/win32/dtobj/FetcList.cxx b/dtrans/source/win32/dtobj/FetcList.cxx index b7e556445fdb..dec172f01d84 100644 --- a/dtrans/source/win32/dtobj/FetcList.cxx +++ b/dtrans/source/win32/dtobj/FetcList.cxx @@ -376,11 +376,11 @@ OUString SAL_CALL CFormatRegistrar::getCharsetFromDataFlavor( const DataFlavor& } catch(NoSuchElementException&) { - OSL_ENSURE( sal_False, "Unexpected" ); + OSL_FAIL( "Unexpected" ); } catch(...) { - OSL_ENSURE( sal_False, "Invalid data flavor" ); + OSL_FAIL( "Invalid data flavor" ); } return charset; diff --git a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx index fd12b6583626..e23ec150f1d4 100644 --- a/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx +++ b/dtrans/source/win32/dtobj/XNotifyingDataObject.cxx @@ -159,7 +159,7 @@ void SAL_CALL CXNotifyingDataObject::lostOwnership( ) } catch(RuntimeException&) { - OSL_ENSURE( sal_False, "RuntimeException caught" ); + OSL_FAIL( "RuntimeException caught" ); } } diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx index 514669cfe15c..6d59f9a7445a 100644 --- a/dtrans/source/win32/dtobj/XTDataObject.cxx +++ b/dtrans/source/win32/dtobj/XTDataObject.cxx @@ -256,7 +256,7 @@ void SAL_CALL CXTDataObject::renderUnicodeAndSetupStgMedium( // so we must check the any if ( !aAny.hasValue( ) ) { - OSL_ENSURE( sal_False, "XTransferable should throw an exception if ask for an unsupported flavor" ); + OSL_FAIL( "XTransferable should throw an exception if ask for an unsupported flavor" ); throw UnsupportedFlavorException( ); } @@ -293,7 +293,7 @@ void SAL_CALL CXTDataObject::renderAnyDataAndSetupStgMedium( // so we must check the any if ( !aAny.hasValue( ) ) { - OSL_ENSURE( sal_False, "XTransferable should throw an exception if ask for an unsupported flavor" ); + OSL_FAIL( "XTransferable should throw an exception if ask for an unsupported flavor" ); throw UnsupportedFlavorException( ); } @@ -361,7 +361,7 @@ HRESULT SAL_CALL CXTDataObject::renderSynthesizedFormatAndSetupStgMedium( FORMAT } catch( CInvalidFormatEtcException& ) { - OSL_ENSURE( sal_False, "Unexpected exception" ); + OSL_FAIL( "Unexpected exception" ); } catch( CStgTransferHelper::CStgTransferException& ex ) { @@ -390,7 +390,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedUnicodeAndSetupStgMedium( FORMATET // so we must check the any if ( !aAny.hasValue( ) ) { - OSL_ENSURE( sal_False, "XTransferable should throw an exception if ask for an unsupported flavor" ); + OSL_FAIL( "XTransferable should throw an exception if ask for an unsupported flavor" ); throw UnsupportedFlavorException( ); } @@ -426,7 +426,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedTextAndSetupStgMedium( FORMATETC& // so we must check the any if ( !aAny.hasValue( ) ) { - OSL_ENSURE( sal_False, "XTransferable should throw an exception if ask for an unsupported flavor" ); + OSL_FAIL( "XTransferable should throw an exception if ask for an unsupported flavor" ); throw UnsupportedFlavorException( ); } @@ -465,7 +465,7 @@ void SAL_CALL CXTDataObject::renderSynthesizedHtmlAndSetupStgMedium( FORMATETC& // so we must check the any if ( !aAny.hasValue( ) ) { - OSL_ENSURE( sal_False, "XTransferable should throw an exception if ask for an unsupported flavor" ); + OSL_FAIL( "XTransferable should throw an exception if ask for an unsupported flavor" ); throw UnsupportedFlavorException( ); } diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx index 456510145ab5..97bbe2b6634c 100755 --- a/dtrans/source/win32/ftransl/ftransl.cxx +++ b/dtrans/source/win32/ftransl/ftransl.cxx @@ -181,15 +181,15 @@ Any SAL_CALL CDataFormatTranslator::getSystemDataTypeFromDataFlavor( const DataF } catch( IllegalArgumentException& ) { - OSL_ENSURE( sal_False, "Invalid content-type detected!" ); + OSL_FAIL( "Invalid content-type detected!" ); } catch( NoSuchElementException& ) { - OSL_ENSURE( sal_False, "Illegal content-type parameter" ); + OSL_FAIL( "Illegal content-type parameter" ); } catch( ... ) { - OSL_ENSURE( sal_False, "Unexpected error" ); + OSL_FAIL( "Unexpected error" ); throw; } @@ -222,7 +222,7 @@ DataFlavor SAL_CALL CDataFormatTranslator::getDataFlavorFromSystemDataType( cons findDataFlavorForNativeFormatName( nativeFormatName, aFlavor ); } else - OSL_ENSURE( sal_False, "Invalid data type received" ); + OSL_FAIL( "Invalid data type received" ); return aFlavor; } diff --git a/dtrans/source/win32/misc/ImplHelper.cxx b/dtrans/source/win32/misc/ImplHelper.cxx index a04c588977d1..c0db923d55d4 100644 --- a/dtrans/source/win32/misc/ImplHelper.cxx +++ b/dtrans/source/win32/misc/ImplHelper.cxx @@ -236,7 +236,7 @@ void SAL_CALL DeleteTargetDevice( DVTARGETDEVICE* ptd ) __except( EXCEPTION_EXECUTE_HANDLER ) #endif { - OSL_ENSURE( sal_False, "Error DeleteTargetDevice" ); + OSL_FAIL( "Error DeleteTargetDevice" ); } #ifdef __MINGW32__ han.Reset(); @@ -357,7 +357,7 @@ sal_Bool SAL_CALL CopyFormatEtc( LPFORMATETC petcDest, LPFORMATETC petcSrc ) __except( EXCEPTION_EXECUTE_HANDLER ) #endif { - OSL_ENSURE( sal_False, "Error CopyFormatEtc" ); + OSL_FAIL( "Error CopyFormatEtc" ); } #ifdef __MINGW32__ han.Reset(); @@ -430,7 +430,7 @@ sal_Int32 SAL_CALL CompareFormatEtc( const FORMATETC* pFetcLhs, const FORMATETC* __except( EXCEPTION_EXECUTE_HANDLER ) #endif { - OSL_ENSURE( sal_False, "Error CompareFormatEtc" ); + OSL_FAIL( "Error CompareFormatEtc" ); nMatch = FORMATETC_NO_MATCH; } #ifdef __MINGW32__ @@ -479,7 +479,7 @@ sal_Bool SAL_CALL CompareTargetDevice( DVTARGETDEVICE* ptdLeft, DVTARGETDEVICE* __except( EXCEPTION_EXECUTE_HANDLER ) #endif { - OSL_ENSURE( sal_False, "Error CompareTargetDevice" ); + OSL_FAIL( "Error CompareTargetDevice" ); bRet = sal_False; } #ifdef __MINGW32__ diff --git a/dtrans/source/win32/mtaole/MtaOleClipb.cxx b/dtrans/source/win32/mtaole/MtaOleClipb.cxx index 9faa9a0435fb..ee6da2ee5628 100644 --- a/dtrans/source/win32/mtaole/MtaOleClipb.cxx +++ b/dtrans/source/win32/mtaole/MtaOleClipb.cxx @@ -241,10 +241,10 @@ public: m_hResult = CoInitialize( NULL ); if ( S_OK == m_hResult ) - OSL_ENSURE( sal_False, \ + OSL_FAIL( \ "com was not yet initialzed, the thread was not created using osl_createThread" ); else if ( FAILED( m_hResult ) && !( RPC_E_CHANGED_MODE == m_hResult ) ) - OSL_ENSURE( sal_False, \ + OSL_FAIL( \ "com could not be initialized, maybe the thread was not created using osl_createThread" ); } @@ -375,7 +375,7 @@ HRESULT CMtaOleClipboard::flushClipboard( ) { if ( !WaitForThreadReady( ) ) { - OSL_ENSURE( sal_False, "clipboard sta thread not ready" ); + OSL_FAIL( "clipboard sta thread not ready" ); return E_FAIL; } @@ -404,7 +404,7 @@ HRESULT CMtaOleClipboard::getClipboard( IDataObject** ppIDataObject ) if ( !WaitForThreadReady( ) ) { - OSL_ENSURE( sal_False, "clipboard sta thread not ready" ); + OSL_FAIL( "clipboard sta thread not ready" ); return E_FAIL; } @@ -443,7 +443,7 @@ HRESULT CMtaOleClipboard::setClipboard( IDataObject* pIDataObject ) { if ( !WaitForThreadReady( ) ) { - OSL_ENSURE( sal_False, "clipboard sta thread not ready" ); + OSL_FAIL( "clipboard sta thread not ready" ); return E_FAIL; } @@ -481,7 +481,7 @@ sal_Bool CMtaOleClipboard::registerClipViewer( LPFNC_CLIPVIEWER_CALLBACK_t pfncC { if ( !WaitForThreadReady( ) ) { - OSL_ENSURE( sal_False, "clipboard sta thread not ready" ); + OSL_FAIL( "clipboard sta thread not ready" ); return sal_False; } diff --git a/dtrans/source/win32/workbench/test_wincb.cxx b/dtrans/source/win32/workbench/test_wincb.cxx index 90325de665e5..c41d5a79153f 100644 --- a/dtrans/source/win32/workbench/test_wincb.cxx +++ b/dtrans/source/win32/workbench/test_wincb.cxx @@ -280,7 +280,7 @@ int SAL_CALL main( int nArgc, char* Argv[] ) // Print a message if an error occurred. if ( !g_xFactory.is( ) ) { - OSL_ENSURE(sal_False, "Can't create RegistryServiceFactory"); + OSL_FAIL("Can't create RegistryServiceFactory"); return(-1); } @@ -294,7 +294,7 @@ int SAL_CALL main( int nArgc, char* Argv[] ) xClipboard( g_xFactory->createInstance( OUString( WINCLIPBOARD_SERVICE_NAME ) ), UNO_QUERY ); if ( !xClipboard.is( ) ) { - OSL_ENSURE( sal_False, "Error creating Clipboard Service" ); + OSL_FAIL( "Error creating Clipboard Service" ); return(-1); } @@ -334,7 +334,7 @@ int SAL_CALL main( int nArgc, char* Argv[] ) Reference< XComponent > xComponent( g_xFactory, UNO_QUERY ); if ( !xComponent.is() ) - OSL_ENSURE(sal_False, "Error shuting down"); + OSL_FAIL("Error shuting down"); // Dispose and clear factory xComponent->dispose(); |