diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:09:49 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-03-19 14:09:49 +0100 |
commit | 970be45287de1a046df1c546abb06ad5f6b9c084 (patch) | |
tree | 0a88a771e96b5e9d884e5b087adad9d320bdbe7b /ucb | |
parent | e35cffb37a792b78f8dbcd85b329fa88097b1ea5 (diff) |
Move OSL_ENSURE(sal_False,...) to OSL_FAIL(...)
Diffstat (limited to 'ucb')
23 files changed, 278 insertions, 449 deletions
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx index c4e2f8bb113e..f927c658d426 100755 --- a/ucb/source/cacher/cachedcontentresultset.cxx +++ b/ucb/source/cacher/cachedcontentresultset.cxx @@ -74,7 +74,7 @@ if( !m_aCache.hasRow( nRow ) ) \ { \ if( !m_xFetchProvider.is() ) \ { \ - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); \ + OSL_FAIL( "broadcaster was disposed already" ); \ throw SQLException(); \ } \ aGuard.clear(); \ @@ -469,7 +469,7 @@ CCRS_PropertySetInfo::CCRS_PropertySetInfo( } else { - OSL_ENSURE( sal_False, "The received XPropertySetInfo doesn't contain required properties" ); + OSL_FAIL( "The received XPropertySetInfo doesn't contain required properties" ); m_pProperties = new Sequence<Property>; } @@ -630,7 +630,7 @@ sal_Int32 SAL_CALL CCRS_PropertySetInfo if( !m_pProperties ) { - OSL_ENSURE( sal_False, "Properties not initialized yet" ); + OSL_FAIL( "Properties not initialized yet" ); return nHandle; } sal_Bool bFound = sal_True; @@ -727,7 +727,7 @@ sal_Bool SAL_CALL CachedContentResultSet OSL_ENSURE( nRow >= 0, "only positive values supported" ); if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return sal_False; } // OSL_ENSURE( nRow <= m_nKnownCount, "don't step into regions you don't know with this method" ); @@ -995,7 +995,7 @@ void SAL_CALL CachedContentResultSet if( !getPropertySetInfo().is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } @@ -1086,7 +1086,7 @@ void SAL_CALL CachedContentResultSet osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return; } } @@ -1106,7 +1106,7 @@ Any SAL_CALL CachedContentResultSet if( !getPropertySetInfo().is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } @@ -1145,7 +1145,7 @@ Any SAL_CALL CachedContentResultSet osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } } @@ -1204,7 +1204,7 @@ void SAL_CALL CachedContentResultSet sal_Int32 nNew = 0; if( !( aEvt.NewValue >>= nNew ) ) { - OSL_ENSURE( sal_False, "PropertyChangeEvent contains wrong data" ); + OSL_FAIL( "PropertyChangeEvent contains wrong data" ); return; } @@ -1218,7 +1218,7 @@ void SAL_CALL CachedContentResultSet sal_Bool bNew = sal_False; if( !( aEvt.NewValue >>= bNew ) ) { - OSL_ENSURE( sal_False, "PropertyChangeEvent contains wrong data" ); + OSL_FAIL( "PropertyChangeEvent contains wrong data" ); return; } impl_changeIsRowCountFinal( m_bFinalCount, bNew ); @@ -1270,7 +1270,7 @@ if( !m_aCache##XXX.hasRow( nRow ) ) \ { \ if( !m_xFetchProviderForContentAccess.is() ) \ { \ - OSL_ENSURE( sal_False, "broadcaster was disposed already" );\ + OSL_FAIL( "broadcaster was disposed already" );\ throw RuntimeException(); \ } \ aGuard.clear(); \ @@ -1423,7 +1423,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return sal_False; } if( row < 0 ) @@ -1635,7 +1635,7 @@ sal_Bool SAL_CALL CachedContentResultSet //unknown position if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return sal_False; } aGuard.clear(); @@ -1713,7 +1713,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return sal_False; } aGuard.clear(); @@ -1748,7 +1748,7 @@ sal_Bool SAL_CALL CachedContentResultSet if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return sal_False; } aGuard.clear(); @@ -1922,7 +1922,7 @@ sal_Bool SAL_CALL CachedContentResultSet return m_bLastCachedReadWasNull; if( !m_xRowOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return sal_False; } } @@ -2078,7 +2078,7 @@ Any SAL_CALL CachedContentResultSet { if( !m_xFetchProvider.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return Any(); } aGuard.clear(); diff --git a/ucb/source/cacher/cachedcontentresultsetstub.cxx b/ucb/source/cacher/cachedcontentresultsetstub.cxx index a381911d53da..dd43d8680261 100755 --- a/ucb/source/cacher/cachedcontentresultsetstub.cxx +++ b/ucb/source/cacher/cachedcontentresultsetstub.cxx @@ -187,7 +187,7 @@ XSERVICEINFO_NOFACTORY_IMPL_1( CachedContentResultSetStub, impl_EnsureNotDisposed(); \ if( !m_xResultSetOrigin.is() ) \ { \ - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); \ + OSL_FAIL( "broadcaster was disposed already" ); \ throw RuntimeException(); \ } \ impl_propagateFetchSizeAndDirection( nRowCount, bDirection ); \ @@ -325,7 +325,7 @@ sal_Int32 SAL_CALL CachedContentResultSetStub } catch( SQLException& ) { - OSL_ENSURE( sal_False, "couldn't determine the column count" ); + OSL_FAIL( "couldn't determine the column count" ); nCount = 0; } } diff --git a/ucb/source/cacher/contentresultsetwrapper.cxx b/ucb/source/cacher/contentresultsetwrapper.cxx index 60a824c8351c..a66c288276e2 100755 --- a/ucb/source/cacher/contentresultsetwrapper.cxx +++ b/ucb/source/cacher/contentresultsetwrapper.cxx @@ -327,7 +327,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper impl_init_xPropertySetOrigin(); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); m_nForwardOnly = 0; return m_nForwardOnly; } @@ -388,7 +388,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - OSL_ENSURE( sal_False, "could not remove PropertyChangeListener" ); + OSL_FAIL( "could not remove PropertyChangeListener" ); } try { @@ -397,7 +397,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - OSL_ENSURE( sal_False, "could not remove VetoableChangeListener" ); + OSL_FAIL( "could not remove VetoableChangeListener" ); } Reference< XComponent > xComponentOrigin( m_xResultSetOrigin, UNO_QUERY ); @@ -545,7 +545,7 @@ void SAL_CALL ContentResultSetWrapper impl_init_xPropertySetOrigin(); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } m_xPropertySetOrigin->setPropertyValue( rPropertyName, rValue ); @@ -563,7 +563,7 @@ Any SAL_CALL ContentResultSetWrapper impl_init_xPropertySetOrigin(); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } return m_xPropertySetOrigin->getPropertyValue( rPropertyName ); @@ -583,7 +583,7 @@ void SAL_CALL ContentResultSetWrapper if( !getPropertySetInfo().is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } @@ -604,7 +604,7 @@ void SAL_CALL ContentResultSetWrapper osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return; } } @@ -635,7 +635,7 @@ void SAL_CALL ContentResultSetWrapper if( !getPropertySetInfo().is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw UnknownPropertyException(); } if( rPropertyName.getLength() ) @@ -655,7 +655,7 @@ void SAL_CALL ContentResultSetWrapper osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return; } } @@ -715,7 +715,7 @@ void SAL_CALL ContentResultSetWrapper osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return; } } @@ -726,7 +726,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - OSL_ENSURE( sal_False, "could not remove PropertyChangeListener" ); + OSL_FAIL( "could not remove PropertyChangeListener" ); } } } @@ -774,7 +774,7 @@ void SAL_CALL ContentResultSetWrapper osl::Guard< osl::Mutex > aGuard( m_aMutex ); if( !m_xPropertySetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); return; } } @@ -785,7 +785,7 @@ void SAL_CALL ContentResultSetWrapper } catch( Exception& ) { - OSL_ENSURE( sal_False, "could not remove VetoableChangeListener" ); + OSL_FAIL( "could not remove VetoableChangeListener" ); } } } @@ -860,7 +860,7 @@ OUString SAL_CALL ContentResultSetWrapper impl_init_xContentAccessOrigin(); if( !m_xContentAccessOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xContentAccessOrigin->queryContentIdentifierString(); @@ -876,7 +876,7 @@ Reference< XContentIdentifier > SAL_CALL ContentResultSetWrapper impl_init_xContentAccessOrigin(); if( !m_xContentAccessOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xContentAccessOrigin->queryContentIdentifier(); @@ -892,7 +892,7 @@ Reference< XContent > SAL_CALL ContentResultSetWrapper impl_init_xContentAccessOrigin(); if( !m_xContentAccessOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xContentAccessOrigin->queryContent(); @@ -912,7 +912,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->next(); @@ -928,7 +928,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->previous(); @@ -944,7 +944,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->absolute( row ); @@ -960,7 +960,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->relative( rows ); @@ -977,7 +977,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->first(); @@ -993,7 +993,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->last(); @@ -1009,7 +1009,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } m_xResultSetOrigin->beforeFirst(); @@ -1025,7 +1025,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } m_xResultSetOrigin->afterLast(); @@ -1041,7 +1041,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isAfterLast(); @@ -1057,7 +1057,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isBeforeFirst(); @@ -1073,7 +1073,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isFirst(); @@ -1089,7 +1089,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->isLast(); @@ -1106,7 +1106,7 @@ sal_Int32 SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->getRow(); @@ -1122,7 +1122,7 @@ void SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } m_xResultSetOrigin->refreshRow(); @@ -1138,7 +1138,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->rowUpdated(); @@ -1153,7 +1153,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->rowInserted(); @@ -1169,7 +1169,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper if( !m_xResultSetOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xResultSetOrigin->rowDeleted(); @@ -1195,7 +1195,7 @@ impl_EnsureNotDisposed(); \ impl_init_xRowOrigin(); \ if( !m_xRowOrigin.is() ) \ { \ - OSL_ENSURE( sal_False, "broadcaster was disposed already" );\ + OSL_FAIL( "broadcaster was disposed already" );\ throw RuntimeException(); \ } \ return m_xRowOrigin->getXXX( columnIndex ); @@ -1210,7 +1210,7 @@ sal_Bool SAL_CALL ContentResultSetWrapper impl_init_xRowOrigin(); if( !m_xRowOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xRowOrigin->wasNull(); @@ -1359,7 +1359,7 @@ Any SAL_CALL ContentResultSetWrapper impl_init_xRowOrigin(); if( !m_xRowOrigin.is() ) { - OSL_ENSURE( sal_False, "broadcaster was disposed already" ); + OSL_FAIL( "broadcaster was disposed already" ); throw RuntimeException(); } return m_xRowOrigin->getObject( columnIndex, typeMap ); diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx b/ucb/source/cacher/dynamicresultsetwrapper.cxx index 3574c6813da7..75d655be2f84 100755 --- a/ucb/source/cacher/dynamicresultsetwrapper.cxx +++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx @@ -276,7 +276,7 @@ void SAL_CALL DynamicResultSetWrapper } else { - OSL_ENSURE( sal_False, "ListActionType was WELCOME but ActionInfo didn't contain a WelcomeDynamicResultSetStruct" ); + OSL_FAIL( "ListActionType was WELCOME but ActionInfo didn't contain a WelcomeDynamicResultSetStruct" ); //throw RuntimeException(); } break; @@ -444,7 +444,7 @@ void SAL_CALL DynamicResultSetWrapper return; } } - OSL_ENSURE( sal_False, "could not connect to cache" ); + OSL_FAIL( "could not connect to cache" ); throw ServiceNotFoundException(); } diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx index 8233a3300d9d..6e2c562f4903 100755 --- a/ucb/source/core/provprox.cxx +++ b/ucb/source/core/provprox.cxx @@ -257,8 +257,7 @@ sal_Int32 SAL_CALL UcbContentProviderProxy::compareContentIds( if ( xProvider.is() ) return xProvider->compareContentIds( Id1, Id2 ); - // OSL_ENSURE( sal_False, - // "UcbContentProviderProxy::compareContentIds - No provider!" ); + // OSL_FAIL( // "UcbContentProviderProxy::compareContentIds - No provider!" ); // @@@ What else? return 0; @@ -320,8 +319,7 @@ UcbContentProviderProxy::deregisterInstance( const OUString& Template, } catch ( IllegalIdentifierException const & ) { - OSL_ENSURE( sal_False, - "UcbContentProviderProxy::deregisterInstance - " + OSL_FAIL( "UcbContentProviderProxy::deregisterInstance - " "Caught IllegalIdentifierException!" ); } } @@ -383,8 +381,7 @@ UcbContentProviderProxy::getContentProvider() } catch ( IllegalIdentifierException const & ) { - OSL_ENSURE( sal_False, - "UcbContentProviderProxy::getContentProvider - " + OSL_FAIL( "UcbContentProviderProxy::getContentProvider - " "Caught IllegalIdentifierException!" ); } diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx index 488fcbfcd731..ce618d03b92b 100755 --- a/ucb/source/core/ucbcmds.cxx +++ b/ucb/source/core/ucbcmds.cxx @@ -466,8 +466,7 @@ NameClashContinuation interactiveNameClashResolve( } else { - OSL_ENSURE( sal_False, - "Unknown interaction continuation!" ); + OSL_FAIL( "Unknown interaction continuation!" ); return UNKNOWN; } } @@ -510,7 +509,7 @@ bool setTitle( if ( aErrors[ 0 ].hasValue() ) { // error occurred. - OSL_ENSURE( sal_False, "error setting Title property!" ); + OSL_FAIL( "error setting Title property!" ); return false; } } @@ -1008,7 +1007,7 @@ uno::Reference< io::XInputStream > getInputStream( } catch ( uno::Exception const & ) { - OSL_ENSURE( sal_False, "unable to get input stream from document!" ); + OSL_FAIL( "unable to get input stream from document!" ); } } @@ -1055,7 +1054,7 @@ uno::Reference< sdbc::XResultSet > getResultSet( } catch ( uno::Exception const & ) { - OSL_ENSURE( sal_False, "unable to get result set from folder!" ); + OSL_FAIL( "unable to get result set from folder!" ); } return xResultSet; @@ -1412,7 +1411,7 @@ void globalTransfer_( default: aArg.ReplaceExisting = sal_False; - OSL_ENSURE( sal_False, "Unknown nameclash directive!" ); + OSL_FAIL( "Unknown nameclash directive!" ); break; } @@ -2083,7 +2082,7 @@ void UniversalContentBroker::globalTransfer( } catch ( uno::Exception const & ) { - OSL_ENSURE( sal_False, "Cannot delete source object!" ); + OSL_FAIL( "Cannot delete source object!" ); throw; } } diff --git a/ucb/source/core/ucbprops.cxx b/ucb/source/core/ucbprops.cxx index a35de4af8e2a..b873d51e60f0 100755 --- a/ucb/source/core/ucbprops.cxx +++ b/ucb/source/core/ucbprops.cxx @@ -400,8 +400,7 @@ Sequence< Property > SAL_CALL UcbPropertiesManager::getProperties() { if ( nSize <= nPos ) { - OSL_ENSURE( sal_False, - "UcbPropertiesManager::getProperties - " + OSL_FAIL( "UcbPropertiesManager::getProperties - " "Initial size of property sequence too small!" ); m_pProps->realloc( 128 ); diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx index 1e8aeda7df0b..90ddde25e9cb 100755 --- a/ucb/source/core/ucbstore.cxx +++ b/ucb/source/core/ucbstore.cxx @@ -481,38 +481,33 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create ) { // insertByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::openPropertySet - " + OSL_FAIL( "PropertySetRegistry::openPropertySet - " "caught IllegalArgumentException!" ); } catch ( ElementExistException& ) { // insertByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::openPropertySet - " + OSL_FAIL( "PropertySetRegistry::openPropertySet - " "caught ElementExistException!" ); } catch ( WrappedTargetException& ) { // insertByName, commitChanges - OSL_ENSURE( sal_False, - "PropertySetRegistry::openPropertySet - " + OSL_FAIL( "PropertySetRegistry::openPropertySet - " "caught WrappedTargetException!" ); } catch ( RuntimeException& ) { - OSL_ENSURE( sal_False, - "PropertySetRegistry::openPropertySet - " + OSL_FAIL( "PropertySetRegistry::openPropertySet - " "caught RuntimeException!" ); } catch ( Exception& ) { // createInstance - OSL_ENSURE( sal_False, - "PropertySetRegistry::openPropertySet - " + OSL_FAIL( "PropertySetRegistry::openPropertySet - " "caught Exception!" ); } } @@ -524,8 +519,7 @@ PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create ) } } - OSL_ENSURE( sal_False, - "PropertySetRegistry::openPropertySet - Error!" ); + OSL_FAIL( "PropertySetRegistry::openPropertySet - Error!" ); } } @@ -577,8 +571,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key ) { // removeByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::removePropertySet - " + OSL_FAIL( "PropertySetRegistry::removePropertySet - " "caught NoSuchElementException!" ); return; } @@ -586,8 +579,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key ) { // commitChanges - OSL_ENSURE( sal_False, - "PropertySetRegistry::removePropertySet - " + OSL_FAIL( "PropertySetRegistry::removePropertySet - " "caught WrappedTargetException!" ); return; } @@ -596,7 +588,7 @@ void SAL_CALL PropertySetRegistry::removePropertySet( const OUString& key ) return; } - OSL_ENSURE( sal_False, "PropertySetRegistry::removePropertySet - Error!" ); + OSL_FAIL( "PropertySetRegistry::removePropertySet - Error!" ); } //========================================================================= @@ -743,8 +735,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, // New key not present? if ( xRootNameAccess->hasByName( rNewKey ) ) { - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "New key exists!" ); return; } @@ -789,8 +780,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // insertByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught IllegalArgumentException!" ); return; } @@ -798,8 +788,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // insertByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught ElementExistException!" ); return; } @@ -807,15 +796,13 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // insertByName, commitChanges - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught WrappedTargetException!" ); return; } catch ( RuntimeException& ) { - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught RuntimeException!" ); return; } @@ -823,8 +810,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // createInstance - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught Exception!" ); return; } @@ -837,8 +823,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xRootNameAccess, UNO_QUERY ); if ( !xRootHierNameAccess.is() ) { - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "No hierarchical name access!" ); return; } @@ -855,8 +840,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, >>= xOldNameAccess; if ( !xOldNameAccess.is() ) { - OSL_ENSURE( sal_False, - "PersistentPropertySet::renamePropertySet - " + OSL_FAIL( "PersistentPropertySet::renamePropertySet - " "No old name access!" ); return; } @@ -877,8 +861,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, >>= xNewFac; if ( !xNewFac.is() ) { - OSL_ENSURE( sal_False, - "PersistentPropertySet::renamePropertySet - " + OSL_FAIL( "PersistentPropertySet::renamePropertySet - " "No new factory!" ); return; } @@ -887,8 +870,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, xNewFac, UNO_QUERY ); if ( !xNewContainer.is() ) { - OSL_ENSURE( sal_False, - "PersistentPropertySet::renamePropertySet - " + OSL_FAIL( "PersistentPropertySet::renamePropertySet - " "No new container!" ); return; } @@ -910,8 +892,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, if ( !xNewPropNameReplace.is() ) { - OSL_ENSURE( sal_False, - "PersistentPropertySet::renamePropertySet - " + OSL_FAIL( "PersistentPropertySet::renamePropertySet - " "No new prop name replace!" ); return; } @@ -975,8 +956,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // insertByName, replaceByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught IllegalArgumentException!" ); return; } @@ -984,8 +964,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // insertByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught ElementExistException!" ); return; } @@ -993,8 +972,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // insertByName, replaceByName, commitChanges - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught WrappedTargetException!" ); return; } @@ -1002,15 +980,13 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // getByHierarchicalName, replaceByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught NoSuchElementException!" ); return; } catch ( RuntimeException& ) { - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught RuntimeException!" ); return; } @@ -1018,8 +994,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // createInstance - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught Exception!" ); return; } @@ -1042,8 +1017,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // removeByName - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught NoSuchElementException!" ); return; } @@ -1051,8 +1025,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, { // commitChanges - OSL_ENSURE( sal_False, - "PropertySetRegistry::renamePropertySet - " + OSL_FAIL( "PropertySetRegistry::renamePropertySet - " "caught WrappedTargetException!" ); return; } @@ -1060,7 +1033,7 @@ void PropertySetRegistry::renamePropertySet( const OUString& rOldKey, } } - OSL_ENSURE( sal_False, "PropertySetRegistry::renamePropertySet - Error!" ); + OSL_FAIL( "PropertySetRegistry::renamePropertySet - Error!" ); } //========================================================================= @@ -1101,8 +1074,7 @@ Reference< XMultiServiceFactory > PropertySetRegistry::getConfigProvider() } catch ( Exception& ) { - OSL_ENSURE( sal_False, - "PropertySetRegistry::getConfigProvider - " + OSL_FAIL( "PropertySetRegistry::getConfigProvider - " "caught exception!" ); } } @@ -1123,8 +1095,7 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess() { if ( m_pImpl->m_bTriedToGetRootReadAccess ) // #82494# { - OSL_ENSURE( sal_False, - "PropertySetRegistry::getRootConfigReadAccess - " + OSL_FAIL( "PropertySetRegistry::getRootConfigReadAccess - " "Unable to read any config data! -> #82494#" ); return Reference< XInterface >(); } @@ -1166,13 +1137,11 @@ Reference< XInterface > PropertySetRegistry::getRootConfigReadAccess() { // createInstance, createInstanceWithArguments - OSL_ENSURE( sal_False, - "PropertySetRegistry::getRootConfigReadAccess - caught Exception!" ); + OSL_FAIL( "PropertySetRegistry::getRootConfigReadAccess - caught Exception!" ); return Reference< XInterface >(); } - OSL_ENSURE( sal_False, - "PropertySetRegistry::getRootConfigReadAccess - Error!" ); + OSL_FAIL( "PropertySetRegistry::getRootConfigReadAccess - Error!" ); return Reference< XInterface >(); } @@ -1188,8 +1157,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess( { if ( m_pImpl->m_bTriedToGetRootWriteAccess ) // #82494# { - OSL_ENSURE( sal_False, - "PropertySetRegistry::getConfigWriteAccess - " + OSL_FAIL( "PropertySetRegistry::getConfigWriteAccess - " "Unable to write any config data! -> #82494#" ); return Reference< XInterface >(); } @@ -1256,8 +1224,7 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess( { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PropertySetRegistry::getConfigWriteAccess - " + OSL_FAIL( "PropertySetRegistry::getConfigWriteAccess - " "caught NoSuchElementException!" ); return Reference< XInterface >(); } @@ -1265,14 +1232,12 @@ Reference< XInterface > PropertySetRegistry::getConfigWriteAccess( { // createInstance, createInstanceWithArguments - OSL_ENSURE( sal_False, - "PropertySetRegistry::getConfigWriteAccess - " + OSL_FAIL( "PropertySetRegistry::getConfigWriteAccess - " "caught Exception!" ); return Reference< XInterface >(); } - OSL_ENSURE( sal_False, - "PropertySetRegistry::getConfigWriteAccess - Error!" ); + OSL_FAIL( "PropertySetRegistry::getConfigWriteAccess - Error!" ); return Reference< XInterface >(); } @@ -1674,8 +1639,7 @@ void SAL_CALL PersistentPropertySet::addVetoableChangeListener( RuntimeException ) { // load(); -// OSL_ENSURE( sal_False, -// "PersistentPropertySet::addVetoableChangeListener - N.Y.I." ); +// OSL_FAIL( // "PersistentPropertySet::addVetoableChangeListener - N.Y.I." ); } //========================================================================= @@ -1688,8 +1652,7 @@ void SAL_CALL PersistentPropertySet::removeVetoableChangeListener( RuntimeException ) { // load(); -// OSL_ENSURE( sal_False, -// "PersistentPropertySet::removeVetoableChangeListener - N.Y.I." ); +// OSL_FAIL( // "PersistentPropertySet::removeVetoableChangeListener - N.Y.I." ); } //========================================================================= @@ -1868,8 +1831,7 @@ void SAL_CALL PersistentPropertySet::addProperty( { // insertByName - OSL_ENSURE( sal_False, - "PersistentPropertySet::addProperty - " + OSL_FAIL( "PersistentPropertySet::addProperty - " "caught IllegalArgumentException!" ); return; } @@ -1877,8 +1839,7 @@ void SAL_CALL PersistentPropertySet::addProperty( { // insertByName - OSL_ENSURE( sal_False, - "PersistentPropertySet::addProperty - " + OSL_FAIL( "PersistentPropertySet::addProperty - " "caught ElementExistException!" ); return; } @@ -1886,8 +1847,7 @@ void SAL_CALL PersistentPropertySet::addProperty( { // replaceByName, insertByName, commitChanges - OSL_ENSURE( sal_False, - "PersistentPropertySet::addProperty - " + OSL_FAIL( "PersistentPropertySet::addProperty - " "caught WrappedTargetException!" ); return; } @@ -1899,15 +1859,13 @@ void SAL_CALL PersistentPropertySet::addProperty( { // createInstance - OSL_ENSURE( sal_False, - "PersistentPropertySet::addProperty - " + OSL_FAIL( "PersistentPropertySet::addProperty - " "caught Exception!" ); return; } } - OSL_ENSURE( sal_False, - "PersistentPropertySet::addProperty - Error!" ); + OSL_FAIL( "PersistentPropertySet::addProperty - Error!" ); } //========================================================================= @@ -1953,8 +1911,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) } else { - OSL_ENSURE( sal_False, - "PersistentPropertySet::removeProperty - " + OSL_FAIL( "PersistentPropertySet::removeProperty - " "No attributes!" ); return; } @@ -1963,8 +1920,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PersistentPropertySet::removeProperty - " + OSL_FAIL( "PersistentPropertySet::removeProperty - " "caught NoSuchElementException!" ); } @@ -2010,8 +1966,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PersistentPropertySet::removeProperty - " + OSL_FAIL( "PersistentPropertySet::removeProperty - " "caught NoSuchElementException!" ); nHandle = -1; } @@ -2043,8 +1998,7 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { // removeByName - OSL_ENSURE( sal_False, - "PersistentPropertySet::removeProperty - " + OSL_FAIL( "PersistentPropertySet::removeProperty - " "caught NoSuchElementException!" ); return; } @@ -2052,16 +2006,14 @@ void SAL_CALL PersistentPropertySet::removeProperty( const OUString& Name ) { // commitChanges - OSL_ENSURE( sal_False, - "PersistentPropertySet::removeProperty - " + OSL_FAIL( "PersistentPropertySet::removeProperty - " "caught WrappedTargetException!" ); return; } } } - OSL_ENSURE( sal_False, - "PersistentPropertySet::removeProperty - Error!" ); + OSL_FAIL( "PersistentPropertySet::removeProperty - Error!" ); } //========================================================================= @@ -2158,16 +2110,14 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues() aHierName ); if ( !( aKeyValue >>= rValue.Handle ) ) - OSL_ENSURE( sal_False, - "PersistentPropertySet::getPropertyValues - " + OSL_FAIL( "PersistentPropertySet::getPropertyValues - " "Error getting property handle!" ); } catch ( NoSuchElementException& ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PersistentPropertySet::getPropertyValues - " + OSL_FAIL( "PersistentPropertySet::getPropertyValues - " "NoSuchElementException!" ); } @@ -2188,8 +2138,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues() { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PersistentPropertySet::getPropertyValues - " + OSL_FAIL( "PersistentPropertySet::getPropertyValues - " "NoSuchElementException!" ); } @@ -2204,8 +2153,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues() sal_Int32 nState = 0; if ( !( aKeyValue >>= nState ) ) - OSL_ENSURE( sal_False, - "PersistentPropertySet::getPropertyValues - " + OSL_FAIL( "PersistentPropertySet::getPropertyValues - " "Error getting property state!" ); else rValue.State = PropertyState( nState ); @@ -2214,8 +2162,7 @@ Sequence< PropertyValue > SAL_CALL PersistentPropertySet::getPropertyValues() { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PersistentPropertySet::getPropertyValues - " + OSL_FAIL( "PersistentPropertySet::getPropertyValues - " "NoSuchElementException!" ); } } @@ -2359,8 +2306,7 @@ void SAL_CALL PersistentPropertySet::setPropertyValues( return; } - OSL_ENSURE( sal_False, - "PersistentPropertySet::setPropertyValues - Nothing set!" ); + OSL_FAIL( "PersistentPropertySet::setPropertyValues - Nothing set!" ); } //========================================================================= @@ -2567,16 +2513,14 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties() aHierName ); if ( !( aKeyValue >>= rProp.Handle ) ) - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getProperties - " + OSL_FAIL( "PropertySetInfo_Impl::getProperties - " "Error getting property handle!" ); } catch ( NoSuchElementException& ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getProperties - " + OSL_FAIL( "PropertySetInfo_Impl::getProperties - " "NoSuchElementException!" ); } @@ -2599,8 +2543,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties() { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getProperties - " + OSL_FAIL( "PropertySetInfo_Impl::getProperties - " "NoSuchElementException!" ); } @@ -2618,16 +2561,14 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties() rProp.Attributes = sal_Int16( nAttribs ); else - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getProperties - " + OSL_FAIL( "PropertySetInfo_Impl::getProperties - " "Error getting property attributes!" ); } catch ( NoSuchElementException& ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getProperties - " + OSL_FAIL( "PropertySetInfo_Impl::getProperties - " "NoSuchElementException!" ); } } @@ -2645,7 +2586,7 @@ Sequence< Property > SAL_CALL PropertySetInfo_Impl::getProperties() } } - OSL_ENSURE( sal_False, "PropertySetInfo_Impl::getProperties - Error!" ); + OSL_FAIL( "PropertySetInfo_Impl::getProperties - Error!" ); m_pProps = new Sequence< Property >( 0 ); } @@ -2682,8 +2623,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( if ( !( xRootHierNameAccess->getByHierarchicalName( aKey ) >>= aProp.Handle ) ) { - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getPropertyByName - " + OSL_FAIL( "PropertySetInfo_Impl::getPropertyByName - " "No handle!" ); return Property(); } @@ -2695,8 +2635,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( Any aValue = xRootHierNameAccess->getByHierarchicalName( aKey ); if ( !aValue.hasValue() ) { - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getPropertyByName - " + OSL_FAIL( "PropertySetInfo_Impl::getPropertyByName - " "No Value!" ); return Property(); } @@ -2713,8 +2652,7 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( aProp.Attributes = sal_Int16( nAttribs ); else { - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getPropertyByName - " + OSL_FAIL( "PropertySetInfo_Impl::getPropertyByName - " "No attributes!" ); return Property(); } @@ -2729,14 +2667,13 @@ Property SAL_CALL PropertySetInfo_Impl::getPropertyByName( { // getByHierarchicalName - OSL_ENSURE( sal_False, - "PropertySetInfo_Impl::getPropertyByName - " + OSL_FAIL( "PropertySetInfo_Impl::getPropertyByName - " "caught NoSuchElementException!" ); } } - OSL_ENSURE( sal_False, "PropertySetInfo_Impl::getPropertyByName - Error!" ); + OSL_FAIL( "PropertySetInfo_Impl::getPropertyByName - Error!" ); return Property(); } diff --git a/ucb/source/sorter/sortresult.cxx b/ucb/source/sorter/sortresult.cxx index f0a6bb3fb516..f68ac8037e20 100755 --- a/ucb/source/sorter/sortresult.cxx +++ b/ucb/source/sorter/sortresult.cxx @@ -1236,7 +1236,7 @@ long SortedResultSet::CompareImpl( Reference < XResultSet > xResultOne, } default: { - OSL_ENSURE( sal_False, "DataType not supported for compare!" ); + OSL_FAIL( "DataType not supported for compare!" ); } } @@ -1461,7 +1461,7 @@ void SortedResultSet::Initialize( nIndex++; } } - catch ( SQLException ) { OSL_ENSURE( sal_False, "SortedResultSet::Initialize() : Got unexpected SQLException" ); } + catch ( SQLException ) { OSL_FAIL( "SortedResultSet::Initialize() : Got unexpected SQLException" ); } // when we have fetched all the elements, we can create the // original to sorted mapping list from the s2o list @@ -1693,7 +1693,7 @@ void SortedResultSet::BuildSortInfo( if ( ! xMeta.is() ) { - OSL_ENSURE( sal_False, "No MetaData, No Sorting!" ); + OSL_FAIL( "No MetaData, No Sorting!" ); return; } @@ -1816,7 +1816,7 @@ void SortedResultSet::ResortModified( EventList* pList ) } } } - catch ( SQLException ) { OSL_ENSURE( sal_False, "SortedResultSet::ResortModified() : Got unexpected SQLException" ); } + catch ( SQLException ) { OSL_FAIL( "SortedResultSet::ResortModified() : Got unexpected SQLException" ); } maModList.Clear(); } @@ -1849,7 +1849,7 @@ void SortedResultSet::ResortNew( EventList* pList ) pList->AddEvent( ListActionType::INSERTED, nNewPos, 1 ); } } - catch ( SQLException ) { OSL_ENSURE( sal_False, "SortedResultSet::ResortNew() : Got unexpected SQLException" ); } + catch ( SQLException ) { OSL_FAIL( "SortedResultSet::ResortNew() : Got unexpected SQLException" ); } } //------------------------------------------------------------------------- @@ -1930,12 +1930,12 @@ long SortedEntryList::operator [] ( long nPos ) const return pData->mnCurPos; else { - OSL_ENSURE( sal_False, "SortedEntryList: Can't get value for modified entry!"); + OSL_FAIL( "SortedEntryList: Can't get value for modified entry!"); return 0; } else { - OSL_ENSURE( sal_False, "SortedEntryList: invalid pos!"); + OSL_FAIL( "SortedEntryList: invalid pos!"); return 0; } } diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx index 583c558a007e..a58034dddd46 100755 --- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx +++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx @@ -550,7 +550,7 @@ uno::Any SAL_CALL HierarchyContent::execute( ucb::TransferInfo aInfo; if ( !( aCommand.Argument >>= aInfo ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( @@ -575,7 +575,7 @@ uno::Any SAL_CALL HierarchyContent::execute( ucb::ContentInfo aInfo; if ( !( aCommand.Argument >>= aInfo ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( @@ -669,8 +669,7 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info ) } else { - OSL_ENSURE( sal_False, - "createNewContent called on non-folder object!" ); + OSL_FAIL( "createNewContent called on non-folder object!" ); return uno::Reference< ucb::XContent >(); } } @@ -896,15 +895,14 @@ sal_Bool HierarchyContent::exchangeIdentity( // Already persistent? if ( m_eState != PERSISTENT ) { - OSL_ENSURE( sal_False, - "HierarchyContent::exchangeIdentity - Not persistent!" ); + OSL_FAIL( "HierarchyContent::exchangeIdentity - Not persistent!" ); return sal_False; } // Am I the root folder? if ( m_eKind == ROOT ) { - OSL_ENSURE( sal_False, "HierarchyContent::exchangeIdentity - " + OSL_FAIL( "HierarchyContent::exchangeIdentity - " "Not supported by root folder!" ); return sal_False; } @@ -957,8 +955,7 @@ sal_Bool HierarchyContent::exchangeIdentity( } } - OSL_ENSURE( sal_False, - "HierarchyContent::exchangeIdentity - " + OSL_FAIL( "HierarchyContent::exchangeIdentity - " "Panic! Cannot exchange identity!" ); return sal_False; } diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx index 4b8983e9e918..a3f9ed980aee 100755 --- a/ucb/source/ucp/hierarchy/hierarchydata.cxx +++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx @@ -147,7 +147,7 @@ HierarchyEntry::HierarchyEntry( if ( nPos > HIERARCHY_URL_SCHEME_LENGTH ) m_aName = rURL.copy( nPos + 1 ); else - OSL_ENSURE( sal_False, "HierarchyEntry - Invalid URL!" ); + OSL_FAIL( "HierarchyEntry - Invalid URL!" ); } //========================================================================= @@ -196,8 +196,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) if ( !( xRootReadAccess->getByHierarchicalName( aTitlePath ) >>= aValue ) ) { - OSL_ENSURE( sal_False, - "HierarchyEntry::getData - " + OSL_FAIL( "HierarchyEntry::getData - " "Got no Title value!" ); return sal_False; } @@ -210,8 +209,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) if ( !( xRootReadAccess->getByHierarchicalName( aTargetURLPath ) >>= aValue ) ) { - OSL_ENSURE( sal_False, - "HierarchyEntry::getData - " + OSL_FAIL( "HierarchyEntry::getData - " "Got no TargetURL value!" ); return sal_False; } @@ -248,8 +246,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) } else { - OSL_ENSURE( sal_False, - "HierarchyEntry::getData - " + OSL_FAIL( "HierarchyEntry::getData - " "Unknown Type value!" ); return sal_False; } @@ -268,8 +265,7 @@ sal_Bool HierarchyEntry::getData( HierarchyEntryData& rData ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "HierarchyEntry::getData - caught NoSuchElementException!" ); + OSL_FAIL( "HierarchyEntry::getData - caught NoSuchElementException!" ); } return sal_False; } @@ -474,40 +470,35 @@ sal_Bool HierarchyEntry::setData( { // replaceByName, insertByName - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::setData - caught IllegalArgumentException!" ); } catch ( container::NoSuchElementException const & ) { // replaceByName, getByName - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::setData - caught NoSuchElementException!" ); } catch ( container::ElementExistException const & ) { // insertByName - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::setData - caught ElementExistException!" ); } catch ( lang::WrappedTargetException const & ) { // replaceByName, insertByName, getByName, commitChanges - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::setData - caught WrappedTargetException!" ); } catch ( uno::Exception const & ) { // createInstance, createInstanceWithArguments - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::setData - caught Exception!" ); } @@ -534,7 +525,7 @@ sal_Bool HierarchyEntry::move( aNewKey = rNewURL.copy( nURLPos + 1 ); else { - OSL_ENSURE( sal_False, "HierarchyEntry::move - Invalid URL!" ); + OSL_FAIL( "HierarchyEntry::move - Invalid URL!" ); return sal_False; } @@ -635,7 +626,7 @@ sal_Bool HierarchyEntry::move( { // createInstance, createInstanceWithArguments - OSL_ENSURE( sal_False, "HierarchyEntry::move - caught Exception!" ); + OSL_FAIL( "HierarchyEntry::move - caught Exception!" ); return sal_False; } @@ -677,16 +668,14 @@ sal_Bool HierarchyEntry::move( { // getByName - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught NoSuchElementException!" ); + OSL_FAIL( "HierarchyEntry::move - caught NoSuchElementException!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { // getByName - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught WrappedTargetException!" ); + OSL_FAIL( "HierarchyEntry::move - caught WrappedTargetException!" ); return sal_False; } @@ -703,8 +692,7 @@ sal_Bool HierarchyEntry::move( { // getByName, removeByName - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught NoSuchElementException!" ); + OSL_FAIL( "HierarchyEntry::move - caught NoSuchElementException!" ); return sal_False; } @@ -786,16 +774,14 @@ sal_Bool HierarchyEntry::move( { // replaceByName, insertByName, getByName - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught NoSuchElementException!" ); + OSL_FAIL( "HierarchyEntry::move - caught NoSuchElementException!" ); return sal_False; } catch ( lang::IllegalArgumentException const & ) { // replaceByName, insertByName - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::move - caught IllegalArgumentException!" ); return sal_False; } @@ -803,16 +789,14 @@ sal_Bool HierarchyEntry::move( { // insertByName - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught ElementExistException!" ); + OSL_FAIL( "HierarchyEntry::move - caught ElementExistException!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { // replaceByName, insertByName, getByName - OSL_ENSURE( sal_False, - "HierarchyEntry::move - caught WrappedTargetException!" ); + OSL_FAIL( "HierarchyEntry::move - caught WrappedTargetException!" ); return sal_False; } @@ -916,24 +900,21 @@ sal_Bool HierarchyEntry::remove() { // getByName, removeByName - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::remove - caught NoSuchElementException!" ); } catch ( lang::WrappedTargetException const & ) { // getByName, commitChanges - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::remove - caught WrappedTargetException!" ); } catch ( uno::Exception const & ) { // createInstance, createInstanceWithArguments - OSL_ENSURE( sal_False, - "HierarchyEntry::remove - caught Exception!" ); + OSL_FAIL( "HierarchyEntry::remove - caught Exception!" ); } return sal_False; @@ -995,14 +976,12 @@ sal_Bool HierarchyEntry::first( iterator& it ) { // getByHierarchicalName - OSL_ENSURE( - sal_False, + OSL_FAIL( "HierarchyEntry::first - caught NoSuchElementException!" ); } catch ( uno::Exception const & ) { - OSL_ENSURE( sal_False, - "HierarchyEntry::first - caught Exception!" ); + OSL_FAIL( "HierarchyEntry::first - caught Exception!" ); } } @@ -1081,8 +1060,7 @@ HierarchyEntry::getRootReadAccess() { if ( m_bTriedToGetRootReadAccess ) // #82494# { - OSL_ENSURE( sal_False, - "HierarchyEntry::getRootReadAccess - " + OSL_FAIL( "HierarchyEntry::getRootReadAccess - " "Unable to read any config data! -> #82494#" ); return uno::Reference< container::XHierarchicalNameAccess >(); } @@ -1126,8 +1104,7 @@ HierarchyEntry::getRootReadAccess() { // createInstance, createInstanceWithArguments - OSL_ENSURE( sal_False, - "HierarchyEntry::getRootReadAccess - " + OSL_FAIL( "HierarchyEntry::getRootReadAccess - " "caught Exception!" ); } } @@ -1211,8 +1188,7 @@ const HierarchyEntryData& HierarchyEntry::iterator::operator*() const } else { - OSL_ENSURE( sal_False, - "HierarchyEntry::getData - " + OSL_FAIL( "HierarchyEntry::getData - " "Unknown Type value!" ); } } diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx index 9bcaafadc7e2..8573f1750930 100755 --- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx +++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx @@ -200,13 +200,11 @@ HierarchyContentProvider::getConfigProvider( } catch ( uno::Exception const & ) { -// OSL_ENSURE( sal_False, -// "HierarchyContentProvider::getConfigProvider - " +// OSL_FAIL( // "HierarchyContentProvider::getConfigProvider - " // "caught exception!" ); } - OSL_ENSURE( sal_False, - "HierarchyContentProvider::getConfigProvider - " + OSL_FAIL( "HierarchyContentProvider::getConfigProvider - " "No config provider!" ); return uno::Reference< lang::XMultiServiceFactory >(); @@ -229,8 +227,7 @@ HierarchyContentProvider::getRootConfigReadNameAccess( { if ( (*it).second.bTriedToGetRootReadAccess ) // #82494# { - OSL_ENSURE( sal_False, - "HierarchyContentProvider::getRootConfigReadNameAccess - " + OSL_FAIL( "HierarchyContentProvider::getRootConfigReadNameAccess - " "Unable to read any config data! -> #82494#" ); return uno::Reference< container::XHierarchicalNameAccess >(); } @@ -271,8 +268,7 @@ HierarchyContentProvider::getRootConfigReadNameAccess( { // createInstance, createInstanceWithArguments - OSL_ENSURE( sal_False, - "HierarchyContentProvider::getRootConfigReadNameAccess - " + OSL_FAIL( "HierarchyContentProvider::getRootConfigReadNameAccess - " "caught Exception!" ); } } diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx index e32bbdbbfef8..05b36107e73b 100755 --- a/ucb/source/ucp/odma/odma_content.cxx +++ b/ucb/source/ucp/odma/odma_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(), @@ -307,7 +307,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(), @@ -454,7 +454,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(), @@ -477,7 +477,7 @@ uno::Any SAL_CALL Content::execute( ucb::TransferInfo aTransferInfo; if( ! ( aCommand.Argument >>= aTransferInfo ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(), @@ -538,7 +538,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( @@ -952,7 +952,7 @@ void Content::insert( // Check, if all required properties were set. if ( !m_aProps->m_sTitle.getLength()) { - OSL_ENSURE( sal_False, "Content::insert - property value missing!" ); + OSL_FAIL( "Content::insert - property value missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("zzzz")); @@ -967,7 +967,7 @@ void Content::insert( if ( !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/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx index e501dd09fde1..00d21eced5a6 100755 --- a/ucb/source/ucp/package/pkgcontent.cxx +++ b/ucb/source/ucp/package/pkgcontent.cxx @@ -672,7 +672,7 @@ uno::Any SAL_CALL Content::execute( ucb::ContentInfo aInfo; if ( !( aCommand.Argument >>= aInfo ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( @@ -789,8 +789,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) } else { - OSL_ENSURE( sal_False, - "createNewContent called on non-folder object!" ); + OSL_FAIL( "createNewContent called on non-folder object!" ); return uno::Reference< ucb::XContent >(); } } @@ -2102,8 +2101,7 @@ void Content::transfer( if ( !xNamed.is() ) { - OSL_ENSURE( sal_False, - "Content::transfer - Got no XNamed!" ); + OSL_FAIL( "Content::transfer - Got no XNamed!" ); break; } @@ -2111,8 +2109,7 @@ void Content::transfer( if ( !aName.getLength() ) { - OSL_ENSURE( sal_False, - "Content::transfer - Empty name!" ); + OSL_FAIL( "Content::transfer - Empty name!" ); break; } @@ -2192,8 +2189,7 @@ sal_Bool Content::exchangeIdentity( // Already persistent? if ( m_eState != PERSISTENT ) { - OSL_ENSURE( sal_False, - "Content::exchangeIdentity - Not persistent!" ); + OSL_FAIL( "Content::exchangeIdentity - Not persistent!" ); return sal_False; } @@ -2247,8 +2243,7 @@ sal_Bool Content::exchangeIdentity( } } - OSL_ENSURE( sal_False, - "Content::exchangeIdentity - Panic! Cannot exchange identity!" ); + OSL_FAIL( "Content::exchangeIdentity - Panic! Cannot exchange identity!" ); return sal_False; } @@ -2385,23 +2380,20 @@ sal_Bool Content::loadData( "HasEncryptedEntries" )) ); if ( !( aHasEncryptedEntries >>= rProps.bHasEncryptedEntries ) ) { - OSL_ENSURE( sal_False, - "Content::loadData - " + OSL_FAIL( "Content::loadData - " "Got no HasEncryptedEntries value!" ); return sal_False; } } catch ( beans::UnknownPropertyException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - " + OSL_FAIL( "Content::loadData - " "Got no HasEncryptedEntries value!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - " + OSL_FAIL( "Content::loadData - " "Got no HasEncryptedEntries value!" ); return sal_False; } @@ -2421,8 +2413,7 @@ sal_Bool Content::loadData( if ( !xPropSet.is() ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no XPropertySet interface!" ); + OSL_FAIL( "Content::loadData - Got no XPropertySet interface!" ); return sal_False; } @@ -2437,21 +2428,18 @@ sal_Bool Content::loadData( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")) ); if ( !( aMediaType >>= rProps.aMediaType ) ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no MediaType value!" ); + OSL_FAIL( "Content::loadData - Got no MediaType value!" ); return sal_False; } } catch ( beans::UnknownPropertyException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no MediaType value!" ); + OSL_FAIL( "Content::loadData - Got no MediaType value!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no MediaType value!" ); + OSL_FAIL( "Content::loadData - Got no MediaType value!" ); return sal_False; } @@ -2484,21 +2472,18 @@ sal_Bool Content::loadData( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Size")) ); if ( !( aSize >>= rProps.nSize ) ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Size value!" ); + OSL_FAIL( "Content::loadData - Got no Size value!" ); return sal_False; } } catch ( beans::UnknownPropertyException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Size value!" ); + OSL_FAIL( "Content::loadData - Got no Size value!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Size value!" ); + OSL_FAIL( "Content::loadData - Got no Size value!" ); return sal_False; } @@ -2510,21 +2495,18 @@ sal_Bool Content::loadData( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")) ); if ( !( aCompressed >>= rProps.bCompressed ) ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Compressed value!" ); + OSL_FAIL( "Content::loadData - Got no Compressed value!" ); return sal_False; } } catch ( beans::UnknownPropertyException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Compressed value!" ); + OSL_FAIL( "Content::loadData - Got no Compressed value!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Compressed value!" ); + OSL_FAIL( "Content::loadData - Got no Compressed value!" ); return sal_False; } @@ -2536,21 +2518,18 @@ sal_Bool Content::loadData( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Encrypted")) ); if ( !( aEncrypted >>= rProps.bEncrypted ) ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Encrypted value!" ); + OSL_FAIL( "Content::loadData - Got no Encrypted value!" ); return sal_False; } } catch ( beans::UnknownPropertyException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Encrypted value!" ); + OSL_FAIL( "Content::loadData - Got no Encrypted value!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { - OSL_ENSURE( sal_False, - "Content::loadData - Got no Encrypted value!" ); + OSL_FAIL( "Content::loadData - Got no Encrypted value!" ); return sal_False; } } @@ -2589,8 +2568,7 @@ sal_Bool Content::renameData( if ( !xNamed.is() ) { - OSL_ENSURE( sal_False, - "Content::renameData - Got no XNamed interface!" ); + OSL_FAIL( "Content::renameData - Got no XNamed interface!" ); return sal_False; } @@ -2670,8 +2648,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) xNA, uno::UNO_QUERY ); if ( !xFac.is() ) { - OSL_ENSURE( sal_False, - "Content::storeData - " + OSL_FAIL( "Content::storeData - " "Got no XSingleServiceFactory interface!" ); return sal_False; } @@ -2684,8 +2661,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !xNew.is() ) { - OSL_ENSURE( sal_False, - "Content::storeData - createInstance failed!" ); + OSL_FAIL( "Content::storeData - createInstance failed!" ); return sal_False; } @@ -2697,8 +2673,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !xParentContainer.is() ) { - OSL_ENSURE( sal_False, - "Content::storeData - " + OSL_FAIL( "Content::storeData - " "Got no XNameContainer interface!" ); return sal_False; } @@ -2713,35 +2688,31 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) catch ( lang::IllegalArgumentException const & ) { // insertByName - OSL_ENSURE( sal_False, - "Content::storeData - insertByName failed!" ); + OSL_FAIL( "Content::storeData - insertByName failed!" ); return sal_False; } catch ( container::ElementExistException const & ) { // insertByName - OSL_ENSURE( sal_False, - "Content::storeData - insertByName failed!" ); + OSL_FAIL( "Content::storeData - insertByName failed!" ); return sal_False; } catch ( lang::WrappedTargetException const & ) { // insertByName - OSL_ENSURE( sal_False, - "Content::storeData - insertByName failed!" ); + OSL_FAIL( "Content::storeData - insertByName failed!" ); return sal_False; } catch ( container::NoSuchElementException const & ) { // getByHierarchicalName - OSL_ENSURE( sal_False, - "Content::storeData - getByHierarchicalName failed!" ); + OSL_FAIL( "Content::storeData - getByHierarchicalName failed!" ); return sal_False; } catch ( uno::Exception const & ) { // createInstanceWithArguments - OSL_ENSURE( sal_False, "Content::storeData - Error!" ); + OSL_FAIL( "Content::storeData - Error!" ); return sal_False; } } @@ -2756,8 +2727,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !xPropSet.is() ) { - OSL_ENSURE( sal_False, - "Content::storeData - Got no XPropertySet interface!" ); + OSL_FAIL( "Content::storeData - Got no XPropertySet interface!" ); return sal_False; } @@ -2814,8 +2784,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) if ( !xSink.is() ) { - OSL_ENSURE( sal_False, - "Content::storeData - " + OSL_FAIL( "Content::storeData - " "Got no XActiveDataSink interface!" ); return sal_False; } @@ -2846,7 +2815,7 @@ sal_Bool Content::storeData( const uno::Reference< io::XInputStream >& xStream ) // setPropertyValue } - OSL_ENSURE( sal_False, "Content::storeData - Error!" ); + OSL_FAIL( "Content::storeData - Error!" ); return sal_False; } @@ -2871,8 +2840,7 @@ sal_Bool Content::removeData() if ( !xContainer.is() ) { - OSL_ENSURE( sal_False, - "Content::removeData - " + OSL_FAIL( "Content::removeData - " "Got no XNameContainer interface!" ); return sal_False; } @@ -2889,7 +2857,7 @@ sal_Bool Content::removeData() // removeByName } - OSL_ENSURE( sal_False, "Content::removeData - Error!" ); + OSL_FAIL( "Content::removeData - Error!" ); return sal_False; } @@ -2908,8 +2876,7 @@ sal_Bool Content::flushData() uno::Reference< util::XChangesBatch > xBatch( xNA, uno::UNO_QUERY ); if ( !xBatch.is() ) { - OSL_ENSURE( sal_False, - "Content::flushData - Got no XChangesBatch interface!" ); + OSL_FAIL( "Content::flushData - Got no XChangesBatch interface!" ); return sal_False; } @@ -2922,7 +2889,7 @@ sal_Bool Content::flushData() { } - OSL_ENSURE( sal_False, "Content::flushData - Error!" ); + OSL_FAIL( "Content::flushData - Error!" ); return sal_False; } @@ -2947,8 +2914,7 @@ uno::Reference< io::XInputStream > Content::getInputStream() if ( !xSink.is() ) { - OSL_ENSURE( sal_False, - "Content::getInputStream - " + OSL_FAIL( "Content::getInputStream - " "Got no XActiveDataSink interface!" ); return xStream; } @@ -2987,8 +2953,7 @@ uno::Reference< container::XEnumeration > Content::getIterator() if ( !xIterFac.is() ) { - OSL_ENSURE( sal_False, - "Content::getIterator - " + OSL_FAIL( "Content::getIterator - " "Got no XEnumerationAccess interface!" ); return xIter; } diff --git a/ucb/source/ucp/package/pkgdatasupplier.cxx b/ucb/source/ucp/package/pkgdatasupplier.cxx index d403626ba061..589fd28b1610 100755 --- a/ucb/source/ucp/package/pkgdatasupplier.cxx +++ b/ucb/source/ucp/package/pkgdatasupplier.cxx @@ -265,8 +265,7 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) if ( !xNamed.is() ) { - OSL_ENSURE( sal_False, - "DataSupplier::getResult - Got no XNamed!" ); + OSL_FAIL( "DataSupplier::getResult - Got no XNamed!" ); break; } @@ -274,8 +273,7 @@ sal_Bool DataSupplier::getResult( sal_uInt32 nIndex ) if ( !aName.getLength() ) { - OSL_ENSURE( sal_False, - "DataSupplier::getResult - Empty name!" ); + OSL_FAIL( "DataSupplier::getResult - Empty name!" ); break; } @@ -345,8 +343,7 @@ sal_uInt32 DataSupplier::totalCount() if ( !xNamed.is() ) { - OSL_ENSURE( sal_False, - "DataSupplier::getResult - Got no XNamed!" ); + OSL_FAIL( "DataSupplier::getResult - Got no XNamed!" ); break; } @@ -354,8 +351,7 @@ sal_uInt32 DataSupplier::totalCount() if ( !aName.getLength() ) { - OSL_ENSURE( sal_False, - "DataSupplier::getResult - Empty name!" ); + OSL_FAIL( "DataSupplier::getResult - Empty name!" ); break; } diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx index 27d411233225..0ac70af0e273 100755 --- a/ucb/source/ucp/package/pkgprovider.cxx +++ b/ucb/source/ucp/package/pkgprovider.cxx @@ -251,8 +251,7 @@ ContentProvider::createPackage( const rtl::OUString & rName, const rtl::OUString if ( !rName.getLength() ) { - OSL_ENSURE( sal_False, - "ContentProvider::createPackage - Invalid URL!" ); + OSL_FAIL( "ContentProvider::createPackage - Invalid URL!" ); return uno::Reference< container::XHierarchicalNameAccess >(); } diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx index cc859e623dae..db7686637c54 100755 --- a/ucb/source/ucp/tdoc/tdoc_content.cxx +++ b/ucb/source/ucp/tdoc/tdoc_content.cxx @@ -97,8 +97,7 @@ static ContentType lcl_getContentType( const rtl::OUString & rType ) return STREAM; else { - OSL_ENSURE( sal_False, - "Content::Content - unsupported content type string" ); + OSL_FAIL( "Content::Content - unsupported content type string" ); return STREAM; } } @@ -143,7 +142,7 @@ Content* Content::create( !Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TDOC_STREAM_CONTENT_TYPE ) ) ) { - OSL_ENSURE( sal_False, "Content::create - unsupported content type!" ); + OSL_FAIL( "Content::create - unsupported content type!" ); return 0; } @@ -638,7 +637,7 @@ uno::Any SAL_CALL Content::execute( ucb::TransferInfo aInfo; if ( !( aCommand.Argument >>= aInfo ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( @@ -681,7 +680,7 @@ uno::Any SAL_CALL Content::execute( ucb::ContentInfo aInfo; if ( !( aCommand.Argument >>= aInfo ) ) { - OSL_ENSURE( sal_False, "Wrong argument type!" ); + OSL_FAIL( "Wrong argument type!" ); ucbhelper::cancelCommandExecution( uno::makeAny( lang::IllegalArgumentException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( @@ -753,8 +752,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) // streams cannot be created as direct children of document root if ( !bCreateFolder && ( m_aProps.getType() == DOCUMENT ) ) { - OSL_ENSURE( sal_False, - "Content::createNewContent - streams cannot be " + OSL_FAIL( "Content::createNewContent - streams cannot be " "created as direct children of document root!" ); return uno::Reference< ucb::XContent >(); } @@ -763,8 +761,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) !Info.Type.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( TDOC_STREAM_CONTENT_TYPE ) ) ) { - OSL_ENSURE( sal_False, - "Content::createNewContent - unsupported type!" ); + OSL_FAIL( "Content::createNewContent - unsupported type!" ); return uno::Reference< ucb::XContent >(); } @@ -788,8 +785,7 @@ Content::createNewContent( const ucb::ContentInfo& Info ) } else { - OSL_ENSURE( sal_False, - "createNewContent called on non-contentcreator object!" ); + OSL_FAIL( "createNewContent called on non-contentcreator object!" ); return uno::Reference< ucb::XContent >(); } } @@ -890,8 +886,7 @@ sal_Bool Content::exchangeIdentity( // Already persistent? if ( m_eState != PERSISTENT ) { - OSL_ENSURE( sal_False, - "Content::exchangeIdentity - Not persistent!" ); + OSL_FAIL( "Content::exchangeIdentity - Not persistent!" ); return sal_False; } @@ -899,7 +894,7 @@ sal_Bool Content::exchangeIdentity( ContentType eType = m_aProps.getType(); if ( ( eType == ROOT ) || ( eType == DOCUMENT ) ) { - OSL_ENSURE( sal_False, "Content::exchangeIdentity - " + OSL_FAIL( "Content::exchangeIdentity - " "Not supported by root or document!" ); return sal_False; } @@ -952,8 +947,7 @@ sal_Bool Content::exchangeIdentity( } } - OSL_ENSURE( sal_False, - "Content::exchangeIdentity - " + OSL_FAIL( "Content::exchangeIdentity - " "Panic! Cannot exchange identity!" ); return sal_False; } @@ -3114,8 +3108,7 @@ ContentProperties::getCreatableContentsInfo() const } else { - OSL_ENSURE( sal_False, - "getCreatableContentsInfo called on non-contentcreator " + OSL_FAIL( "getCreatableContentsInfo called on non-contentcreator " "object!" ); return uno::Sequence< ucb::ContentInfo >( 0 ); diff --git a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx index a3472dfd92e0..dcfedfbb47a7 100755 --- a/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx +++ b/ucb/source/ucp/tdoc/tdoc_datasupplier.cxx @@ -266,8 +266,7 @@ sal_Bool ResultSetDataSupplier::getResult( sal_uInt32 nIndex ) if ( !rName.getLength() ) { - OSL_ENSURE( sal_False, - "ResultDataSupplier::getResult - Empty name!" ); + OSL_FAIL( "ResultDataSupplier::getResult - Empty name!" ); break; } @@ -327,8 +326,7 @@ sal_uInt32 ResultSetDataSupplier::totalCount() if ( !rName.getLength() ) { - OSL_ENSURE( sal_False, - "ResultDataSupplier::getResult - Empty name!" ); + OSL_FAIL( "ResultDataSupplier::getResult - Empty name!" ); break; } diff --git a/ucb/source/ucp/webdav/LockSequence.cxx b/ucb/source/ucp/webdav/LockSequence.cxx index 896117152a1e..3376d1a3023b 100755 --- a/ucb/source/ucp/webdav/LockSequence.cxx +++ b/ucb/source/ucp/webdav/LockSequence.cxx @@ -174,8 +174,7 @@ extern "C" int LockSequence_chardata_callback( pCtx->hasDepth = true; } else - OSL_ENSURE( sal_False, - "LockSequence_chardata_callback - Unknown depth!" ); + OSL_FAIL( "LockSequence_chardata_callback - Unknown depth!" ); break; case STATE_OWNER: @@ -222,8 +221,7 @@ extern "C" int LockSequence_chardata_callback( { pCtx->pLock->Timeout = sal_Int64( -1 ); pCtx->hasTimeout = true; - OSL_ENSURE( sal_False, - "LockSequence_chardata_callback - Unknown timeout!" ); + OSL_FAIL( "LockSequence_chardata_callback - Unknown timeout!" ); } break; diff --git a/ucb/source/ucp/webdav/NeonSession.cxx b/ucb/source/ucp/webdav/NeonSession.cxx index 7df353ea850c..3326dd1c3231 100755 --- a/ucb/source/ucp/webdav/NeonSession.cxx +++ b/ucb/source/ucp/webdav/NeonSession.cxx @@ -128,15 +128,15 @@ static sal_uInt16 makeStatusCode( const rtl::OUString & rStatusText ) if ( rStatusText.getLength() < 3 ) { - OSL_ENSURE( - sal_False, "makeStatusCode - status text string to short!" ); + OSL_FAIL( + "makeStatusCode - status text string to short!" ); return 0; } sal_Int32 nPos = rStatusText.indexOf( ' ' ); if ( nPos == -1 ) { - OSL_ENSURE( sal_False, "makeStatusCode - wrong status text format!" ); + OSL_FAIL( "makeStatusCode - wrong status text format!" ); return 0; } @@ -320,8 +320,8 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, rtl::OUStringToOString( theUserName, RTL_TEXTENCODING_UTF8 ) ); if ( aUser.getLength() > ( NE_ABUFSIZ - 1 ) ) { - OSL_ENSURE( - sal_False, "NeonSession_NeonAuth - username to long!" ); + OSL_FAIL( + "NeonSession_NeonAuth - username to long!" ); return -1; } @@ -329,8 +329,8 @@ extern "C" int NeonSession_NeonAuth( void * inUserData, rtl::OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ) ); if ( aPass.getLength() > ( NE_ABUFSIZ - 1 ) ) { - OSL_ENSURE( - sal_False, "NeonSession_NeonAuth - password to long!" ); + OSL_FAIL( + "NeonSession_NeonAuth - password to long!" ); return -1; } @@ -1002,8 +1002,7 @@ void NeonSession::PROPPATCH( const rtl::OUString & inPath, } else { - OSL_ENSURE( sal_False, - "NeonSession::PROPPATCH - unsupported type!" ); + OSL_FAIL( "NeonSession::PROPPATCH - unsupported type!" ); // Error! pItems[ n ].value = 0; theRetVal = NE_ERROR; diff --git a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx index ef76f5784c6f..56a4ca3c8513 100755 --- a/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx +++ b/ucb/source/ucp/webdav/UCBDeadPropertyValue.cxx @@ -215,8 +215,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) if ( nPos == nEnd ) { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } @@ -228,8 +227,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) if ( nPos > nEnd - 4 ) { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } @@ -244,8 +242,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) } else { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } } @@ -255,8 +252,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) if ( nPos > nEnd - 3 ) { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } @@ -269,8 +265,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) } else { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } } @@ -280,8 +275,7 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) if ( nPos > nEnd - 3 ) { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } @@ -294,15 +288,13 @@ static rtl::OUString decodeValue( const rtl::OUString & rValue ) } else { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } } else { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::decodeValue - syntax error!" ); + OSL_FAIL( "UCBDeadPropertyValue::decodeValue - syntax error!" ); return rtl::OUString(); } } @@ -414,8 +406,7 @@ bool UCBDeadPropertyValue::createFromXML( const rtl::OString & rInData, } else { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::createFromXML - " + OSL_FAIL( "UCBDeadPropertyValue::createFromXML - " "Unsupported property type!" ); success = false; } @@ -513,8 +504,7 @@ bool UCBDeadPropertyValue::toXML( const uno::Any & rInData, } else { - OSL_ENSURE( sal_False, - "UCBDeadPropertyValue::toXML - " + OSL_FAIL( "UCBDeadPropertyValue::toXML - " "Unsupported property type!" ); return false; } diff --git a/ucb/source/ucp/webdav/webdavcontent.cxx b/ucb/source/ucp/webdav/webdavcontent.cxx index 2f5adff8e2d7..d933541c585e 100755 --- a/ucb/source/ucp/webdav/webdavcontent.cxx +++ b/ucb/source/ucp/webdav/webdavcontent.cxx @@ -731,8 +731,7 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name, // Check property type. if ( !UCBDeadPropertyValue::supportsType( DefaultValue.getValueType() ) ) { - OSL_ENSURE( sal_False, - "Content::addProperty - Unsupported property type!" ); + OSL_FAIL( "Content::addProperty - Unsupported property type!" ); throw beans::IllegalTypeException(); } @@ -817,23 +816,20 @@ void SAL_CALL Content::addProperty( const rtl::OUString& Name, break; default: - OSL_ENSURE( sal_False, - "Content::addProperty - " + OSL_FAIL( "Content::addProperty - " "Unsupported resource type!" ); break; } } catch ( uno::Exception const & ) { - OSL_ENSURE( sal_False, - "Content::addProperty - " + OSL_FAIL( "Content::addProperty - " "Unable to determine resource type!" ); } } else { - OSL_ENSURE( sal_False, - "Content::addProperty - " + OSL_FAIL( "Content::addProperty - " "Unable to determine resource type!" ); } } @@ -911,23 +907,20 @@ void SAL_CALL Content::removeProperty( const rtl::OUString& Name ) break; default: - OSL_ENSURE( sal_False, - "Content::removeProperty - " + OSL_FAIL( "Content::removeProperty - " "Unsupported resource type!" ); break; } } catch ( uno::Exception const & ) { - OSL_ENSURE( sal_False, - "Content::removeProperty - " + OSL_FAIL( "Content::removeProperty - " "Unable to determine resource type!" ); } } else { - OSL_ENSURE( sal_False, - "Content::removeProperty - " + OSL_FAIL( "Content::removeProperty - " "Unable to determine resource type!" ); // throw beans::UnknownPropertyException(); } @@ -1781,8 +1774,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( } catch ( DAVException const & e ) { -// OSL_ENSURE( sal_False, -// "Content::setPropertyValues - PROPPATCH failed!" ); +// OSL_FAIL( // "Content::setPropertyValues - PROPPATCH failed!" ); #if 1 cancelCommandExecution( e, xEnv ); @@ -2234,7 +2226,7 @@ void Content::insert( if ( aEscapedTitle.getLength() == 0 ) { - OSL_ENSURE( sal_False, "Content::insert - Title missing!" ); + OSL_FAIL( "Content::insert - Title missing!" ); uno::Sequence< rtl::OUString > aProps( 1 ); aProps[ 0 ] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Title")); @@ -2312,8 +2304,7 @@ void Content::insert( // break; default: - OSL_ENSURE( sal_False, - "Content::insert - " + OSL_FAIL( "Content::insert - " "Unknown interaction selection!" ); throw ucb::CommandFailedException( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( @@ -2837,7 +2828,7 @@ sal_Bool Content::exchangeIdentity( // Already persistent? if ( m_bTransient ) { - OSL_ENSURE( sal_False, "Content::exchangeIdentity - Not persistent!" ); + OSL_FAIL( "Content::exchangeIdentity - Not persistent!" ); return sal_False; } @@ -2886,8 +2877,7 @@ sal_Bool Content::exchangeIdentity( } } - OSL_ENSURE( sal_False, - "Content::exchangeIdentity - " + OSL_FAIL( "Content::exchangeIdentity - " "Panic! Cannot exchange identity!" ); return sal_False; } diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index 638c0c948bca..730ef432ab77 100755 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -394,7 +394,7 @@ sal_Bool DataSupplier::getData() } catch ( DAVException & ) { -// OSL_ENSURE( sal_False, "PROPFIND : DAVException" ); +// OSL_FAIL( "PROPFIND : DAVException" ); m_pImpl->m_bThrowException = sal_True; } |