summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-03-19 14:11:09 +0100
commit3d874bdf409ca4a099853b30aeb9932e45c56f60 (patch)
tree3b88c39fa7cf3aa598a286534afc7de6f4ec98ab
parent4edacef4f14f1992f8e0cbded5a86730c8353b4d (diff)
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
-rw-r--r--comphelper/source/container/embeddedobjectcontainer.cxx15
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx2
-rw-r--r--comphelper/source/misc/accessiblecontexthelper.cxx2
-rw-r--r--comphelper/source/misc/accessiblewrapper.cxx5
-rw-r--r--comphelper/source/misc/accimplaccess.cxx2
-rw-r--r--comphelper/source/misc/componentcontext.cxx2
-rw-r--r--comphelper/source/misc/mediadescriptor.cxx2
-rw-r--r--comphelper/source/misc/mimeconfighelper.cxx2
-rw-r--r--comphelper/source/misc/numbers.cxx2
-rw-r--r--comphelper/source/misc/synchronousdispatch.cxx2
-rw-r--r--comphelper/source/misc/types.cxx2
-rw-r--r--comphelper/source/property/ChainablePropertySet.cxx10
-rw-r--r--comphelper/source/property/ChainablePropertySetInfo.cxx2
-rw-r--r--comphelper/source/property/MasterPropertySet.cxx10
-rw-r--r--comphelper/source/property/MasterPropertySetInfo.cxx4
-rw-r--r--comphelper/source/property/composedprops.cxx4
-rw-r--r--comphelper/source/property/propagg.cxx2
-rw-r--r--comphelper/source/property/property.cxx4
-rw-r--r--comphelper/source/property/propertysethelper.cxx6
-rw-r--r--comphelper/source/property/propertysetinfo.cxx4
-rw-r--r--comphelper/source/streaming/otransactedfilestream.cxx6
-rw-r--r--dtrans/source/cnttype/wbench/testcnttype.cxx6
-rw-r--r--dtrans/source/win32/dtobj/APNDataObject.cxx2
-rwxr-xr-xdtrans/source/win32/dtobj/DOTransferable.cxx2
-rw-r--r--dtrans/source/win32/dtobj/DataFmtTransl.cxx6
-rw-r--r--dtrans/source/win32/dtobj/FetcList.cxx4
-rw-r--r--dtrans/source/win32/dtobj/XNotifyingDataObject.cxx2
-rw-r--r--dtrans/source/win32/dtobj/XTDataObject.cxx12
-rwxr-xr-xdtrans/source/win32/ftransl/ftransl.cxx8
-rw-r--r--dtrans/source/win32/misc/ImplHelper.cxx8
-rw-r--r--dtrans/source/win32/mtaole/MtaOleClipb.cxx12
-rw-r--r--dtrans/source/win32/workbench/test_wincb.cxx6
-rw-r--r--sax/test/sax/testsax.cxx2
-rw-r--r--sot/source/sdstor/stg.cxx2
-rw-r--r--sot/source/sdstor/storage.cxx2
-rw-r--r--sot/source/sdstor/ucbstorage.cxx6
-rw-r--r--svl/source/fsstor/fsfactory.cxx12
-rw-r--r--svl/source/fsstor/fsstorage.cxx4
-rw-r--r--svl/source/misc/filenotation.cxx2
-rw-r--r--svl/source/passwordcontainer/passwordcontainer.cxx14
-rw-r--r--svtools/source/brwbox/brwimpl.hxx2
-rw-r--r--svtools/source/brwbox/editbrowsebox2.cxx2
-rw-r--r--svtools/source/config/test/test.cxx4
-rw-r--r--svtools/source/contnr/fileview.cxx2
-rw-r--r--svtools/source/dialogs/insdlg.cxx4
-rw-r--r--svtools/source/hatchwindow/hatchwindow.cxx4
-rw-r--r--svtools/source/misc/embedhlp.cxx8
-rw-r--r--svtools/source/misc/embedtransfer.cxx2
-rw-r--r--svtools/source/misc/imageresourceaccess.cxx2
-rw-r--r--svtools/source/productregistration/productregistration.cxx6
-rw-r--r--toolkit/inc/toolkit/helper/macros.hxx2
-rw-r--r--toolkit/source/controls/accessiblecontrolcontext.cxx8
-rw-r--r--toolkit/source/controls/unocontrols.cxx6
-rw-r--r--toolkit/source/helper/formpdfexport.cxx10
-rw-r--r--toolkit/source/helper/imagealign.cxx8
-rw-r--r--toolkit/source/helper/vclunohelper.cxx4
-rw-r--r--ucbhelper/source/client/content.cxx6
-rw-r--r--ucbhelper/source/client/interceptedinteraction.cxx2
-rw-r--r--ucbhelper/source/client/proxydecider.cxx32
-rw-r--r--ucbhelper/source/provider/cancelcommandexecution.cxx4
-rw-r--r--ucbhelper/source/provider/contenthelper.cxx17
-rw-r--r--ucbhelper/source/provider/propertyvalueset.cxx7
-rw-r--r--ucbhelper/source/provider/simplecertificatevalidationrequest.cxx2
-rw-r--r--ucbhelper/source/provider/simpleinteractionrequest.cxx3
-rw-r--r--ucbhelper/workben/myucp/myucp_content.cxx14
-rw-r--r--unotools/inc/unotools/loghelper.hxx2
-rw-r--r--unotools/source/config/configitem.cxx12
-rw-r--r--unotools/source/config/configmgr.cxx14
-rw-r--r--unotools/source/config/confignode.cxx24
-rw-r--r--unotools/source/config/itemholder1.cxx2
-rw-r--r--unotools/source/config/moduleoptions.cxx2
-rw-r--r--unotools/source/config/viewoptions.cxx2
-rw-r--r--unotools/source/misc/desktopterminationobserver.cxx2
-rw-r--r--unotools/source/misc/eventlisteneradapter.cxx2
-rw-r--r--unotools/source/misc/sharedunocomponent.cxx6
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx2
-rw-r--r--vcl/aqua/source/dtrans/OSXTransferable.cxx2
-rw-r--r--vcl/aqua/source/dtrans/test_aquacb.cxx6
78 files changed, 210 insertions, 231 deletions
diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx b/comphelper/source/container/embeddedobjectcontainer.cxx
index b9d8702ccee1..9f84b7afa053 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -715,8 +715,7 @@ sal_Bool EmbeddedObjectContainer::CopyEmbeddedObject( EmbeddedObjectContainer& r
{
RTL_LOGFILE_CONTEXT( aLog, "comphelper (mv76033) comphelper::EmbeddedObjectContainer::CopyEmbeddedObject" );
- OSL_ENSURE( sal_False,
- "This method is depricated! Use EmbeddedObjectContainer::CopyAndGetEmbeddedObject() to copy object!\n" );
+ OSL_FAIL( "This method is depricated! Use EmbeddedObjectContainer::CopyAndGetEmbeddedObject() to copy object!\n" );
// get the object name before(!) it is assigned to a new storage
::rtl::OUString aOrigName;
@@ -844,7 +843,7 @@ uno::Reference < embed::XEmbeddedObject > EmbeddedObjectContainer::CopyAndGetEmb
{
// impossibility to copy readonly property is not treated as an error for now
// but the assertion is helpful to detect such scenarios and review them
- OSL_ENSURE( sal_False, "Could not copy readonly property!\n" );
+ OSL_FAIL( "Could not copy readonly property!\n" );
}
}
}
@@ -912,7 +911,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r
catch ( uno::Exception& e )
{
(void)e;
- OSL_ENSURE( sal_False, "Failed to insert embedded object into storage!" );
+ OSL_FAIL( "Failed to insert embedded object into storage!" );
bRet = sal_False;
}
@@ -944,7 +943,7 @@ sal_Bool EmbeddedObjectContainer::MoveEmbeddedObject( EmbeddedObjectContainer& r
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Failed to remove object from storage!" );
+ OSL_FAIL( "Failed to remove object from storage!" );
bRet = sal_False;
}
}
@@ -1094,7 +1093,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can not set the new media type to a storage!\n" );
+ OSL_FAIL( "Can not set the new media type to a storage!\n" );
}
}
@@ -1154,7 +1153,7 @@ sal_Bool EmbeddedObjectContainer::RemoveEmbeddedObject( const uno::Reference < e
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Failed to remove object from storage!" );
+ OSL_FAIL( "Failed to remove object from storage!" );
return sal_False;
}
}
@@ -1365,7 +1364,7 @@ namespace {
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "The pictures storage is not available!\n" );
+ OSL_FAIL( "The pictures storage is not available!\n" );
}
}
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index cd618cffd8a6..acbb962ea4d7 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -989,7 +989,7 @@ void SAL_CALL ImplEventAttacherManager::read(const Reference< XObjectInputStream
// Ganze richtig sein. Sonst ist etwas voellig daneben gegangen.
if( nRealLen > nLen || nVersion == 1 )
{
- OSL_ENSURE( sal_False, "ImplEventAttacherManager::read(): Fatal Error, wrong object length" );
+ OSL_FAIL( "ImplEventAttacherManager::read(): Fatal Error, wrong object length" );
}
else
{
diff --git a/comphelper/source/misc/accessiblecontexthelper.cxx b/comphelper/source/misc/accessiblecontexthelper.cxx
index 5dcda7148275..fb89a0bf86a9 100644
--- a/comphelper/source/misc/accessiblecontexthelper.cxx
+++ b/comphelper/source/misc/accessiblecontexthelper.cxx
@@ -319,7 +319,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" );
+ OSL_FAIL( "OAccessibleContextHelper::getAccessibleIndexInParent: caught an exception!" );
}
return nRet;
diff --git a/comphelper/source/misc/accessiblewrapper.cxx b/comphelper/source/misc/accessiblewrapper.cxx
index 693d2bbe3218..650130939cda 100644
--- a/comphelper/source/misc/accessiblewrapper.cxx
+++ b/comphelper/source/misc/accessiblewrapper.cxx
@@ -249,7 +249,7 @@ namespace comphelper
break;
default:
- OSL_ENSURE( sal_False, "OWrappedAccessibleChildrenManager::translateAccessibleEvent: unknown (or unexpected) event id!" );
+ OSL_FAIL( "OWrappedAccessibleChildrenManager::translateAccessibleEvent: unknown (or unexpected) event id!" );
break;
}
}
@@ -279,8 +279,7 @@ namespace comphelper
#if OSL_DEBUG_LEVEL > 0
if ( m_aChildrenMap.end() == aDisposedPos )
{
- OSL_ENSURE( sal_False,
- "OWrappedAccessibleChildrenManager::disposing: where did this come from?" );
+ OSL_FAIL( "OWrappedAccessibleChildrenManager::disposing: where did this come from?" );
// helper for dignostics
Reference< XAccessible > xOwningAccessible( m_aOwningAccessible );
Reference< XAccessibleContext > xContext;
diff --git a/comphelper/source/misc/accimplaccess.cxx b/comphelper/source/misc/accimplaccess.cxx
index 65dfd98364c9..7128d4e13991 100644
--- a/comphelper/source/misc/accimplaccess.cxx
+++ b/comphelper/source/misc/accimplaccess.cxx
@@ -166,7 +166,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OAccessibleImplementationAccess::setAccessibleParent: caught an exception while retrieving the implementation!" );
+ OSL_FAIL( "OAccessibleImplementationAccess::setAccessibleParent: caught an exception while retrieving the implementation!" );
}
return pImplementation;
}
diff --git a/comphelper/source/misc/componentcontext.cxx b/comphelper/source/misc/componentcontext.cxx
index 072cafbcee4c..86224687d9f4 100644
--- a/comphelper/source/misc/componentcontext.cxx
+++ b/comphelper/source/misc/componentcontext.cxx
@@ -105,7 +105,7 @@ namespace comphelper
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "ComponentContext::getContextValueByName: caught an exception!" );
+ OSL_FAIL( "ComponentContext::getContextValueByName: caught an exception!" );
}
return aReturn;
}
diff --git a/comphelper/source/misc/mediadescriptor.cxx b/comphelper/source/misc/mediadescriptor.cxx
index 7bf1eaea266d..68a2999b738e 100644
--- a/comphelper/source/misc/mediadescriptor.cxx
+++ b/comphelper/source/misc/mediadescriptor.cxx
@@ -598,7 +598,7 @@ sal_Bool MediaDescriptor::impl_addInputStream( sal_Bool bLockFile )
::rtl::OUStringBuffer sMsg(256);
sMsg.appendAscii("Invalid MediaDescriptor detected:\n");
sMsg.append (ex.Message );
- OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr());
+ OSL_FAIL(::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr());
}
#else
catch(const css::uno::Exception&)
diff --git a/comphelper/source/misc/mimeconfighelper.cxx b/comphelper/source/misc/mimeconfighelper.cxx
index fb6936ea6d1f..d8d81aadea3f 100644
--- a/comphelper/source/misc/mimeconfighelper.cxx
+++ b/comphelper/source/misc/mimeconfighelper.cxx
@@ -800,7 +800,7 @@ sal_Bool MimeConfigurationHelper::AddFilterNameCheckOwnFile(
if ( !( nFlags & SFX_FILTER_IMPORT ) )
{
- OSL_ENSURE( sal_False, "This is no import filter!" );
+ OSL_FAIL( "This is no import filter!" );
throw uno::Exception();
}
diff --git a/comphelper/source/misc/numbers.cxx b/comphelper/source/misc/numbers.cxx
index d86bef05f21a..334a9e52178d 100644
--- a/comphelper/source/misc/numbers.cxx
+++ b/comphelper/source/misc/numbers.cxx
@@ -139,7 +139,7 @@ Any getNumberFormatProperty( const Reference< XNumberFormatter >& _rxFormatter,
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "::getNumberFormatProperty: caught an exception (did you create the key with another formatter?)!" );
+ OSL_FAIL( "::getNumberFormatProperty: caught an exception (did you create the key with another formatter?)!" );
}
return aReturn;
diff --git a/comphelper/source/misc/synchronousdispatch.cxx b/comphelper/source/misc/synchronousdispatch.cxx
index ad7c83c8bb15..ca4d4b36f72a 100644
--- a/comphelper/source/misc/synchronousdispatch.cxx
+++ b/comphelper/source/misc/synchronousdispatch.cxx
@@ -90,7 +90,7 @@ uno::Reference< lang::XComponent > SynchronousDispatch::dispatch(
catch ( uno::Exception& )
{
rtl::OUString aMsg = UNISTRING( "SynchronousDispatch::dispatch() Error while dispatching! ");
- OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
+ OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
diff --git a/comphelper/source/misc/types.cxx b/comphelper/source/misc/types.cxx
index 713e03caf23e..629e890ae62a 100644
--- a/comphelper/source/misc/types.cxx
+++ b/comphelper/source/misc/types.cxx
@@ -128,7 +128,7 @@ sal_Bool getBOOL(const Any& _rAny)
if (_rAny.getValueType() == ::getCppuBooleanType())
nReturn = *(sal_Bool*)_rAny.getValue();
else
- OSL_ENSURE(sal_False, "comphelper::getBOOL : invalid argument !");
+ OSL_FAIL("comphelper::getBOOL : invalid argument !");
return nReturn;
}
diff --git a/comphelper/source/property/ChainablePropertySet.cxx b/comphelper/source/property/ChainablePropertySet.cxx
index a8329919502d..e3a02dce4c1b 100644
--- a/comphelper/source/property/ChainablePropertySet.cxx
+++ b/comphelper/source/property/ChainablePropertySet.cxx
@@ -290,31 +290,31 @@ Any SAL_CALL ChainablePropertySet::getPropertyDefault( const ::rtl::OUString& rP
void ChainablePropertySet::_preGetPropertyState ()
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void ChainablePropertySet::_getPropertyState( const comphelper::PropertyInfo&, PropertyState& )
throw(UnknownPropertyException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void ChainablePropertySet::_postGetPropertyState ()
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void ChainablePropertySet::_setPropertyToDefault( const comphelper::PropertyInfo& )
throw(UnknownPropertyException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
Any ChainablePropertySet::_getPropertyDefault( const comphelper::PropertyInfo& )
throw(UnknownPropertyException, WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
Any aAny;
return aAny;
diff --git a/comphelper/source/property/ChainablePropertySetInfo.cxx b/comphelper/source/property/ChainablePropertySetInfo.cxx
index c8962e755013..0f53c6d0260b 100644
--- a/comphelper/source/property/ChainablePropertySetInfo.cxx
+++ b/comphelper/source/property/ChainablePropertySetInfo.cxx
@@ -77,7 +77,7 @@ void ChainablePropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount )
#ifdef DBG_UTIL
PropertyInfoHash::iterator aIter = maMap.find( aName );
if( aIter != maMap.end() )
- OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!");
+ OSL_FAIL( "Warning: PropertyInfo added twice, possible error!");
#endif
maMap[aName] = pMap++;
}
diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx
index 253c46ada1cf..2844031d370c 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -474,31 +474,31 @@ Any SAL_CALL MasterPropertySet::getPropertyDefault( const ::rtl::OUString& rProp
void MasterPropertySet::_preGetPropertyState ()
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void MasterPropertySet::_getPropertyState( const comphelper::PropertyInfo&, PropertyState& )
throw(UnknownPropertyException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void MasterPropertySet::_postGetPropertyState ()
throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void MasterPropertySet::_setPropertyToDefault( const comphelper::PropertyInfo& )
throw(UnknownPropertyException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
Any MasterPropertySet::_getPropertyDefault( const comphelper::PropertyInfo& )
throw(UnknownPropertyException, WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
Any aAny;
return aAny;
}
diff --git a/comphelper/source/property/MasterPropertySetInfo.cxx b/comphelper/source/property/MasterPropertySetInfo.cxx
index e46faf00447a..0cfaf6ec1a6f 100644
--- a/comphelper/source/property/MasterPropertySetInfo.cxx
+++ b/comphelper/source/property/MasterPropertySetInfo.cxx
@@ -83,7 +83,7 @@ void MasterPropertySetInfo::add( PropertyInfo* pMap, sal_Int32 nCount, sal_uInt8
#ifdef DBG_UTIL
PropertyDataHash::iterator aIter = maMap.find( aName );
if( aIter != maMap.end() )
- OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!");
+ OSL_FAIL( "Warning: PropertyInfo added twice, possible error!");
#endif
maMap[aName] = new PropertyData ( nMapId, pMap );
}
@@ -101,7 +101,7 @@ void MasterPropertySetInfo::add( PropertyInfoHash &rHash, sal_uInt8 nMapId )
#ifdef DBG_UTIL
PropertyDataHash::iterator aDebugIter = maMap.find( (*aIter).first );
if( aDebugIter != maMap.end() )
- OSL_ENSURE( sal_False, "Warning: PropertyInfo added twice, possible error!");
+ OSL_FAIL( "Warning: PropertyInfo added twice, possible error!");
#endif
maMap[(*aIter).first] = new PropertyData ( nMapId, (*aIter).second );
++aIter;
diff --git a/comphelper/source/property/composedprops.cxx b/comphelper/source/property/composedprops.cxx
index 74d1b23891f9..aa864f7ca47f 100644
--- a/comphelper/source/property/composedprops.cxx
+++ b/comphelper/source/property/composedprops.cxx
@@ -300,13 +300,13 @@ namespace comphelper
//------------------------------------------------------------------------------
void SAL_CALL OComposedPropertySet::addVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE(sal_False, "OComposedPropertySet::addVetoableChangeListener: no implemented (yet)!");
+ OSL_FAIL("OComposedPropertySet::addVetoableChangeListener: no implemented (yet)!");
}
//------------------------------------------------------------------------------
void SAL_CALL OComposedPropertySet::removeVetoableChangeListener( const ::rtl::OUString&, const Reference< XVetoableChangeListener >& ) throw(UnknownPropertyException, WrappedTargetException, RuntimeException)
{
- OSL_ENSURE(sal_False, "OComposedPropertySet::removeVetoableChangeListener: no implemented (yet)!");
+ OSL_FAIL("OComposedPropertySet::removeVetoableChangeListener: no implemented (yet)!");
}
//------------------------------------------------------------------------------
diff --git a/comphelper/source/property/propagg.cxx b/comphelper/source/property/propagg.cxx
index 15c509378fb6..b83c292689dc 100644
--- a/comphelper/source/property/propagg.cxx
+++ b/comphelper/source/property/propagg.cxx
@@ -959,7 +959,7 @@ void SAL_CALL OPropertySetAggregationHelper::setPropertyToDefault(const ::rtl::O
catch( const RuntimeException& ) { throw; }
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OPropertySetAggregationHelper::setPropertyToDefault: caught an exception which is not allowed to leave here!" );
+ OSL_FAIL( "OPropertySetAggregationHelper::setPropertyToDefault: caught an exception which is not allowed to leave here!" );
}
}
}
diff --git a/comphelper/source/property/property.cxx b/comphelper/source/property/property.cxx
index a13930e34fba..37bb62cc98ef 100644
--- a/comphelper/source/property/property.cxx
+++ b/comphelper/source/property/property.cxx
@@ -78,7 +78,7 @@ void copyProperties(const Reference<XPropertySet>& _rxSource,
{
if (!_rxSource.is() || !_rxDest.is())
{
- OSL_ENSURE(sal_False, "copyProperties: invalid arguments !");
+ OSL_FAIL("copyProperties: invalid arguments !");
return;
}
@@ -136,7 +136,7 @@ void copyProperties(const Reference<XPropertySet>& _rxSource,
}
aBuffer.append( "." );
- OSL_ENSURE( sal_False, aBuffer.getStr() );
+ OSL_FAIL( aBuffer.getStr() );
#endif
}
}
diff --git a/comphelper/source/property/propertysethelper.cxx b/comphelper/source/property/propertysethelper.cxx
index 1a7455b8c956..0ad27a6949ed 100644
--- a/comphelper/source/property/propertysethelper.cxx
+++ b/comphelper/source/property/propertysethelper.cxx
@@ -312,17 +312,17 @@ Any SAL_CALL PropertySetHelper::getPropertyDefault( const ::rtl::OUString& aProp
void PropertySetHelper::_getPropertyStates( const comphelper::PropertyMapEntry**, PropertyState* ) throw(UnknownPropertyException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
void PropertySetHelper::_setPropertyToDefault( const comphelper::PropertyMapEntry* ) throw(UnknownPropertyException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
}
Any PropertySetHelper::_getPropertyDefault( const comphelper::PropertyMapEntry* ) throw(UnknownPropertyException, WrappedTargetException )
{
- OSL_ENSURE( sal_False, "you have to implement this yourself!");
+ OSL_FAIL( "you have to implement this yourself!");
Any aAny;
return aAny;
diff --git a/comphelper/source/property/propertysetinfo.cxx b/comphelper/source/property/propertysetinfo.cxx
index 1b3d8b92b951..4746a7e9ce43 100644
--- a/comphelper/source/property/propertysetinfo.cxx
+++ b/comphelper/source/property/propertysetinfo.cxx
@@ -84,12 +84,12 @@ void PropertyMapImpl::add( PropertyMapEntry* pMap, sal_Int32 nCount ) throw()
PropertyMap::iterator aIter = maPropertyMap.find( aName );
if( aIter != maPropertyMap.end() )
{
- OSL_ENSURE( sal_False, "Warning: PropertyMapEntry added twice, possible error!");
+ OSL_FAIL( "Warning: PropertyMapEntry added twice, possible error!");
}
#endif
if( NULL == pMap->mpType )
{
- OSL_ENSURE( sal_False, "No type in PropertyMapEntry!");
+ OSL_FAIL( "No type in PropertyMapEntry!");
pMap->mpType = &::getCppuType((const sal_Int32*)0);
}
diff --git a/comphelper/source/streaming/otransactedfilestream.cxx b/comphelper/source/streaming/otransactedfilestream.cxx
index bac4403fd6ad..9bcfac5fb66b 100644
--- a/comphelper/source/streaming/otransactedfilestream.cxx
+++ b/comphelper/source/streaming/otransactedfilestream.cxx
@@ -232,7 +232,7 @@ void OTruncatedTransactedFileStream::CloseAll_Impl()
xFileAccess->kill( aURL );
} catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Could not remove the file!" );
+ OSL_FAIL( "Could not remove the file!" );
}
}
}
@@ -313,7 +313,7 @@ void OTruncatedTransactedFileStream::Commit_Impl()
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "These calls are pretty simple, they should not fail!\n" );
+ OSL_FAIL( "These calls are pretty simple, they should not fail!\n" );
}
m_pStreamData->FreeOriginal();
@@ -537,7 +537,7 @@ void SAL_CALL OTruncatedTransactedFileStream::flush( )
if ( !m_pStreamData )
{
- OSL_ENSURE( sal_False, "flush() call on closed stream!\n" );
+ OSL_FAIL( "flush() call on closed stream!\n" );
return;
// in future throw exception, for now some code might call flush() on closed stream
// since file ucp implementation allows it
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();
diff --git a/sax/test/sax/testsax.cxx b/sax/test/sax/testsax.cxx
index ece7d7327129..6fe4fb5b1d0a 100644
--- a/sax/test/sax/testsax.cxx
+++ b/sax/test/sax/testsax.cxx
@@ -823,7 +823,7 @@ sal_Bool SAL_CALL component_writeInfo(
}
catch (InvalidRegistryException &)
{
- OSL_ENSURE( sal_False, "### InvalidRegistryException!" );
+ OSL_FAIL( "### InvalidRegistryException!" );
}
}
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 1edbd5dee4cb..c73028833790 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -432,7 +432,7 @@ Storage::Storage( UCBStorageStream& rStrm, sal_Bool bDirect )
SvStream* pStream = rStrm.GetModifySvStream();
if ( !pStream )
{
- OSL_ENSURE( sal_False, "UCBStorageStream can not provide SvStream implementation!\n" );
+ OSL_FAIL( "UCBStorageStream can not provide SvStream implementation!\n" );
SetError( SVSTREAM_GENERALERROR );
pEntry = NULL;
return;
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index c88a2d2c969e..ef398d081904 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -851,7 +851,7 @@ uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String&
catch( uno::Exception& e )
{
(void)e;
- OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ) );
+ OSL_FAIL( ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ) );
}
}
}
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index d234ec236415..3fcf8b07cf9d 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -895,7 +895,7 @@ sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary()
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -938,7 +938,7 @@ sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary( sal_uLong aLength )
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -996,7 +996,7 @@ sal_uLong UCBStorageStream_Impl::GetData( void* pData, sal_uLong nSize )
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx
index fe5ecebf79e6..a641a5d80c04 100644
--- a/svl/source/fsstor/fsfactory.cxx
+++ b/svl/source/fsstor/fsfactory.cxx
@@ -121,7 +121,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
{
if( !( aArguments[1] >>= nStorageMode ) )
{
- OSL_ENSURE( sal_False, "Wrong second argument!\n" );
+ OSL_FAIL( "Wrong second argument!\n" );
throw uno::Exception(); // TODO: Illegal argument
}
// it's allways possible to read written storage in this implementation
@@ -135,13 +135,13 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
{
if ( !aURL.getLength() )
{
- OSL_ENSURE( sal_False, "Empty URL is provided!\n" );
+ OSL_FAIL( "Empty URL is provided!\n" );
throw uno::Exception(); // TODO: illegal argument
}
}
else
{
- OSL_ENSURE( sal_False, "Wrong first argument!\n" );
+ OSL_FAIL( "Wrong first argument!\n" );
throw uno::Exception(); // TODO: Illegal argument
}
@@ -167,12 +167,12 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
break;
}
else
- OSL_ENSURE( sal_False, "Unacceptable property, will be ignored!\n" );
+ OSL_FAIL( "Unacceptable property, will be ignored!\n" );
}
}
else
{
- OSL_ENSURE( sal_False, "Wrong third argument!\n" );
+ OSL_FAIL( "Wrong third argument!\n" );
throw uno::Exception(); // TODO: Illegal argument
}
}
@@ -183,7 +183,7 @@ uno::Reference< uno::XInterface > SAL_CALL FSStorageFactory::createInstanceWithA
|| aURL.equalsIgnoreAsciiCaseAsciiL( "vnd.sun.star.zip", 16 )
|| ::utl::UCBContentHelper::IsDocument( aURL ) )
{
- OSL_ENSURE( sal_False, "File system storages can be based only on file URLs!\n" ); // ???
+ OSL_FAIL( "File system storages can be based only on file URLs!\n" ); // ???
throw uno::Exception(); // TODO: illegal argument
}
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 29ca7d9da631..2a6e2caca288 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -301,7 +301,7 @@ void FSStorage::CopyContentToStorage_Impl( ::ucbhelper::Content* pContent, const
catch( ucb::InteractiveIOException& r )
{
if ( r.Code == ucb::IOErrorCode_NOT_EXISTING )
- OSL_ENSURE( sal_False, "The folder does not exist!\n" );
+ OSL_FAIL( "The folder does not exist!\n" );
else
throw;
}
@@ -1146,7 +1146,7 @@ uno::Sequence< ::rtl::OUString > SAL_CALL FSStorage::getElementNames()
catch( ucb::InteractiveIOException& r )
{
if ( r.Code == ucb::IOErrorCode_NOT_EXISTING )
- OSL_ENSURE( sal_False, "The folder does not exist!\n" );
+ OSL_FAIL( "The folder does not exist!\n" );
else
{
uno::Any aCaught( ::cppu::getCaughtException() );
diff --git a/svl/source/misc/filenotation.cxx b/svl/source/misc/filenotation.cxx
index 06ddc663d762..64afaf2c3333 100644
--- a/svl/source/misc/filenotation.cxx
+++ b/svl/source/misc/filenotation.cxx
@@ -136,7 +136,7 @@ namespace svt
case N_URL: return m_sFileURL;
}
- OSL_ENSURE(sal_False, "OFileNotation::get: inavlid enum value!");
+ OSL_FAIL("OFileNotation::get: inavlid enum value!");
return ::rtl::OUString();
}
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index 1865c0ac9bc8..6e922ea29cd7 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -125,7 +125,7 @@ static vector< ::rtl::OUString > getInfoFromInd( ::rtl::OUString aInd )
&& ( pLine[i] < 'a' || pLine[i] > 'f' )
&& ( pLine[i] < 'A' || pLine[i] > 'F' ) ) )
{
- OSL_ENSURE( sal_False, "Wrong index syntax!\n" );
+ OSL_FAIL( "Wrong index syntax!\n" );
return aResult;
}
@@ -140,7 +140,7 @@ static vector< ::rtl::OUString > getInfoFromInd( ::rtl::OUString aInd )
} while( pLine[0] == '_' && pLine[1] == '_' );
if( *pLine )
- OSL_ENSURE( sal_False, "Wrong index syntax!\n" );
+ OSL_FAIL( "Wrong index syntax!\n" );
return aResult;
}
@@ -266,7 +266,7 @@ PassMap StorageItem::getInfo()
}
}
else
- OSL_ENSURE( sal_False, "Wrong index sintax!\n" );
+ OSL_FAIL( "Wrong index sintax!\n" );
}
return aResult;
@@ -526,12 +526,12 @@ vector< ::rtl::OUString > PasswordContainer::DecodePasswords( const ::rtl::OUStr
}
else
{
- OSL_ENSURE( sal_False, "No master password provided!\n" );
+ OSL_FAIL( "No master password provided!\n" );
// throw special exception
}
// problems with decoding
- OSL_ENSURE( sal_False, "Problem with decoding\n" );
+ OSL_FAIL( "Problem with decoding\n" );
throw RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't decode!")), Reference< XInterface >() );
}
@@ -606,12 +606,12 @@ vector< ::rtl::OUString > PasswordContainer::DecodePasswords( const ::rtl::OUStr
}
else
{
- OSL_ENSURE( sal_False, "No master password provided!\n" );
+ OSL_FAIL( "No master password provided!\n" );
// throw special exception
}
// problems with encoding
- OSL_ENSURE( sal_False, "Problem with encoding\n" );
+ OSL_FAIL( "Problem with encoding\n" );
throw RuntimeException( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Can't encode!")), Reference< XInterface >() );
}
diff --git a/svtools/source/brwbox/brwimpl.hxx b/svtools/source/brwbox/brwimpl.hxx
index d14716aa6b7b..d1540550117a 100644
--- a/svtools/source/brwbox/brwimpl.hxx
+++ b/svtools/source/brwbox/brwimpl.hxx
@@ -57,7 +57,7 @@ namespace svt
}
catch( const ::com::sun::star::uno::Exception& )
{
- OSL_ENSURE( sal_False, "THeaderCellMapFunctorDispose: caught an exception!" );
+ OSL_FAIL( "THeaderCellMapFunctorDispose: caught an exception!" );
}
}
};
diff --git a/svtools/source/brwbox/editbrowsebox2.cxx b/svtools/source/brwbox/editbrowsebox2.cxx
index 1e30cf6fa9fa..56f33bac499b 100644
--- a/svtools/source/brwbox/editbrowsebox2.cxx
+++ b/svtools/source/brwbox/editbrowsebox2.cxx
@@ -133,7 +133,7 @@ void EditBrowseBoxImpl::clearActiveCell()
}
catch(const Exception&)
{
- OSL_ENSURE( sal_False, "EditBrowseBoxImpl::clearActiveCell: caught an exception while disposing the AccessibleCell!" );
+ OSL_FAIL( "EditBrowseBoxImpl::clearActiveCell: caught an exception while disposing the AccessibleCell!" );
}
m_xActiveCell = NULL;
diff --git a/svtools/source/config/test/test.cxx b/svtools/source/config/test/test.cxx
index dc0256f5a134..66fac8540c49 100644
--- a/svtools/source/config/test/test.cxx
+++ b/svtools/source/config/test/test.cxx
@@ -164,7 +164,7 @@ void TestApplication::Main()
#endif
// Execute();
- OSL_ENSURE( sal_False, "Test was successful!\n" );
+ OSL_FAIL( "Test was successful!\n" );
}
//*****************************************************************************************************************
@@ -249,7 +249,7 @@ void TestApplication::impl_testDynamicMenuOptions()
}
}
- OSL_ENSURE( sal_False, OUStringToOString( sOut.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( OUStringToOString( sOut.makeStringAndClear(), RTL_TEXTENCODING_UTF8 ).getStr() );
}
//*****************************************************************************************************************
diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx
index b95c889827b9..b0d92e3fd9aa 100644
--- a/svtools/source/contnr/fileview.cxx
+++ b/svtools/source/contnr/fileview.cxx
@@ -1487,7 +1487,7 @@ FileViewResult SvtFileView::Initialize(
return eResult;
}
- OSL_ENSURE( sal_False, "SvtFileView::Initialize: unreachable!" );
+ OSL_FAIL( "SvtFileView::Initialize: unreachable!" );
return eFailure;
}
diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx
index 9d060f4e8a01..ee950a4e7cc2 100644
--- a/svtools/source/dialogs/insdlg.cxx
+++ b/svtools/source/dialogs/insdlg.cxx
@@ -164,13 +164,13 @@ void SvObjectServerList::FillInsertObjects()
::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
if ( !( aProperty >>= aProductName ) )
{
- OSL_ENSURE( sal_False, "Coudn't get PRODUCTNAME variable!\n" );
+ OSL_FAIL( "Coudn't get PRODUCTNAME variable!\n" );
aProductName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "StarOffice" ) );
}
aProperty = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTVERSION );
if ( !( aProperty >>= aProductVersion ) )
{
- OSL_ENSURE( sal_False, "Coudn't get PRODUCTVERSION variable!\n" );
+ OSL_FAIL( "Coudn't get PRODUCTVERSION variable!\n" );
}
for( nInd = 0; nInd < seqNames.getLength(); nInd++ )
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index c32e3a6c0b60..484ff32cb526 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -88,7 +88,7 @@ void VCLXHatchWindow::QueryObjAreaPixel( Rectangle & aRect )
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can't adjust rectangle size!\n" );
+ OSL_FAIL( "Can't adjust rectangle size!\n" );
}
}
}
@@ -104,7 +104,7 @@ void VCLXHatchWindow::RequestObjAreaPixel( const Rectangle & aRect )
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can't request resizing!\n" );
+ OSL_FAIL( "Can't request resizing!\n" );
}
}
}
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 59479c39d4b7..1f6b71485981 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -344,7 +344,7 @@ void EmbeddedObjectRef::Clear()
}
catch ( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Error on switching of the object to loaded state and closing!\n" );
+ OSL_FAIL( "Error on switching of the object to loaded state and closing!\n" );
}
}
}
@@ -488,7 +488,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Something went wrong on getting of the size of the object!" );
+ OSL_FAIL( "Something went wrong on getting of the size of the object!" );
}
try
@@ -497,7 +497,7 @@ Size EmbeddedObjectRef::GetSize( MapMode* pTargetMapMode ) const
}
catch( uno::Exception )
{
- OSL_ENSURE( sal_False, "Can not get the map mode!" );
+ OSL_FAIL( "Can not get the map mode!" );
}
}
@@ -755,7 +755,7 @@ void EmbeddedObjectRef::SetGraphicToContainer( const Graphic& rGraphic,
aContainer.InsertGraphicStream( xStream, aName, aMediaType );
}
else
- OSL_ENSURE( sal_False, "Export of graphic is failed!\n" );
+ OSL_FAIL( "Export of graphic is failed!\n" );
}
sal_Bool EmbeddedObjectRef::ObjectIsModified( const uno::Reference< embed::XEmbeddedObject >& xObj )
diff --git a/svtools/source/misc/embedtransfer.cxx b/svtools/source/misc/embedtransfer.cxx
index 34cf5c595e38..3773f84e24a6 100644
--- a/svtools/source/misc/embedtransfer.cxx
+++ b/svtools/source/misc/embedtransfer.cxx
@@ -241,7 +241,7 @@ void SvEmbedTransferHelper::FillTransferableObjectDescriptor( TransferableObject
}
catch( embed::NoVisualAreaSizeException& )
{
- OSL_ENSURE( sal_False, "Can not get visual area size!\n" );
+ OSL_FAIL( "Can not get visual area size!\n" );
aSize = Size( 5000, 5000 );
}
diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx
index e69f1967b462..afddd729abc8 100644
--- a/svtools/source/misc/imageresourceaccess.cxx
+++ b/svtools/source/misc/imageresourceaccess.cxx
@@ -192,7 +192,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "GraphicAccess::getImageStream: caught an exception!" );
+ OSL_FAIL( "GraphicAccess::getImageStream: caught an exception!" );
}
return pReturn;
diff --git a/svtools/source/productregistration/productregistration.cxx b/svtools/source/productregistration/productregistration.cxx
index 720cf15a41f3..a4251652aac2 100644
--- a/svtools/source/productregistration/productregistration.cxx
+++ b/svtools/source/productregistration/productregistration.cxx
@@ -163,7 +163,7 @@ namespace svt
}
catch(const Exception& )
{
- OSL_ENSURE( sal_False, "lcl_getActiveFrame: caught an exception!" );
+ OSL_FAIL( "lcl_getActiveFrame: caught an exception!" );
return Reference< XFrame >();
}
}
@@ -184,7 +184,7 @@ namespace svt
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "lcl_getPreferredDialogParent: caught an exception!" );
+ OSL_FAIL( "lcl_getPreferredDialogParent: caught an exception!" );
}
return pReturn;
@@ -375,7 +375,7 @@ namespace svt
break;
default:
- OSL_ENSURE( sal_False, "OProductRegistration::execute: invalid response from the dialog!" );
+ OSL_FAIL( "OProductRegistration::execute: invalid response from the dialog!" );
}
// prefer new style registration
diff --git a/toolkit/inc/toolkit/helper/macros.hxx b/toolkit/inc/toolkit/helper/macros.hxx
index f3f96824e079..76e60a86f70b 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -185,7 +185,7 @@ void ClassName::disposing( const ::com::sun::star::lang::EventObject& ) throw(::
#define DISPLAY_EXCEPTION( ClassName, MethodName, e ) \
::rtl::OString sMessage( #ClassName "::" #MethodName ": caught an exception!\n" ); \
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US ); \
- OSL_ENSURE( sal_False, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#else
#define DISPLAY_EXCEPTION( ClassName, MethodName, e )
#endif
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 4cd86d028205..d56deb87c72c 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -104,7 +104,7 @@ namespace toolkit
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OAccessibleControlContext::create: caught an exception from the late ctor!" );
+ OSL_FAIL( "OAccessibleControlContext::create: caught an exception from the late ctor!" );
}
return pNew;
}
@@ -229,7 +229,7 @@ namespace toolkit
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
+ OSL_FAIL( "OAccessibleControlContext::getModelStringProperty: caught an exception!" );
}
return sReturn;
}
@@ -256,7 +256,7 @@ namespace toolkit
// want to do some VCL stuff here ...
OContextEntryGuard aGuard( this );
- OSL_ENSURE( sal_False, "OAccessibleControlContext::implGetBounds: performance issue: forced to calc the size myself!" );
+ OSL_FAIL( "OAccessibleControlContext::implGetBounds: performance issue: forced to calc the size myself!" );
// In design mode (and this is what this class is for), the surrounding shape (if any) should handle this call
// The problem is that in design mode, our size may not be correct (in the drawing layer, controls are
// positioned/sized for painting only), and that calculation of our position is expensive
@@ -319,7 +319,7 @@ namespace toolkit
//--------------------------------------------------------------------
void SAL_CALL OAccessibleControlContext::grabFocus( ) throw (RuntimeException)
{
- OSL_ENSURE( sal_False, "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" );
+ OSL_FAIL( "OAccessibleControlContext::grabFocus: !isFocusTraversable, but grabFocus!" );
}
//--------------------------------------------------------------------
diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 480399241f48..730ff6d11b21 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -631,7 +631,7 @@ void SAL_CALL GraphicControlModel::setFastPropertyValue_NoBroadcast( sal_Int32 n
}
catch( const ::com::sun::star::uno::Exception& )
{
- OSL_ENSURE( sal_False, "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" );
+ OSL_FAIL( "GraphicControlModel::setFastPropertyValue_NoBroadcast: caught an exception while aligning the ImagePosition/ImageAlign properties!" );
mbAdjustingImagePosition = sal_False;
}
}
@@ -2625,7 +2625,7 @@ void UnoListBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(u
#else
::rtl::OString sMessage( "UnoListBoxControl::itemStateChanged: caught an exception:\n" );
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_ENSURE( sal_False, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
}
}
@@ -2934,7 +2934,7 @@ void UnoComboBoxControl::itemStateChanged( const awt::ItemEvent& rEvent ) throw(
#else
::rtl::OString sMessage( "UnoComboBoxControl::itemStateChanged: caught an exception:\n" );
sMessage += ::rtl::OString( e.Message.getStr(), e.Message.getLength(), RTL_TEXTENCODING_ASCII_US );
- OSL_ENSURE( sal_False, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
}
}
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index dc35a4742029..ae2af72ab09b 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -197,7 +197,7 @@ namespace toolkitform
Reference< XInterface > xElement( xCurrentContainer->getByIndex( i ), UNO_QUERY );
if ( !xElement.is() )
{
- OSL_ENSURE( sal_False, "determineRadioGroupId: very suspicious!" );
+ OSL_FAIL( "determineRadioGroupId: very suspicious!" );
continue;
}
@@ -232,7 +232,7 @@ namespace toolkitform
}
++pElementNames;
}
- OSL_ENSURE( sal_False, "determineRadioGroupId: did not find the radios element name!" );
+ OSL_FAIL( "determineRadioGroupId: did not find the radios element name!" );
}
}
@@ -386,7 +386,7 @@ namespace toolkitform
case awt::TextAlign::CENTER: _rpDescriptor->TextStyle |= TEXT_DRAW_CENTER; break;
case awt::TextAlign::RIGHT: _rpDescriptor->TextStyle |= TEXT_DRAW_RIGHT; break;
default:
- OSL_ENSURE( sal_False, "describePDFControl: invalid text align!" );
+ OSL_FAIL( "describePDFControl: invalid text align!" );
}
}
// ............................
@@ -403,7 +403,7 @@ namespace toolkitform
case VerticalAlignment_MIDDLE: _rpDescriptor->TextStyle |= TEXT_DRAW_VCENTER; break;
case VerticalAlignment_BOTTOM: _rpDescriptor->TextStyle |= TEXT_DRAW_BOTTOM; break;
default:
- OSL_ENSURE( sal_False, "describePDFControl: invalid vertical text align!" );
+ OSL_FAIL( "describePDFControl: invalid vertical text align!" );
}
}
}
@@ -598,7 +598,7 @@ namespace toolkitform
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "describePDFControl: caught an exception!" );
+ OSL_FAIL( "describePDFControl: caught an exception!" );
}
}
diff --git a/toolkit/source/helper/imagealign.cxx b/toolkit/source/helper/imagealign.cxx
index 4c782c99c37e..883aac322568 100644
--- a/toolkit/source/helper/imagealign.cxx
+++ b/toolkit/source/helper/imagealign.cxx
@@ -59,7 +59,7 @@ namespace toolkit
case IMAGEALIGN_BOTTOM_RIGHT: nReturn = BelowRight; break;
case IMAGEALIGN_CENTER: nReturn = Centered; break;
default:
- OSL_ENSURE( sal_False, "translateImagePosition: unknown IMAGEALIGN value!" );
+ OSL_FAIL( "translateImagePosition: unknown IMAGEALIGN value!" );
}
return nReturn;
}
@@ -83,7 +83,7 @@ namespace toolkit
case BelowRight: nReturn = IMAGEALIGN_BOTTOM_RIGHT; break;
case Centered: nReturn = IMAGEALIGN_CENTER; break;
default:
- OSL_ENSURE( sal_False, "translateImagePosition: unknown css.awt.ImagePosition value!" );
+ OSL_FAIL( "translateImagePosition: unknown css.awt.ImagePosition value!" );
}
return nReturn;
}
@@ -111,7 +111,7 @@ namespace toolkit
case IMAGEALIGN_CENTER: nReturn = TOP; break;
default:
- OSL_ENSURE( sal_False, "getCompatibleImageAlign: unknown IMAGEALIGN value!" );
+ OSL_FAIL( "getCompatibleImageAlign: unknown IMAGEALIGN value!" );
}
return nReturn;
}
@@ -126,7 +126,7 @@ namespace toolkit
case RIGHT: nReturn = RightCenter; break;
case BOTTOM: nReturn = BelowCenter; break;
default:
- OSL_ENSURE( sal_False, "getExtendedImagePosition: unknown ImageAlign value!" );
+ OSL_FAIL( "getExtendedImagePosition: unknown ImageAlign value!" );
}
return nReturn;
}
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx
index e2755f8a8112..7f8de3e25e59 100644
--- a/toolkit/source/helper/vclunohelper.cxx
+++ b/toolkit/source/helper/vclunohelper.cxx
@@ -444,7 +444,7 @@ MapUnit VCLUnoHelper::UnoEmbed2VCLMapUnit( sal_Int32 nUnoEmbedMapUnit )
return MAP_PIXEL;
}
- OSL_ENSURE( sal_False, "Unexpected UNO map mode is provided!\n" );
+ OSL_FAIL( "Unexpected UNO map mode is provided!\n" );
return MAP_LASTENUMDUMMY;
}
@@ -477,7 +477,7 @@ sal_Int32 VCLUnoHelper::VCL2UnoEmbedMapUnit( MapUnit nVCLMapUnit )
default: ; // avoid compiler warning
}
- OSL_ENSURE( sal_False, "Unexpected VCL map mode is provided!\n" );
+ OSL_FAIL( "Unexpected VCL map mode is provided!\n" );
return -1;
}
diff --git a/ucbhelper/source/client/content.cxx b/ucbhelper/source/client/content.cxx
index 3592049c95f4..7f73b6492d55 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1533,8 +1533,7 @@ sal_Bool Content::transferContent( const Content& rSourceContent,
ContentBroker* pBroker = ContentBroker::get();
if ( !pBroker )
{
- OSL_ENSURE( sal_False,
- "Content::transferContent - No Content Broker!" );
+ OSL_FAIL( "Content::transferContent - No Content Broker!" );
return sal_False;
}
@@ -1542,8 +1541,7 @@ sal_Bool Content::transferContent( const Content& rSourceContent,
pBroker->getCommandProcessorInterface() );
if ( !xCmdProc.is() )
{
- OSL_ENSURE( sal_False,
- "Content::transferContent - No XCommandProcessor!" );
+ OSL_FAIL( "Content::transferContent - No XCommandProcessor!" );
return sal_False;
}
diff --git a/ucbhelper/source/client/interceptedinteraction.cxx b/ucbhelper/source/client/interceptedinteraction.cxx
index 0556e181c48b..0d774b29c793 100644
--- a/ucbhelper/source/client/interceptedinteraction.cxx
+++ b/ucbhelper/source/client/interceptedinteraction.cxx
@@ -130,7 +130,7 @@ void InterceptedInteraction::impl_handleDefault(const ::com::sun::star::uno::Ref
// Runtime error! The defined continuation could not be located
// inside the set of available containuations of the incoming request.
// Whats wrong - the interception list or the request?
- OSL_ENSURE(sal_False, "InterceptedInteraction::handle()\nCould intercept this interaction request - but cant locate the right continuation!");
+ OSL_FAIL("InterceptedInteraction::handle()\nCould intercept this interaction request - but cant locate the right continuation!");
}
break;
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx
index beb1b194fac2..4f99baacbb2d 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -260,8 +260,7 @@ bool getConfigStringValue(
if ( !( xNameAccess->getByName( rtl::OUString::createFromAscii( key ) )
>>= value ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
+ OSL_FAIL( "InternetProxyDecider - "
"Error getting config item value!" );
return false;
}
@@ -289,8 +288,7 @@ bool getConfigInt32Value(
rtl::OUString::createFromAscii( key ) );
if ( aValue.hasValue() && !( aValue >>= value ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - "
+ OSL_FAIL( "InternetProxyDecider - "
"Error getting config item value!" );
return false;
}
@@ -406,7 +404,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
catch ( uno::Exception const & )
{
// createInstance, createInstanceWithArguments
- OSL_ENSURE( sal_False, "InternetProxyDecider - Exception!" );
+ OSL_FAIL( "InternetProxyDecider - Exception!" );
}
}
@@ -603,8 +601,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_nProxyType ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -614,8 +611,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
rtl::OUString aNoProxyList;
if ( !( rElem.Element >>= aNoProxyList ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
@@ -626,8 +622,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpProxy.aName ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -636,8 +631,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpProxy.nPort ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
@@ -649,8 +643,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpsProxy.aName ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -659,8 +652,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aHttpsProxy.nPort ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
@@ -672,8 +664,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aFtpProxy.aName ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
@@ -682,8 +673,7 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
{
if ( !( rElem.Element >>= m_aFtpProxy.nPort ) )
{
- OSL_ENSURE( sal_False,
- "InternetProxyDecider - changesOccurred - "
+ OSL_FAIL( "InternetProxyDecider - changesOccurred - "
"Error getting config item value!" );
}
}
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 36694413d0fa..457c1b4e81e7 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -84,7 +84,7 @@ void cancelCommandExecution( const uno::Any & rException,
cppu::throwException( rException );
- OSL_ENSURE( sal_False, "Return from cppu::throwException call!!!" );
+ OSL_FAIL( "Return from cppu::throwException call!!!" );
throw uno::RuntimeException();
}
@@ -122,7 +122,7 @@ void cancelCommandExecution( const ucb::IOErrorCode eError,
cppu::throwException( xRequest->getRequest() );
- OSL_ENSURE( sal_False, "Return from cppu::throwException call!!!" );
+ OSL_FAIL( "Return from cppu::throwException call!!!" );
throw uno::RuntimeException();
}
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index dfb91b4642c2..6a5073750b9a 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -597,20 +597,17 @@ void SAL_CALL ContentImplHelper::addProperty(
}
catch ( beans::PropertyExistException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::addProperty - Exists!" );
+ OSL_FAIL( "ContentImplHelper::addProperty - Exists!" );
throw;
}
catch ( beans::IllegalTypeException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::addProperty - Wrong Type!" );
+ OSL_FAIL( "ContentImplHelper::addProperty - Wrong Type!" );
throw;
}
catch ( lang::IllegalArgumentException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::addProperty - Illegal Arg!" );
+ OSL_FAIL( "ContentImplHelper::addProperty - Illegal Arg!" );
throw;
}
@@ -664,7 +661,7 @@ void SAL_CALL ContentImplHelper::removeProperty( const rtl::OUString& Name )
}
catch ( beans::UnknownPropertyException const & )
{
- OSL_ENSURE( sal_False, "ContentImplHelper::removeProperty - Unknown!" );
+ OSL_FAIL( "ContentImplHelper::removeProperty - Unknown!" );
throw;
}
@@ -692,14 +689,12 @@ void SAL_CALL ContentImplHelper::removeProperty( const rtl::OUString& Name )
}
catch ( beans::UnknownPropertyException const & )
{
- OSL_ENSURE( sal_False,
- "ContentImplHelper::removeProperty - Unknown!" );
+ OSL_FAIL( "ContentImplHelper::removeProperty - Unknown!" );
throw;
}
catch ( beans::NotRemoveableException const & )
{
- OSL_ENSURE(
- sal_False,
+ OSL_FAIL(
"ContentImplHelper::removeProperty - Unremoveable!" );
throw;
}
diff --git a/ucbhelper/source/provider/propertyvalueset.cxx b/ucbhelper/source/provider/propertyvalueset.cxx
index d73dabd9573c..c6ab550237c1 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -164,7 +164,7 @@ class PropertyValues : public PropertyValuesVector {};
if ( ( columnIndex < 1 ) \
|| ( columnIndex > sal_Int32( m_pValues->size() ) ) ) \
{ \
- OSL_ENSURE( sal_False, "PropertyValueSet - index out of range!" ); \
+ OSL_FAIL( "PropertyValueSet - index out of range!" ); \
} \
else \
{ \
@@ -480,7 +480,7 @@ Any SAL_CALL PropertyValueSet::getObject(
if ( ( columnIndex < 1 )
|| ( columnIndex > sal_Int32( m_pValues->size() ) ) )
{
- OSL_ENSURE( sal_False, "PropertyValueSet - index out of range!" );
+ OSL_FAIL( "PropertyValueSet - index out of range!" );
}
else
{
@@ -577,8 +577,7 @@ Any SAL_CALL PropertyValueSet::getObject(
case OBJECT_VALUE_SET:
// Fall-through is intended!
default:
- OSL_ENSURE( sal_False,
- "PropertyValueSet::getObject - "
+ OSL_FAIL( "PropertyValueSet::getObject - "
"Wrong original type" );
break;
}
diff --git a/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx b/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
index d3a7259d91cb..16946664e518 100644
--- a/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
+++ b/ucbhelper/source/provider/simplecertificatevalidationrequest.cxx
@@ -83,7 +83,7 @@ sal_Int32 SimpleCertificateValidationRequest::getResponse() const
if ( xDisapprove.is() )
return 8;
- OSL_ENSURE( sal_False, "CertificateValidationRequest - Unknown continuation!" );
+ OSL_FAIL( "CertificateValidationRequest - Unknown continuation!" );
}
return 0;
}
diff --git a/ucbhelper/source/provider/simpleinteractionrequest.cxx b/ucbhelper/source/provider/simpleinteractionrequest.cxx
index e178b695da15..69e833434b54 100644
--- a/ucbhelper/source/provider/simpleinteractionrequest.cxx
+++ b/ucbhelper/source/provider/simpleinteractionrequest.cxx
@@ -125,8 +125,7 @@ sal_Int32 SimpleInteractionRequest::getResponse() const
if ( xDisapprove.is() )
return CONTINUATION_DISAPPROVE;
- OSL_ENSURE( sal_False,
- "SimpleInteractionRequest::getResponse - Unknown continuation!" );
+ OSL_FAIL( "SimpleInteractionRequest::getResponse - Unknown continuation!" );
}
return CONTINUATION_UNKNOWN;
}
diff --git a/ucbhelper/workben/myucp/myucp_content.cxx b/ucbhelper/workben/myucp/myucp_content.cxx
index 35219355d071..0d24daa3d795 100644
--- a/ucbhelper/workben/myucp/myucp_content.cxx
+++ b/ucbhelper/workben/myucp/myucp_content.cxx
@@ -235,7 +235,7 @@ uno::Any SAL_CALL Content::execute(
uno::Sequence< beans::Property > Properties;
if ( !( aCommand.Argument >>= Properties ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -257,7 +257,7 @@ uno::Any SAL_CALL Content::execute(
uno::Sequence< beans::PropertyValue > aProperties;
if ( !( aCommand.Argument >>= aProperties ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -269,7 +269,7 @@ uno::Any SAL_CALL Content::execute(
if ( !aProperties.getLength() )
{
- OSL_ENSURE( sal_False, "No properties!" );
+ OSL_FAIL( "No properties!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -308,7 +308,7 @@ uno::Any SAL_CALL Content::execute(
ucb::OpenCommandArgument2 aOpenCommand;
if ( !( aCommand.Argument >>= aOpenCommand ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -403,7 +403,7 @@ uno::Any SAL_CALL Content::execute(
ucb::InsertCommandArgument arg;
if ( !( aCommand.Argument >>= arg ) )
{
- OSL_ENSURE( sal_False, "Wrong argument type!" );
+ OSL_FAIL( "Wrong argument type!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( lang::IllegalArgumentException(
rtl::OUString(),
@@ -442,7 +442,7 @@ uno::Any SAL_CALL Content::execute(
// Unsupported command
//////////////////////////////////////////////////////////////////
- OSL_ENSURE( sal_False, "Content::execute - unsupported command!" );
+ OSL_FAIL( "Content::execute - unsupported command!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::UnsupportedCommandException(
@@ -867,7 +867,7 @@ void Content::insert(
bool bNeedInputStream = true; // @@@ adjust to real requirements
if ( bNeedInputStream && !xInputStream.is() )
{
- OSL_ENSURE( sal_False, "Content::insert - No data stream!" );
+ OSL_FAIL( "Content::insert - No data stream!" );
::ucbhelper::cancelCommandExecution(
uno::makeAny( ucb::MissingInputStreamException(
diff --git a/unotools/inc/unotools/loghelper.hxx b/unotools/inc/unotools/loghelper.hxx
index 4427d45445f0..bae5c7ed09c4 100644
--- a/unotools/inc/unotools/loghelper.hxx
+++ b/unotools/inc/unotools/loghelper.hxx
@@ -45,7 +45,7 @@ inline void logIt(const css::uno::Exception& ex)
sMsg.appendAscii("Unexpected exception catched. Original message was:\n\"" );
sMsg.append(ex.Message);
sMsg.appendAscii("\"");
- OSL_ENSURE(sal_False, ::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr());
+ OSL_FAIL(::rtl::OUStringToOString(sMsg.makeStringAndClear(), RTL_TEXTENCODING_UTF8).getStr());
}
#endif
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index b7dac4dcfab9..4a3809c222fb 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -69,7 +69,7 @@ inline void lcl_CFG_DBG_EXCEPTION(const sal_Char* cText, const Exception& rEx)
{
OString sMsg(cText);
sMsg += OString(rEx.Message.getStr(), rEx.Message.getLength(), RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#define CATCH_INFO(a) \
catch(Exception& rEx) \
@@ -482,7 +482,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
{
if(pImpl->pManager->IsLocalConfigProvider() && lcl_IsLocalProperty(sSubTree, rNames[i]))
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nlocal mode seams to be used!?\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nlocal mode seams to be used!?\n");
continue;
}
@@ -493,7 +493,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
::utl::splitLastFromConfigurationPath(sName,sPath,sProperty);
if (!sPath.getLength() && !sProperty.getLength())
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nsplitt failed\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nsplitt failed\n");
continue;
}
@@ -505,7 +505,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
Any aNode = xHierarchyAccess->getByHierarchicalName(sPath);
if (!(aNode >>= xNode) || !xNode.is())
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nno set available\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nno set available\n");
continue;
}
}
@@ -528,7 +528,7 @@ Sequence< sal_Bool > ConfigItem::GetReadOnlyStates(const com::sun::star::uno::Se
if (!xInfo.is())
{
- OSL_ENSURE(sal_False, "ConfigItem::IsReadonly()\nno prop info available\n");
+ OSL_FAIL("ConfigItem::IsReadonly()\nno prop info available\n");
continue;
}
@@ -581,7 +581,7 @@ Sequence< Any > ConfigItem::GetProperties(const Sequence< OUString >& rNames)
sMsg += OString(pNames[i].getStr(),
pNames[i].getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
#else
(void) rEx; // avoid warning
#endif
diff --git a/unotools/source/config/configmgr.cxx b/unotools/source/config/configmgr.cxx
index 144d53dd4401..9fc53924e97b 100644
--- a/unotools/source/config/configmgr.cxx
+++ b/unotools/source/config/configmgr.cxx
@@ -165,7 +165,7 @@ Reference< XMultiServiceFactory > ConfigManager::GetConfigurationProvider()
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
}
#else
@@ -221,7 +221,7 @@ void ConfigManager::RegisterConfigItem(utl::ConfigItem& rCfgItem)
{
ConfigItemListEntry_Impl& rEntry = *aListIter;
if(rEntry.pConfigItem == &rCfgItem)
- OSL_ENSURE(sal_False, "RegisterConfigItem: already inserted!");
+ OSL_FAIL("RegisterConfigItem: already inserted!");
}
#endif
pMgrImpl->aItemList.insert(aListIter, ConfigItemListEntry_Impl(&rCfgItem));
@@ -297,7 +297,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::AcquireTree(utl::ConfigItem&
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#endif
}
@@ -530,7 +530,7 @@ Any ConfigManager::GetDirectConfigProperty(ConfigProperty eProp)
aBuf.append( "\" under \"" );
aBuf.append( rtl::OUStringToOString( sPath, RTL_TEXTENCODING_ASCII_US ) );
aBuf.append( "\" (caught an exception)!" );
- OSL_ENSURE( sal_False, aBuf.getStr() );
+ OSL_FAIL( aBuf.getStr() );
#endif
}
}
@@ -632,7 +632,7 @@ Reference< XHierarchicalNameAccess> ConfigManager::GetHierarchyAccess(const OUSt
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#else
catch(Exception&){}
@@ -663,7 +663,7 @@ Any ConfigManager::GetLocalProperty(const OUString& rProperty)
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#else
catch(Exception&){}
@@ -693,7 +693,7 @@ void ConfigManager::PutLocalProperty(const OUString& rProperty, const Any& rValu
sMsg += OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
#else
catch(Exception& ){}
diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx
index 65f7b2b631c9..264eda0f59ce 100644
--- a/unotools/source/config/confignode.cxx
+++ b/unotools/source/config/confignode.cxx
@@ -210,7 +210,7 @@ namespace utl
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::getNodeNames: caught a generic exception!");
+ OSL_FAIL("OConfigurationNode::getNodeNames: caught a generic exception!");
}
}
@@ -236,16 +236,16 @@ namespace utl
aBuf.append("OConfigurationNode::removeNode: there is no element named!");
aBuf.append( rtl::OUStringToOString( _rName, RTL_TEXTENCODING_ASCII_US ) );
aBuf.append( "!" );
- OSL_ENSURE(sal_False, aBuf.getStr());
+ OSL_FAIL(aBuf.getStr());
#endif
}
catch (WrappedTargetException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::removeNode: caught a WrappedTargetException!");
+ OSL_FAIL("OConfigurationNode::removeNode: caught a WrappedTargetException!");
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::removeNode: caught a generic exception!");
+ OSL_FAIL("OConfigurationNode::removeNode: caught a generic exception!");
}
}
return sal_False;
@@ -316,12 +316,12 @@ namespace utl
if (m_xDirectAccess.is() && m_xDirectAccess->hasByName(sNormalized))
{
if (!::cppu::extractInterface(xNode, m_xDirectAccess->getByName(sNormalized)))
- OSL_ENSURE(sal_False, "OConfigurationNode::openNode: could not open the node!");
+ OSL_FAIL("OConfigurationNode::openNode: could not open the node!");
}
else if (m_xHierarchyAccess.is())
{
if (!::cppu::extractInterface(xNode, m_xHierarchyAccess->getByHierarchicalName(_rPath)))
- OSL_ENSURE(sal_False, "OConfigurationNode::openNode: could not open the node!");
+ OSL_FAIL("OConfigurationNode::openNode: could not open the node!");
}
if (xNode.is())
return OConfigurationNode( xNode );
@@ -334,12 +334,12 @@ namespace utl
aBuf.append("OConfigurationNode::openNode: there is no element named ");
aBuf.append( rtl::OUStringToOString( _rPath, RTL_TEXTENCODING_ASCII_US ) );
aBuf.append("!");
- OSL_ENSURE(sal_False, aBuf.getStr());
+ OSL_FAIL(aBuf.getStr());
#endif
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::openNode: caught an exception while retrieving the node!");
+ OSL_FAIL("OConfigurationNode::openNode: caught an exception while retrieving the node!");
}
return OConfigurationNode();
}
@@ -437,19 +437,19 @@ namespace utl
}
catch(IllegalArgumentException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught an IllegalArgumentException!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught an IllegalArgumentException!");
}
catch(NoSuchElementException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught a NoSuchElementException!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a NoSuchElementException!");
}
catch(WrappedTargetException&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught a WrappedTargetException!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a WrappedTargetException!");
}
catch(Exception&)
{
- OSL_ENSURE(sal_False, "OConfigurationNode::setNodeValue: could not replace the value: caught a generic Exception!");
+ OSL_FAIL("OConfigurationNode::setNodeValue: could not replace the value: caught a generic Exception!");
}
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index 9c162484c7aa..f9a22805dd6d 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -104,7 +104,7 @@ ItemHolder1::ItemHolder1()
sMsg += ::rtl::OString(rEx.Message.getStr(),
rEx.Message.getLength(),
RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, sMsg.getStr());
+ OSL_FAIL(sMsg.getStr());
}
}
#else
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index 56da35f59f26..4edb4fb0968e 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -478,7 +478,7 @@ SvtModuleOptions_Impl::~SvtModuleOptions_Impl()
*//*-*************************************************************************************************************/
void SvtModuleOptions_Impl::Notify( const css::uno::Sequence< ::rtl::OUString >& )
{
- OSL_ENSURE( sal_False, "SvtModuleOptions_Impl::Notify()\nNot implemented yet!\n" );
+ OSL_FAIL( "SvtModuleOptions_Impl::Notify()\nNot implemented yet!\n" );
}
/*-****************************************************************************************************//**
diff --git a/unotools/source/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index f622b8d893a4..c0eecd9e7edd 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -859,7 +859,7 @@ SvtViewOptions::SvtViewOptions( EViewType eType ,
}
}
break;
- default : OSL_ENSURE( sal_False, "SvtViewOptions::SvtViewOptions()\nThese view type is unknown! All following calls at these instance will do nothing!\n" );
+ default : OSL_FAIL( "SvtViewOptions::SvtViewOptions()\nThese view type is unknown! All following calls at these instance will do nothing!\n" );
}
}
diff --git a/unotools/source/misc/desktopterminationobserver.cxx b/unotools/source/misc/desktopterminationobserver.cxx
index 064855a3c4f3..b9f457792dde 100644
--- a/unotools/source/misc/desktopterminationobserver.cxx
+++ b/unotools/source/misc/desktopterminationobserver.cxx
@@ -123,7 +123,7 @@ namespace utl
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "OObserverImpl::ensureObservation: caught an exception!" );
+ OSL_FAIL( "OObserverImpl::ensureObservation: caught an exception!" );
}
}
diff --git a/unotools/source/misc/eventlisteneradapter.cxx b/unotools/source/misc/eventlisteneradapter.cxx
index fe555d906347..4ee8c8430027 100644
--- a/unotools/source/misc/eventlisteneradapter.cxx
+++ b/unotools/source/misc/eventlisteneradapter.cxx
@@ -169,7 +169,7 @@ namespace utl
{
if (!_rxComp.is())
{
- OSL_ENSURE(sal_False, "OEventListenerAdapter::startComponentListening: invalid component!");
+ OSL_FAIL("OEventListenerAdapter::startComponentListening: invalid component!");
return;
}
diff --git a/unotools/source/misc/sharedunocomponent.cxx b/unotools/source/misc/sharedunocomponent.cxx
index 62461bd2d480..8da98aa34954 100644
--- a/unotools/source/misc/sharedunocomponent.cxx
+++ b/unotools/source/misc/sharedunocomponent.cxx
@@ -71,7 +71,7 @@ namespace utl
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "DisposableComponent::~DisposableComponent: caught an exception!" );
+ OSL_FAIL( "DisposableComponent::~DisposableComponent: caught an exception!" );
}
m_xComponent.clear();
}
@@ -157,7 +157,7 @@ namespace utl
catch( const CloseVetoException& ) { /* fine */ }
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "CloseableComponentImpl::nf_closeComponent: caught an unexpected exception!" );
+ OSL_FAIL( "CloseableComponentImpl::nf_closeComponent: caught an unexpected exception!" );
}
// reset
@@ -179,7 +179,7 @@ namespace utl
}
catch( const Exception& )
{
- OSL_ENSURE( sal_False, "CloseableComponentImpl::impl_nf_switchListening: caught an exception!" );
+ OSL_FAIL( "CloseableComponentImpl::impl_nf_switchListening: caught an exception!" );
}
}
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 76fc443fb8ae..513a8e0672ce 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -914,7 +914,7 @@ sal_Bool UCBContentHelper::EqualURLs( const ::rtl::OUString& aFirstURL, const ::
}
catch( uno::Exception& )
{
- OSL_ENSURE( sal_False, "Can't compare URL's, treat as different!\n" );
+ OSL_FAIL( "Can't compare URL's, treat as different!\n" );
}
}
}
diff --git a/vcl/aqua/source/dtrans/OSXTransferable.cxx b/vcl/aqua/source/dtrans/OSXTransferable.cxx
index eeafb3e394da..040c452ec6c8 100644
--- a/vcl/aqua/source/dtrans/OSXTransferable.cxx
+++ b/vcl/aqua/source/dtrans/OSXTransferable.cxx
@@ -172,7 +172,7 @@ bool OSXTransferable::compareDataFlavors(const DataFlavor& lhs, const DataFlavor
}
catch( IllegalArgumentException& )
{
- OSL_ENSURE( sal_False, "Invalid content type detected" );
+ OSL_FAIL( "Invalid content type detected" );
return false;
}
diff --git a/vcl/aqua/source/dtrans/test_aquacb.cxx b/vcl/aqua/source/dtrans/test_aquacb.cxx
index e3b3d7cc3af2..1803f786c8a9 100644
--- a/vcl/aqua/source/dtrans/test_aquacb.cxx
+++ b/vcl/aqua/source/dtrans/test_aquacb.cxx
@@ -147,7 +147,7 @@ int SAL_CALL main( int argc, 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);
}
@@ -160,7 +160,7 @@ int SAL_CALL main( int argc, char** argv )
Reference< XClipboard > xClipboard( g_xFactory->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( AQUA_CLIPBOARD_SERVICE_NAME ) ) ), UNO_QUERY );
if ( !xClipboard.is() )
{
- OSL_ENSURE( sal_False, "Error creating FolderPicker Service" );
+ OSL_FAIL( "Error creating FolderPicker Service" );
return(-1);
}
@@ -196,7 +196,7 @@ int SAL_CALL main( int argc, 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();