summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx6
-rw-r--r--dbaccess/source/core/api/HelperCollections.cxx2
-rw-r--r--dbaccess/source/core/api/KeySet.cxx10
-rw-r--r--dbaccess/source/core/api/RowSet.cxx2
-rw-r--r--dbaccess/source/core/api/RowSetBase.cxx84
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx8
-rw-r--r--dbaccess/source/core/api/SingleSelectQueryComposer.cxx12
-rw-r--r--dbaccess/source/core/api/TableDeco.cxx4
-rw-r--r--dbaccess/source/core/api/columnsettings.cxx2
-rw-r--r--dbaccess/source/core/api/querydescriptor.cxx2
-rw-r--r--dbaccess/source/core/api/resultcolumn.cxx2
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasedocument.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentdefinition.cxx6
-rw-r--r--dbaccess/source/core/dataaccess/documenteventexecutor.cxx8
-rw-r--r--dbaccess/source/core/misc/ContainerMediator.cxx2
-rw-r--r--dbaccess/source/core/recovery/dbdocrecovery.cxx10
-rw-r--r--dbaccess/source/core/recovery/settingsimport.cxx12
-rw-r--r--dbaccess/source/core/recovery/subcomponentrecovery.cxx14
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationdialog.cxx6
-rw-r--r--dbaccess/source/ext/macromigration/migrationengine.cxx12
-rw-r--r--dbaccess/source/ext/macromigration/migrationlog.cxx6
-rw-r--r--dbaccess/source/ext/macromigration/progresscapture.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlConnectionData.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlExport.cxx8
-rw-r--r--dbaccess/source/filter/xml/xmlHierarchyCollection.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlQuery.cxx2
-rw-r--r--dbaccess/source/filter/xml/xmlTable.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx18
-rw-r--r--dbaccess/source/ui/app/AppControllerGen.cxx4
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx12
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx2
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx42
-rw-r--r--dbaccess/source/ui/browser/dsEntriesNoExp.cxx2
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx10
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx6
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx8
-rw-r--r--dbaccess/source/ui/control/FieldDescControl.cxx2
-rw-r--r--dbaccess/source/ui/control/dbtreelistbox.cxx4
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/admincontrols.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dbwiz.cxx2
-rw-r--r--dbaccess/source/ui/dlg/dlgsave.cxx2
-rw-r--r--dbaccess/source/ui/dlg/queryfilter.cxx4
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx6
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx2
-rw-r--r--dbaccess/source/ui/misc/RowSetDrop.cxx2
-rw-r--r--dbaccess/source/ui/misc/TableCopyHelper.cxx2
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx6
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx16
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx12
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx4
-rw-r--r--dbaccess/source/ui/misc/linkeddocuments.cxx2
-rw-r--r--dbaccess/source/ui/misc/propertystorage.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/JoinTableView.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx10
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/TableWindow.cxx6
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx16
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableDesignControl.cxx2
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx8
-rw-r--r--dbaccess/source/ui/uno/dbinteraction.cxx6
69 files changed, 246 insertions, 246 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 134f57165a0f..932652961109 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -138,11 +138,11 @@ OCacheSet::~OCacheSet()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occurred");
+ OSL_FAIL("Exception occurred");
}
catch(...)
{
- OSL_ENSURE(0,"Unknown Exception occurred");
+ OSL_FAIL("Unknown Exception occurred");
}
DBG_DTOR(OCacheSet,NULL);
@@ -677,7 +677,7 @@ bool OCacheSet::isResultSetChanged() const
void OCacheSet::reset(const Reference< XResultSet>& /*_xDriverSet*/)
{
- OSL_ENSURE(0,"Illegal call!");
+ OSL_FAIL("Illegal call!");
}
void OCacheSet::mergeColumnValues(sal_Int32 i_nColumnIndex,ORowSetValueVector::Vector& /*io_aInsertRow*/,ORowSetValueVector::Vector& /*io_aRow*/,::std::vector<sal_Int32>& o_aChangedColumns)
diff --git a/dbaccess/source/core/api/HelperCollections.cxx b/dbaccess/source/core/api/HelperCollections.cxx
index 9bfc64370195..acc2d3ef337f 100644
--- a/dbaccess/source/core/api/HelperCollections.cxx
+++ b/dbaccess/source/core/api/HelperCollections.cxx
@@ -97,7 +97,7 @@ namespace dbaccess
if(aIter != m_aColumns->get().end())
return connectivity::sdbcx::ObjectType(*aIter,UNO_QUERY);
- OSL_ENSURE(0,"Column not found in collection!");
+ OSL_FAIL("Column not found in collection!");
}
return NULL;
}
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index a977272ce57a..a749729e4c88 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -135,7 +135,7 @@ OKeySet::~OKeySet()
}
catch(...)
{
- OSL_ENSURE(0,"Unknown Exception occurred");
+ OSL_FAIL("Unknown Exception occurred");
}
m_xComposer = NULL;
@@ -178,7 +178,7 @@ void OKeySet::findTableColumnsMatching_throw( const Any& i_aTable,
::rtl::OUString sUpdateTableName( i_rUpdateTableName );
if ( sUpdateTableName.getLength() == 0 )
{
- OSL_ENSURE( false, "OKeySet::findTableColumnsMatching_throw: This is a fallback only - it won't work when the table has an alias name." );
+ OSL_FAIL( "OKeySet::findTableColumnsMatching_throw: This is a fallback only - it won't work when the table has an alias name." );
// If i_aTable originates from a query composer, and is a table which appears with an alias in the SELECT statement,
// then the below code will not produce correct results.
// For instance, imagine a "SELECT alias.col FROM table AS alias". Now i_aTable would be the table named
@@ -766,7 +766,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
}
catch(Exception&)
{
- OSL_ENSURE(0,"Could not execute GeneratedKeys() stmt");
+ OSL_FAIL("Could not execute GeneratedKeys() stmt");
}
}
@@ -825,7 +825,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const ::rtl::OUString
}
catch(SQLException&)
{
- OSL_ENSURE(0,"Could not fetch with MAX() ");
+ OSL_FAIL("Could not fetch with MAX() ");
}
}
}
@@ -977,7 +977,7 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
aSql.append(::dbtools::quoteName( aQuote,aIter->second.sRealName));
if((_rDeleteRow->get())[aIter->second.nPosition].isNull())
{
- OSL_ENSURE(0,"can a primary key be null");
+ OSL_FAIL("can a primary key be null");
aSql.append(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" IS NULL")));
}
else
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index fc3fdb7ebb8e..54d791283ad6 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -230,7 +230,7 @@ ORowSet::~ORowSet()
{
if ( !m_rBHelper.bDisposed && !m_rBHelper.bInDispose )
{
- OSL_ENSURE(0, "Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
osl_incrementInterlockedCount( &m_refCount );
dispose();
}
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 531e31046edf..7adb83248310 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -240,7 +240,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::impl_getValue" );
if ( m_bBeforeFirst || m_bAfterLast )
{
- OSL_ENSURE(0,"ORowSetBase::getValue: Illegal call here (we're before first or after last)!");
+ OSL_FAIL("ORowSetBase::getValue: Illegal call here (we're before first or after last)!");
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
}
@@ -382,7 +382,7 @@ Reference< ::com::sun::star::io::XInputStream > SAL_CALL ORowSetBase::getBinaryS
if ( m_bBeforeFirst || m_bAfterLast )
{
- OSL_ENSURE(0,"ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!");
+ OSL_FAIL("ORowSetBase::getBinaryStream: Illegal call here (we're before first or after last)!");
::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_CURSOR_BEFORE_OR_AFTER ), SQL_INVALID_CURSOR_POSITION, *m_pMySelf );
}
@@ -453,7 +453,7 @@ Reference< XArray > SAL_CALL ORowSetBase::getArray( sal_Int32 /*columnIndex*/ )
Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getBookmark" );
- DBG_TRACE2("DBACCESS ORowSetBase::getBookmark() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::getBookmark() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
@@ -471,16 +471,16 @@ Any SAL_CALL ORowSetBase::getBookmark( ) throw(SQLException, RuntimeException)
sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::moveToBookmark" );
- DBG_TRACE2("DBACCESS ORowSetBase::moveToBookmark(Any) Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::moveToBookmark(Any) Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
OSL_ENSURE(bookmark.hasValue(),"ORowSetBase::moveToBookmark bookmark has no value!");
::osl::ResettableMutexGuard aGuard( *m_pMutex );
if(!bookmark.hasValue() || m_nResultSetType == ResultSetType::FORWARD_ONLY)
{
if(bookmark.hasValue())
- OSL_ENSURE(0,"MoveToBookmark is not possible when we are only forward");
+ OSL_FAIL("MoveToBookmark is not possible when we are only forward");
else
- OSL_ENSURE(0,"Bookmark is not valid");
+ OSL_FAIL("Bookmark is not valid");
throwFunctionSequenceException(*m_pMySelf);
}
@@ -516,14 +516,14 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx
// - IsNew
aNotifier.fire( );
}
- DBG_TRACE2("DBACCESS ORowSetBase::moveToBookmark(Any) = %i Clone = %i\n",bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::moveToBookmark(Any) = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::moveRelativeToBookmark" );
- DBG_TRACE2("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) Clone = %i\n",rows,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) Clone = %i\n",rows,m_bClone);
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -560,7 +560,7 @@ sal_Bool SAL_CALL ORowSetBase::moveRelativeToBookmark( const Any& bookmark, sal_
// RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) = %i Clone = %i\n",rows,bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::moveRelativeToBookmark(Any,%i) = %i Clone = %i\n",rows,bRet,m_bClone);
return bRet;
}
@@ -633,7 +633,7 @@ Reference< XNameAccess > SAL_CALL ORowSetBase::getColumns( ) throw(RuntimeExcep
sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::next" );
- DBG_TRACE2("DBACCESS ORowSetBase::next() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::next() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkCache();
@@ -675,7 +675,7 @@ sal_Bool SAL_CALL ORowSetBase::next( ) throw(SQLException, RuntimeException)
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::next() = %i Clone = %i ID = %i\n",bRet,m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::next() = %i Clone = %i ID = %i\n",bRet,m_bClone,osl_getThreadIdentifier(NULL));
return bRet;
}
@@ -686,7 +686,7 @@ sal_Bool SAL_CALL ORowSetBase::isBeforeFirst( ) throw(SQLException, RuntimeExce
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
- DBG_TRACE2("DBACCESS ORowSetBase::isBeforeFirst() = %i Clone = %i\n",m_bBeforeFirst,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isBeforeFirst() = %i Clone = %i\n",m_bBeforeFirst,m_bClone);
return m_bBeforeFirst;
}
@@ -697,7 +697,7 @@ sal_Bool SAL_CALL ORowSetBase::isAfterLast( ) throw(SQLException, RuntimeExcept
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
- DBG_TRACE2("DBACCESS ORowSetBase::isAfterLast() = %i Clone = %i\n",m_bAfterLast,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isAfterLast() = %i Clone = %i\n",m_bAfterLast,m_bClone);
return m_bAfterLast;
}
@@ -711,7 +711,7 @@ sal_Bool ORowSetBase::isOnFirst()
sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isFirst" );
- DBG_TRACE2("DBACCESS ORowSetBase::isFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::isFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
@@ -726,7 +726,7 @@ sal_Bool SAL_CALL ORowSetBase::isFirst( ) throw(SQLException, RuntimeException)
positionCache( MOVE_NONE_REFRESH_ONLY );
sal_Bool bIsFirst = m_pCache->isFirst();
- DBG_TRACE2("DBACCESS ORowSetBase::isFirst() = %i Clone = %i\n",bIsFirst,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isFirst() = %i Clone = %i\n",bIsFirst,m_bClone);
return bIsFirst;
}
@@ -739,7 +739,7 @@ sal_Bool ORowSetBase::isOnLast()
sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::isLast" );
- DBG_TRACE2("DBACCESS ORowSetBase::isLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::isLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
@@ -758,14 +758,14 @@ sal_Bool SAL_CALL ORowSetBase::isLast( ) throw(SQLException, RuntimeException)
positionCache( MOVE_NONE_REFRESH_ONLY );
sal_Bool bIsLast = m_pCache->isLast();
- DBG_TRACE2("DBACCESS ORowSetBase::isLast() = %i Clone = %i\n",bIsLast,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::isLast() = %i Clone = %i\n",bIsLast,m_bClone);
return bIsLast;
}
void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::beforeFirst" );
- DBG_TRACE2("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -801,13 +801,13 @@ void SAL_CALL ORowSetBase::beforeFirst( ) throw(SQLException, RuntimeException)
// to be done _after_ the notifications!
m_aOldRow->clearRow();
}
- DBG_TRACE2("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::beforeFirst() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::afterLast" );
- DBG_TRACE2("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -841,14 +841,14 @@ void SAL_CALL ORowSetBase::afterLast( ) throw(SQLException, RuntimeException)
fireRowcount();
}
}
- DBG_TRACE2("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::afterLast() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>& _aCheckFunctor,
::std::mem_fun_t<sal_Bool,ORowSetCache>& _aMovementFunctor)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::move" );
- DBG_TRACE2("DBACCESS ORowSetBase::move() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::move() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkPositioningAllowed();
@@ -888,14 +888,14 @@ sal_Bool SAL_CALL ORowSetBase::move( ::std::mem_fun_t<sal_Bool,ORowSetBase>&
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE2("DBACCESS ORowSetBase::move() = %i Clone = %i\n",bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::move() = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
sal_Bool SAL_CALL ORowSetBase::first( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::first" );
- DBG_TRACE2("DBACCESS ORowSetBase::first() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::first() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::std::mem_fun_t<sal_Bool,ORowSetBase> ioF_tmp(&ORowSetBase::isOnFirst);
::std::mem_fun_t<sal_Bool,ORowSetCache> F_tmp(&ORowSetCache::first);
return move(ioF_tmp,F_tmp);
@@ -904,7 +904,7 @@ sal_Bool SAL_CALL ORowSetBase::first( ) throw(SQLException, RuntimeException)
sal_Bool SAL_CALL ORowSetBase::last( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::last" );
- DBG_TRACE2("DBACCESS ORowSetBase::last() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::last() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::std::mem_fun_t<sal_Bool,ORowSetBase> ioL_tmp(&ORowSetBase::isOnLast);
::std::mem_fun_t<sal_Bool,ORowSetCache> L_tmp(&ORowSetCache::last);
return move(ioL_tmp,L_tmp);
@@ -913,7 +913,7 @@ sal_Bool SAL_CALL ORowSetBase::last( ) throw(SQLException, RuntimeException)
sal_Int32 SAL_CALL ORowSetBase::getRow( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::getRow" );
- DBG_TRACE2("DBACCESS ORowSetBase::getRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::getRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::osl::MutexGuard aGuard( *m_pMutex );
checkCache();
@@ -943,14 +943,14 @@ sal_Int32 ORowSetBase::impl_getRow()
}
nPos = m_pCache->getRow();
}
- DBG_TRACE3("DBACCESS ORowSetBase::impl_getRow() = %i Clone = %i ID = %i\n",nPos,m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::impl_getRow() = %i Clone = %i ID = %i\n",nPos,m_bClone,osl_getThreadIdentifier(NULL));
return nPos;
}
sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::absolute" );
- DBG_TRACE2("DBACCESS ORowSetBase::absolute(%i) Clone = %i\n",row,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::absolute(%i) Clone = %i\n",row,m_bClone);
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
checkPositioningAllowed();
@@ -989,14 +989,14 @@ sal_Bool SAL_CALL ORowSetBase::absolute( sal_Int32 row ) throw(SQLException, Run
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::absolute(%i) = %i Clone = %i\n",row,bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::absolute(%i) = %i Clone = %i\n",row,bRet,m_bClone);
return bRet;
}
sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::relative" );
- DBG_TRACE2("DBACCESS ORowSetBase::relative(%i) Clone = %i\n",rows,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::relative(%i) Clone = %i\n",rows,m_bClone);
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -1045,14 +1045,14 @@ sal_Bool SAL_CALL ORowSetBase::relative( sal_Int32 rows ) throw(SQLException, Ru
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE3("DBACCESS ORowSetBase::relative(%i) = %i Clone = %i\n",rows,bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::relative(%i) = %i Clone = %i\n",rows,bRet,m_bClone);
return bRet;
}
sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::previous" );
- DBG_TRACE2("DBACCESS ORowSetBase::previous() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::previous() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
::connectivity::checkDisposed(m_rBHelper.bDisposed);
::osl::ResettableMutexGuard aGuard( *m_pMutex );
@@ -1098,14 +1098,14 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException
// - RowCount/IsRowCountFinal
fireRowcount();
}
- DBG_TRACE2("DBACCESS ORowSetBase::previous() = %i Clone = %i\n",bRet,m_bClone);
+ OSL_TRACE("DBACCESS ORowSetBase::previous() = %i Clone = %i\n",bRet,m_bClone);
return bRet;
}
void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const ORowSetRow& _rOldValues, ::osl::ResettableMutexGuard& _rGuard )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::setCurrentRow" );
- DBG_TRACE2("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
m_bBeforeFirst = m_pCache->isBeforeFirst();
m_bAfterLast = m_pCache->isAfterLast();
@@ -1163,7 +1163,7 @@ void ORowSetBase::setCurrentRow( sal_Bool _bMoved, sal_Bool _bDoNotify, const OR
// - cursorMoved
notifyAllListenersCursorMoved( _rGuard );
- DBG_TRACE2("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::setCurrentRow() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
void ORowSetBase::checkPositioningAllowed() throw( SQLException, RuntimeException )
@@ -1271,7 +1271,7 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
return;
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::firePropertyChange" );
- DBG_TRACE2("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
OSL_ENSURE(m_pColumns,"Columns can not be NULL here!");
#if OSL_DEBUG_LEVEL > 1
sal_Bool bNull;
@@ -1288,9 +1288,9 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
}
catch(Exception&)
{
- OSL_ENSURE(0,"firePropertyChange: Exception");
+ OSL_FAIL("firePropertyChange: Exception");
}
- DBG_TRACE2("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
void ORowSetBase::firePropertyChange(sal_Int32 _nPos,const ::connectivity::ORowSetValue& _rOldValue)
@@ -1336,7 +1336,7 @@ void ORowSetBase::fireProperty( sal_Int32 _nProperty, sal_Bool _bNew, sal_Bool _
void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection )
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::positionCache" );
- DBG_TRACE2("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
sal_Bool bSuccess = sal_False;
if ( m_aBookmark.hasValue() )
@@ -1387,7 +1387,7 @@ void ORowSetBase::positionCache( CursorMoveDirection _ePrepareForDirection )
OSL_ENSURE( bSuccess, "ORowSetBase::positionCache: failed!" );
(void)bSuccess;
- DBG_TRACE2("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::positionCache() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
void ORowSetBase::checkCache()
@@ -1401,7 +1401,7 @@ void ORowSetBase::checkCache()
void ORowSetBase::movementFailed()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "ORowSetBase::movementFailed" );
- DBG_TRACE2("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
m_aOldRow->clearRow();
m_aCurrentRow = m_pCache->getEnd();
m_bBeforeFirst = m_pCache->isBeforeFirst();
@@ -1409,7 +1409,7 @@ void ORowSetBase::movementFailed()
m_aBookmark = Any();
m_aCurrentRow.setBookmark(m_aBookmark);
OSL_ENSURE(m_bBeforeFirst || m_bAfterLast,"BeforeFirst or AfterLast is wrong!");
- DBG_TRACE2("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
+ OSL_TRACE("DBACCESS ORowSetBase::movementFailed() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
ORowSetRow ORowSetBase::getOldRow(sal_Bool _bWasNew)
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 4640b1bc6f60..2a5157d594f2 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -848,7 +848,7 @@ sal_Bool ORowSetCache::moveWindow()
}
else
{ // normally this should never happen
- OSL_ENSURE(0,"What the hell is happen here!");
+ OSL_FAIL("What the hell is happen here!");
return sal_False;
}
}
@@ -1229,7 +1229,7 @@ sal_Bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
}
else
{
- OSL_ENSURE(0,"There must be a bookmark after the row was inserted!");
+ OSL_FAIL("There must be a bookmark after the row was inserted!");
}
}
return bRet;
@@ -1318,7 +1318,7 @@ void ORowSetCache::cancelRowUpdates( )
m_bNew = m_bModified = sal_False;
if(!m_nPosition)
{
- OSL_ENSURE(0,"cancelRowUpdates:Invalid positions pos == 0");
+ OSL_FAIL("cancelRowUpdates:Invalid positions pos == 0");
::dbtools::throwFunctionSequenceException(NULL);
}
@@ -1326,7 +1326,7 @@ void ORowSetCache::cancelRowUpdates( )
m_pCacheSet->fillValueRow(*m_aMatrixIter,m_nPosition);
else
{
- OSL_ENSURE(0,"cancelRowUpdates couldn't position right with absolute");
+ OSL_FAIL("cancelRowUpdates couldn't position right with absolute");
::dbtools::throwFunctionSequenceException(NULL);
}
}
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index cd9577f94068..f050ee195b18 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -1068,15 +1068,15 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
}
else if (SQL_ISRULE(pCondition,in_predicate))
{
- OSL_ENSURE( false, "OSingleSelectQueryComposer::setANDCriteria: in_predicate not implemented!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setANDCriteria: in_predicate not implemented!" );
}
else if (SQL_ISRULE(pCondition,all_or_any_predicate))
{
- OSL_ENSURE( false, "OSingleSelectQueryComposer::setANDCriteria: all_or_any_predicate not implemented!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setANDCriteria: all_or_any_predicate not implemented!" );
}
else if (SQL_ISRULE(pCondition,between_predicate))
{
- OSL_ENSURE( false, "OSingleSelectQueryComposer::setANDCriteria: between_predicate not implemented!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::setANDCriteria: between_predicate not implemented!" );
}
rFilter.push_back(aItem);
@@ -1122,7 +1122,7 @@ sal_Int32 OSingleSelectQueryComposer::getPredicateType(OSQLParseNode * _pPredica
nPredicate = SQLFilterOperator::GREATER_EQUAL;
break;
default:
- OSL_ENSURE(0,"Wrong NodeType!");
+ OSL_FAIL("Wrong NodeType!");
}
return nPredicate;
}
@@ -1793,7 +1793,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
switch(_ePart)
{
default:
- OSL_ENSURE( 0, "OSingleSelectQueryComposer::getKeyWord: Invalid enum value!" );
+ OSL_FAIL( "OSingleSelectQueryComposer::getKeyWord: Invalid enum value!" );
// no break, fallback to WHERE
case Where:
sKeyword = STR_WHERE;
@@ -1831,7 +1831,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
F_tmp = TGetParseNode(&OSQLParseTreeIterator::getSimpleOrderTree);
break;
default:
- OSL_ENSURE(0,"Invalid enum value!");
+ OSL_FAIL("Invalid enum value!");
}
::rtl::OUString sRet = getStatementPart( F_tmp, _rIterator );
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index 40bf99774f95..d2b724f68a04 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -187,7 +187,7 @@ void ODBTableDecorator::setFastPropertyValue_NoBroadcast(sal_Int32 _nHandle, con
switch(_nHandle)
{
case PROPERTY_ID_PRIVILEGES:
- OSL_ENSURE(0,"Property is readonly!");
+ OSL_FAIL("Property is readonly!");
case PROPERTY_ID_FILTER:
case PROPERTY_ID_ORDER:
case PROPERTY_ID_APPLYFILTER:
@@ -326,7 +326,7 @@ void ODBTableDecorator::getFastPropertyValue(Any& _rValue, sal_Int32 _nHandle) c
}
break;
default:
- OSL_ENSURE(0,"Invalid Handle for table");
+ OSL_FAIL("Invalid Handle for table");
}
}
diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx
index ca978e39a796..985a252cdb57 100644
--- a/dbaccess/source/core/api/columnsettings.cxx
+++ b/dbaccess/source/core/api/columnsettings.cxx
@@ -132,7 +132,7 @@ namespace dbaccess
return !bHidden;
}
}
- OSL_ENSURE( false, "OColumnSettings::isDefaulted: illegal property handle!" );
+ OSL_FAIL( "OColumnSettings::isDefaulted: illegal property handle!" );
return sal_False;
}
diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx
index b06a87abebcf..8a03f3fd9ced 100644
--- a/dbaccess/source/core/api/querydescriptor.cxx
+++ b/dbaccess/source/core/api/querydescriptor.cxx
@@ -257,7 +257,7 @@ void OQueryDescriptor_Base::columnDropped(const ::rtl::OUString& /*_sName*/)
Reference< XPropertySet > OQueryDescriptor_Base::createColumnDescriptor()
{
- OSL_ENSURE( false, "OQueryDescriptor_Base::createColumnDescriptor: called why?" );
+ OSL_FAIL( "OQueryDescriptor_Base::createColumnDescriptor: called why?" );
return NULL;
}
diff --git a/dbaccess/source/core/api/resultcolumn.cxx b/dbaccess/source/core/api/resultcolumn.cxx
index 89db5a7942a9..7949cef634ce 100644
--- a/dbaccess/source/core/api/resultcolumn.cxx
+++ b/dbaccess/source/core/api/resultcolumn.cxx
@@ -272,7 +272,7 @@ void OResultColumn::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) const
rValue <<= m_xMetaData->getColumnTypeName(m_nPos);
break;
default:
- OSL_ENSURE( false, "OResultColumn::getFastPropertyValue: unknown property handle!" );
+ OSL_FAIL( "OResultColumn::getFastPropertyValue: unknown property handle!" );
break;
}
}
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 9c446a18ff1f..128595fea054 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -98,7 +98,7 @@ namespace
}
catch(Exception)
{
- OSL_ENSURE( 0, "lcl_isPropertySetDefaulted: Exception caught!" );
+ OSL_FAIL( "lcl_isPropertySetDefaulted: Exception caught!" );
}
}
return ( pIter == pEnd );
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index ee1c12a363c1..2a5d15388a65 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -255,7 +255,7 @@ OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const
aFind->second->addPropertyChangeListener(::rtl::OUString(),m_xColumnPropertyListener.getRef());
return new OTableColumnWrapper( aFind->second, aFind->second, true );
}
- OSL_ENSURE( false, "OComponentDefinition::createColumn: is this a valid case?" );
+ OSL_FAIL( "OComponentDefinition::createColumn: is this a valid case?" );
// This here is the last place creating a OTableColumn, and somehow /me thinks it is not needed ...
return new OTableColumn( _rName );
}
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 418732950559..fc754bb084d0 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -681,7 +681,7 @@ void SAL_CALL ODatabaseModelImpl::disposing( const ::com::sun::star::lang::Event
}
else
{
- OSL_ENSURE( false, "ODatabaseModelImpl::disposing: where does this come from?" );
+ OSL_FAIL( "ODatabaseModelImpl::disposing: where does this come from?" );
}
}
@@ -1414,7 +1414,7 @@ sal_Bool ODatabaseModelImpl::hasTrustedScriptingSignature( sal_Bool /*bAllowUITo
void ODatabaseModelImpl::showBrokenSignatureWarning( const Reference< XInteractionHandler >& /*_rxInteraction*/ ) const
{
- OSL_ENSURE( false, "ODatabaseModelImpl::showBrokenSignatureWarning: signatures can't be broken - we do not support them!" );
+ OSL_FAIL( "ODatabaseModelImpl::showBrokenSignatureWarning: signatures can't be broken - we do not support them!" );
}
void ODatabaseModelImpl::storageIsModified()
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 692f5a4416b9..9d4c6ecbfaac 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -497,7 +497,7 @@ void ODatabaseContext::storeTransientProperties( ODatabaseModelImpl& _rModelImpl
}
else if ( m_aDatabaseObjects.find( _rModelImpl.m_sName ) != m_aDatabaseObjects.end() )
{
- OSL_ENSURE( false, "ODatabaseContext::storeTransientProperties: a database document register by name? This shouldn't happen anymore!" );
+ OSL_FAIL( "ODatabaseContext::storeTransientProperties: a database document register by name? This shouldn't happen anymore!" );
// all the code should have been changed so that registration is by URL only
m_aDatasourceProperties[ _rModelImpl.m_sName ] = aRememberProps.getPropertyValues();
}
@@ -698,7 +698,7 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl
setTransientProperties( sURL, _rModelImpl );
}
else
- OSL_ENSURE( false, "ODatabaseContext::registerDatabaseDocument: already have an object registered for this URL!" );
+ OSL_FAIL( "ODatabaseContext::registerDatabaseDocument: already have an object registered for this URL!" );
}
void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl )
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index 22387baf9c76..500a503bbda0 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -554,7 +554,7 @@ namespace
// TODO: clarify: anything else to care for? Both the sub componbents with and without model
// should support the XModifiable interface, so I think nothing more is needed here.
- OSL_ENSURE( false, "lcl_hasAnyModifiedSubComponent_throw: anything left to do here?" );
+ OSL_FAIL( "lcl_hasAnyModifiedSubComponent_throw: anything left to do here?" );
}
return isAnyModified;
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 51b07d58eb99..7b5baa1d5f8e 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -1024,7 +1024,7 @@ Any SAL_CALL ODocumentDefinition::execute( const Command& aCommand, sal_Int32 Co
bool bActivateObject = true;
if ( bOpenForMail )
{
- OSL_ENSURE( false, "ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
+ OSL_FAIL( "ODocumentDefinition::execute: 'openForMail' should not be used anymore - use the 'Hidden' parameter instead!" );
bActivateObject = false;
}
@@ -1345,7 +1345,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
}
catch(Exception&)
{
- OSL_ENSURE(0,"ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
+ OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
return sal_True;
}
@@ -1454,7 +1454,7 @@ sal_Bool ODocumentDefinition::saveAs()
}
catch(Exception&)
{
- OSL_ENSURE(0,"ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
+ OSL_FAIL("ODocumentDefinition::save: caught an Exception (tried to let the InteractionHandler handle it)!");
}
return sal_True;
}
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index e3301f12a52f..ab44de2c27bf 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -101,7 +101,7 @@ namespace dbaccess
xDispProv.set( xController->getFrame(), UNO_QUERY );
if ( !xDispProv.is() )
{
- OSL_ENSURE( false, "lcl_dispatchScriptURL_throw: no controller/frame? How should I dispatch?" );
+ OSL_FAIL( "lcl_dispatchScriptURL_throw: no controller/frame? How should I dispatch?" );
return;
}
@@ -118,7 +118,7 @@ namespace dbaccess
Reference< XDispatch > xDispatch( xDispProv->queryDispatch( aScriptURL, ::rtl::OUString(), 0 ) );
if ( !xDispatch.is() )
{
- OSL_ENSURE( false, "lcl_dispatchScriptURL_throw: no dispatcher for the script URL!" );
+ OSL_FAIL( "lcl_dispatchScriptURL_throw: no dispatcher for the script URL!" );
return;
}
@@ -163,7 +163,7 @@ namespace dbaccess
Reference< XEventsSupplier > xEventsSupplier( m_pData->xDocument.get(), UNO_QUERY );
if ( !xEventsSupplier.is() )
{
- OSL_ENSURE( false, "DocumentEventExecutor::documentEventOccurred: no document anymore, but still being notified?" );
+ OSL_FAIL( "DocumentEventExecutor::documentEventOccurred: no document anymore, but still being notified?" );
return;
}
@@ -176,7 +176,7 @@ namespace dbaccess
{
// this is worth an assertion: We are listener at the very same document which we just asked
// for its events. So when EventName is fired, why isn't it supported by xDocEvents?
- OSL_ENSURE( false, "DocumentEventExecutor::documentEventOccurred: an unsupported event is notified!" );
+ OSL_FAIL( "DocumentEventExecutor::documentEventOccurred: an unsupported event is notified!" );
return;
}
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index cd1dd3c2907c..f8e4b294e659 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -223,7 +223,7 @@ void OContainerMediator::notifyElementCreated( const ::rtl::OUString& _sName, co
&& aFind->second->getDefinition().is()
)
{
- OSL_ENSURE( false, "OContainerMediator::notifyElementCreated: is this really a valid case?" );
+ OSL_FAIL( "OContainerMediator::notifyElementCreated: is this really a valid case?" );
return;
}
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 8dbf2c77fe19..42040e4b7ae2 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -110,7 +110,7 @@ namespace dbaccess
const sal_Int32 nEqualSignPos = i_rIniLine.indexOf( sal_Unicode( '=' ) );
if ( nEqualSignPos < 1 )
{
- OSL_ENSURE( false, "lcl_extractCompDesc: invalid map file entry - unexpected pos of '='" );
+ OSL_FAIL( "lcl_extractCompDesc: invalid map file entry - unexpected pos of '='" );
return false;
}
o_rStorName = i_rIniLine.copy( 0, nEqualSignPos );
@@ -118,7 +118,7 @@ namespace dbaccess
const sal_Int32 nCommaPos = i_rIniLine.lastIndexOf( sal_Unicode( ',' ) );
if ( nCommaPos != i_rIniLine.getLength() - 2 )
{
- OSL_ENSURE( false, "lcl_extractCompDesc: invalid map file entry - unexpected pos of ','" );
+ OSL_FAIL( "lcl_extractCompDesc: invalid map file entry - unexpected pos of ','" );
return false;
}
o_rCompDesc.sName = i_rIniLine.copy( nEqualSignPos + 1, nCommaPos - nEqualSignPos - 1 );
@@ -199,7 +199,7 @@ namespace dbaccess
ENSURE_OR_THROW( i_rStorage.is(), "invalid storage" );
if ( !i_rStorage->hasByName( lcl_getObjectMapStreamName() ) )
{ // nothing to do, though suspicious
- OSL_ENSURE( false, "lcl_readObjectMap_throw: if there's no map file, then there's expected to be no storage, too!" );
+ OSL_FAIL( "lcl_readObjectMap_throw: if there's no map file, then there's expected to be no storage, too!" );
return;
}
@@ -252,7 +252,7 @@ namespace dbaccess
const Reference< XModifiable > xModify( i_rSubComponent, UNO_QUERY );
if ( !xModify.is() )
{
- OSL_ENSURE( false, "lcl_markModified: unhandled case!" );
+ OSL_FAIL( "lcl_markModified: unhandled case!" );
return;
}
@@ -398,7 +398,7 @@ namespace dbaccess
message.append( "' not found in '" );
message.append( ::rtl::OUStringToOString( SubComponentRecovery::getComponentsStorageName( eComponentType ), RTL_TEXTENCODING_ASCII_US ) );
message.append( "', but required per map file!" );
- OSL_ENSURE( false, message.makeStringAndClear() );
+ OSL_FAIL( message.makeStringAndClear() );
#endif
continue;
}
diff --git a/dbaccess/source/core/recovery/settingsimport.cxx b/dbaccess/source/core/recovery/settingsimport.cxx
index 931ea295f750..397c97eeb34c 100644
--- a/dbaccess/source/core/recovery/settingsimport.cxx
+++ b/dbaccess/source/core/recovery/settingsimport.cxx
@@ -162,7 +162,7 @@ namespace dbaccess
::rtl::OString sMessage( "unknown (or unsupported at this place) element name '" );
sMessage += ::rtl::OUStringToOString( i_rElementName, RTL_TEXTENCODING_UTF8 );
sMessage += "', ignoring";
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
return new IgnoringSettingsImport;
}
@@ -184,7 +184,7 @@ namespace dbaccess
//--------------------------------------------------------------------
::rtl::Reference< SettingsImport > ConfigItemImport::nextState( const ::rtl::OUString& i_rElementName )
{
- OSL_ENSURE( false, "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" );
+ OSL_FAIL( "ConfigItemImport::nextState: unexpected: this class is responsible for child-less items only!" );
(void)i_rElementName;
return new IgnoringSettingsImport;
}
@@ -220,7 +220,7 @@ namespace dbaccess
o_rValue <<= nValue;
else
{
- OSL_ENSURE( false, "ConfigItemImport::getItemValue: could not convert an int value!" );
+ OSL_FAIL( "ConfigItemImport::getItemValue: could not convert an int value!" );
}
}
else if ( ::xmloff::token::IsXMLToken( rItemType, ::xmloff::token::XML_BOOLEAN ) )
@@ -230,7 +230,7 @@ namespace dbaccess
o_rValue <<= nValue;
else
{
- OSL_ENSURE( false, "ConfigItemImport::getItemValue: could not convert a boolean value!" );
+ OSL_FAIL( "ConfigItemImport::getItemValue: could not convert a boolean value!" );
}
}
else if ( ::xmloff::token::IsXMLToken( rItemType, ::xmloff::token::XML_STRING ) )
@@ -243,7 +243,7 @@ namespace dbaccess
::rtl::OString sMessage( "ConfigItemImport::getItemValue: unsupported item type '" );
sMessage += ::rtl::OUStringToOString( rItemType, RTL_TEXTENCODING_UTF8 );
sMessage += "', ignoring";
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
}
@@ -279,7 +279,7 @@ namespace dbaccess
::rtl::OString sMessage( "unknown element name '" );
sMessage += ::rtl::OUStringToOString( i_rElementName, RTL_TEXTENCODING_UTF8 );
sMessage += "', ignoring";
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
#endif
return new IgnoringSettingsImport;
}
diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
index 88a8f2ef26ad..3ec74ecbb93d 100644
--- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx
+++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx
@@ -118,7 +118,7 @@ namespace dbaccess
break;
}
- OSL_ENSURE( false, "lcl_getComponentStorageBaseName: unimplemented case!" );
+ OSL_FAIL( "lcl_getComponentStorageBaseName: unimplemented case!" );
static const ::rtl::OUString s_sFallback;
return s_sFallback;
}
@@ -341,7 +341,7 @@ namespace dbaccess
}
else
{
- OSL_ENSURE( false, "SettingsDocumentHandler::startElement: invalid settings file!" );
+ OSL_FAIL( "SettingsDocumentHandler::startElement: invalid settings file!" );
// Yes, that's not correct. Somebody could, in theory, give us a document which starts with "foo:settings",
// where "foo" is mapped to the proper namespace URL.
// However, there's no need to bother with this. The "recovery" sub storage we're recovering from is
@@ -390,7 +390,7 @@ namespace dbaccess
//--------------------------------------------------------------------
void SAL_CALL SettingsDocumentHandler::processingInstruction( const ::rtl::OUString& i_Target, const ::rtl::OUString& i_Data ) throw (SAXException, RuntimeException)
{
- OSL_ENSURE( false, "SettingsDocumentHandler::processingInstruction: unexpected ..." );
+ OSL_FAIL( "SettingsDocumentHandler::processingInstruction: unexpected ..." );
(void)i_Target;
(void)i_Data;
}
@@ -429,7 +429,7 @@ namespace dbaccess
break;
}
- OSL_ENSURE( false, "SubComponentRecovery::getComponentsStorageName: unimplemented case!" );
+ OSL_FAIL( "SubComponentRecovery::getComponentsStorageName: unimplemented case!" );
static const ::rtl::OUString s_sFallback;
return s_sFallback;
}
@@ -466,7 +466,7 @@ namespace dbaccess
default:
// TODO
- OSL_ENSURE( false, "SubComponentRecoverys::saveToRecoveryStorage: unimplemented case!" );
+ OSL_FAIL( "SubComponentRecoverys::saveToRecoveryStorage: unimplemented case!" );
break;
}
@@ -524,7 +524,7 @@ namespace dbaccess
}
else
{
- OSL_ENSURE( false, "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the given sub component!" );
+ OSL_FAIL( "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the given sub component!" );
}
break;
}
@@ -692,7 +692,7 @@ namespace dbaccess
xSubComponent = impl_recoverQueryDesign_throw( i_rRecoveryStorage, i_rComponentName, i_bForEditing );
break;
default:
- OSL_ENSURE( false, "SubComponentRecovery::recoverFromStorage: unimplemented case!" );
+ OSL_FAIL( "SubComponentRecovery::recoverFromStorage: unimplemented case!" );
break;
}
return xSubComponent;
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
index 27c195b46772..c1c55fd6dad7 100644
--- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx
@@ -271,7 +271,7 @@ namespace dbmm
break;
default:
- OSL_ENSURE( false, "MacroMigrationDialog::enterState: unhandled state!" );
+ OSL_FAIL( "MacroMigrationDialog::enterState: unhandled state!" );
}
}
@@ -296,7 +296,7 @@ namespace dbmm
case STATE_SUMMARY:
break;
default:
- OSL_ENSURE( false, "MacroMigrationDialog::prepareLeaveCurrentState: unhandled state!" );
+ OSL_FAIL( "MacroMigrationDialog::prepareLeaveCurrentState: unhandled state!" );
}
return sal_True;
@@ -535,7 +535,7 @@ namespace dbmm
if ( !xController->suspend( sal_True ) )
{ // ouch. There shouldn't be any modal dialogs and such, so there
// really is no reason why suspending shouldn't work.
- OSL_ENSURE( false, "MacroMigrationDialog::impl_reloadDocument_nothrow: could not suspend a controller!" );
+ OSL_FAIL( "MacroMigrationDialog::impl_reloadDocument_nothrow: could not suspend a controller!" );
// ignoring this would be at the cost of a crash (potentially)
// so, we cannot continue here.
throw CloseVetoException();
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx
index c04fea1539d3..e85f60379514 100644
--- a/dbaccess/source/ext/macromigration/migrationengine.cxx
+++ b/dbaccess/source/ext/macromigration/migrationengine.cxx
@@ -215,7 +215,7 @@ namespace dbmm
break;
}
- OSL_ENSURE( false, "lcl_getScriptsSubStorageName: illegal type!" );
+ OSL_FAIL( "lcl_getScriptsSubStorageName: illegal type!" );
static ::rtl::OUString s_sEmpty;
return s_sEmpty;
}
@@ -250,7 +250,7 @@ namespace dbmm
return true;
}
}
- OSL_ENSURE( false, "lcl_getScriptTypeFromLanguage: unknown language!" );
+ OSL_FAIL( "lcl_getScriptTypeFromLanguage: unknown language!" );
return false;
}
@@ -1020,7 +1020,7 @@ namespace dbmm
{
if ( m_aSubDocs.empty() )
{
- OSL_ENSURE( false, "MigrationEngine_Impl::migrateAll: no forms/reports found!" );
+ OSL_FAIL( "MigrationEngine_Impl::migrateAll: no forms/reports found!" );
// The whole migration wizard is not expected to be called when there are no forms/reports
// with macros, not to mention when there are no forms/reports at all.
return false;
@@ -1639,7 +1639,7 @@ namespace dbmm
|| !_rScriptType.getLength()
)
{
- OSL_ENSURE( false,
+ OSL_FAIL(
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: no or unknown script type!" );
m_rLogger.logRecoverable( MigrationError(
ERR_UNKNOWN_SCRIPT_TYPE,
@@ -1657,7 +1657,7 @@ namespace dbmm
ScriptType eScriptType = eBasic;
if ( !lcl_getScriptTypeFromLanguage( sScriptLanguage, eScriptType ) )
{
- OSL_ENSURE( false,
+ OSL_FAIL(
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: unknown script language!" );
m_rLogger.logRecoverable( MigrationError(
ERR_UNKNOWN_SCRIPT_LANGUAGE,
@@ -1678,7 +1678,7 @@ namespace dbmm
sal_Int32 nLibModuleSeparator = sScriptName.indexOf( '.' );
if ( nLibModuleSeparator < 0 )
{
- OSL_ENSURE( false,
+ OSL_FAIL(
"MigrationEngine_Impl::impl_adjustScriptLibrary_nothrow: invalid/unknown location format!" );
m_rLogger.logRecoverable( MigrationError(
ERR_UNKNOWN_SCRIPT_NAME_FORMAT,
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx
index 2d44e7ed764d..e2396be224e3 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -215,7 +215,7 @@ namespace dbmm
DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID );
if ( docPos == m_pData->aDocumentLogs.end() )
{
- OSL_ENSURE( false, "MigrationLog::getNewLibraryName: document is not known!" );
+ OSL_FAIL( "MigrationLog::getNewLibraryName: document is not known!" );
return s_sEmptyString;
}
@@ -231,7 +231,7 @@ namespace dbmm
return lib->sNewName;
}
- OSL_ENSURE( false, "MigrationLog::getNewLibraryName: doc is known, but library isn't!" );
+ OSL_FAIL( "MigrationLog::getNewLibraryName: doc is known, but library isn't!" );
return s_sEmptyString;
}
@@ -433,7 +433,7 @@ namespace dbmm
DocumentLogs::const_iterator docPos = m_pData->aDocumentLogs.find( _nDocID );
if ( docPos == m_pData->aDocumentLogs.end() )
{
- OSL_ENSURE( false, "MigrationLog::movedAnyLibrary: document is not known!" );
+ OSL_FAIL( "MigrationLog::movedAnyLibrary: document is not known!" );
return false;
}
return !docPos->second.aMovedLibraries.empty();
diff --git a/dbaccess/source/ext/macromigration/progresscapture.cxx b/dbaccess/source/ext/macromigration/progresscapture.cxx
index a151edee2a58..869983c14c02 100644
--- a/dbaccess/source/ext/macromigration/progresscapture.cxx
+++ b/dbaccess/source/ext/macromigration/progresscapture.cxx
@@ -128,7 +128,7 @@ namespace dbmm
//--------------------------------------------------------------------
void SAL_CALL ProgressCapture::reset( ) throw (RuntimeException)
{
- OSL_ENSURE( false, "ProgressCapture::reset: not implemented!" );
+ OSL_FAIL( "ProgressCapture::reset: not implemented!" );
}
//........................................................................
diff --git a/dbaccess/source/filter/xml/xmlConnectionData.cxx b/dbaccess/source/filter/xml/xmlConnectionData.cxx
index 25ec65a48c7b..3695f24c6590 100644
--- a/dbaccess/source/filter/xml/xmlConnectionData.cxx
+++ b/dbaccess/source/filter/xml/xmlConnectionData.cxx
@@ -99,7 +99,7 @@ SvXMLImportContext* OXMLConnectionData::CreateChildContext(
if ( !m_bFoundOne )
{
m_bFoundOne = true;
- OSL_ENSURE(0,"Not supported yet!");
+ OSL_FAIL("Not supported yet!");
}
break;
}
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index bfd267e140bc..6ab73c64c360 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -179,7 +179,7 @@ namespace dbaxml
return s_sTypeInteger;
default:
- OSL_ENSURE( false, "lcl_implGetPropertyXMLType: unsupported value type!" );
+ OSL_FAIL( "lcl_implGetPropertyXMLType: unsupported value type!" );
return s_sTypeDouble;
}
}
@@ -1325,7 +1325,7 @@ void ODBExport::GetViewSettings(Sequence<PropertyValue>& aProps)
}
catch(Exception)
{
- OSL_ENSURE(0,"ODBExport::GetViewSettings: Exception catched!");
+ OSL_FAIL("ODBExport::GetViewSettings: Exception catched!");
}
}
}
@@ -1352,7 +1352,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
}
catch(Exception)
{
- OSL_ENSURE(0,"Could not access layout information from the data source!");
+ OSL_FAIL("Could not access layout information from the data source!");
}
}
}
@@ -1383,7 +1383,7 @@ void ODBExport::GetConfigurationSettings(Sequence<PropertyValue>& aProps)
GetMM100UnitConverter().convertNumber(aBuffer, getINT32(_rValue));
break;
default:
- OSL_ENSURE(0,"ODBExport::implConvertAny: Invalid type");
+ OSL_FAIL("ODBExport::implConvertAny: Invalid type");
}
return aBuffer.makeStringAndClear();
diff --git a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
index 24a3c39b65a8..4b3639d1300f 100644
--- a/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
+++ b/dbaccess/source/filter/xml/xmlHierarchyCollection.cxx
@@ -109,7 +109,7 @@ OXMLHierarchyCollection::OXMLHierarchyCollection( ODBFilter& rImport
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLHierarchyCollection::OXMLHierarchyCollection -> exception catched");
+ OSL_FAIL("OXMLHierarchyCollection::OXMLHierarchyCollection -> exception catched");
}
}
}
diff --git a/dbaccess/source/filter/xml/xmlQuery.cxx b/dbaccess/source/filter/xml/xmlQuery.cxx
index 64bbc301a618..dd083f616e33 100644
--- a/dbaccess/source/filter/xml/xmlQuery.cxx
+++ b/dbaccess/source/filter/xml/xmlQuery.cxx
@@ -145,7 +145,7 @@ void OXMLQuery::setProperties(Reference< XPropertySet > & _xProp )
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLTable::EndElement -> exception catched");
+ OSL_FAIL("OXMLTable::EndElement -> exception catched");
}
}
//----------------------------------------------------------------------------
diff --git a/dbaccess/source/filter/xml/xmlTable.cxx b/dbaccess/source/filter/xml/xmlTable.cxx
index 9d95794e3ec0..21958d06a28e 100644
--- a/dbaccess/source/filter/xml/xmlTable.cxx
+++ b/dbaccess/source/filter/xml/xmlTable.cxx
@@ -186,7 +186,7 @@ void OXMLTable::setProperties(uno::Reference< XPropertySet > & _xProp )
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLTable::EndElement -> exception catched");
+ OSL_FAIL("OXMLTable::EndElement -> exception catched");
}
}
// -----------------------------------------------------------------------------
@@ -219,7 +219,7 @@ void OXMLTable::EndElement()
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLQuery::EndElement -> exception catched");
+ OSL_FAIL("OXMLQuery::EndElement -> exception catched");
}
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index f98da6c7026f..ee242ea29d33 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -336,7 +336,7 @@ OApplicationController::~OApplicationController()
{
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -1272,7 +1272,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
case ID_NEW_TABLE_DESIGN:
break;
default:
- OSL_ENSURE(0,"illegal switch call!");
+ OSL_FAIL("illegal switch call!");
}
if ( bAutoPilot )
getContainer()->PostUserEvent( LINK( this, OApplicationController, OnCreateWithPilot ), reinterpret_cast< void* >( eType ) );
@@ -1693,7 +1693,7 @@ namespace
case E_NONE:
break;
default:
- OSL_ENSURE(0,"Invalid ElementType!");
+ OSL_FAIL("Invalid ElementType!");
break;
}
return sToolbar;
@@ -1927,7 +1927,7 @@ Reference< XComponent > OApplicationController::openElementWithArguments( const
break;
default:
- OSL_ENSURE( false, "OApplicationController::openElement: illegal object type!" );
+ OSL_FAIL( "OApplicationController::openElement: illegal object type!" );
break;
}
return xRet;
@@ -2035,7 +2035,7 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType,
break;
default:
- OSL_ENSURE( false, "OApplicationController::newElement: illegal type!" );
+ OSL_FAIL( "OApplicationController::newElement: illegal type!" );
break;
}
@@ -2274,7 +2274,7 @@ void OApplicationController::showPreviewFor(const ElementType _eType,const ::rtl
return;
default:
- OSL_ENSURE( false, "OApplicationController::showPreviewFor: unexpected element type!" );
+ OSL_FAIL( "OApplicationController::showPreviewFor: unexpected element type!" );
break;
}
}
@@ -2336,7 +2336,7 @@ void OApplicationController::onDeleteEntry()
nId = SID_DB_APP_REPORT_DELETE;
break;
default:
- OSL_ENSURE(0,"Invalid ElementType!");
+ OSL_FAIL("Invalid ElementType!");
break;
}
executeChecked(nId,Sequence<PropertyValue>());
@@ -2647,7 +2647,7 @@ IMPL_LINK( OApplicationController, OnFirstControllerConnected, void*, /**/ )
if ( !m_xModel.is() )
{
- OSL_ENSURE( false, "OApplicationController::OnFirstControllerConnected: too late!" );
+ OSL_FAIL( "OApplicationController::OnFirstControllerConnected: too late!" );
}
// if we have forms or reports which contain macros/scripts, then show a warning
@@ -2970,7 +2970,7 @@ Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException)
case E_FORM: aCurrentSelection[0].Type = DatabaseObjectContainer::FORMS; break;
case E_REPORT: aCurrentSelection[0].Type = DatabaseObjectContainer::REPORTS; break;
default:
- OSL_ENSURE( false, "OApplicationController::getSelection: unexpected current element type!" );
+ OSL_FAIL( "OApplicationController::getSelection: unexpected current element type!" );
break;
}
}
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index ee76fd318f44..5d90d8a7c104 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -292,7 +292,7 @@ void OApplicationController::refreshTables()
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Could not refresh tables!");
+ OSL_FAIL("Could not refresh tables!");
}
getContainer()->getDetailView()->clearPages(sal_False);
@@ -452,7 +452,7 @@ namespace
case DatabaseObject::FORM: eType = E_FORM; break;
case DatabaseObject::REPORT: eType = E_REPORT; break;
default:
- OSL_ENSURE( false, "lcl_objectType2ElementType: unsupported object type!" );
+ OSL_FAIL( "lcl_objectType2ElementType: unsupported object type!" );
// this should have been caught earlier
}
return eType;
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 1644305e27af..de34b955bd36 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -254,7 +254,7 @@ OAppDetailPageHelper::~OAppDetailPageHelper()
}
catch(Exception)
{
- OSL_ENSURE(0,"Exception thrown while disposing preview frame!");
+ OSL_FAIL("Exception thrown while disposing preview frame!");
}
for (int i=0; i < E_ELEMENT_TYPE_COUNT; ++i)
@@ -374,7 +374,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForControl( const Control& _r
return;
}
}
- OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" );
+ OSL_FAIL( "OAppDetailPageHelper::describeCurrentSelectionForControl: invalid control!" );
}
// -----------------------------------------------------------------------------
@@ -430,7 +430,7 @@ void OAppDetailPageHelper::describeCurrentSelectionForType( const ElementType _e
}
break;
default:
- OSL_ENSURE( false, "OAppDetailPageHelper::describeCurrentSelectionForType: unexpected type!" );
+ OSL_FAIL( "OAppDetailPageHelper::describeCurrentSelectionForType: unexpected type!" );
break;
}
@@ -683,7 +683,7 @@ void OAppDetailPageHelper::createPage(ElementType _eType,const Reference< XNameA
aFolderImage = aImageProvider.getFolderImage( DatabaseObject::QUERY );
break;
default:
- OSL_ENSURE(0,"Illegal call!");
+ OSL_FAIL("Illegal call!");
}
getElementIcons( _eType, nImageId );
@@ -860,7 +860,7 @@ void OAppDetailPageHelper::elementReplaced(ElementType _eType
pEntry = lcl_findEntry(*pTreeView,_rOldName,pTreeView->First());
break;
default:
- OSL_ENSURE(0,"Invalid element type");
+ OSL_FAIL("Invalid element type");
}
OSL_ENSURE(pEntry,"Do you know that the name isn't existence!");
if ( pEntry )
@@ -945,7 +945,7 @@ void OAppDetailPageHelper::elementRemoved( ElementType _eType,const ::rtl::OUStr
}
break;
default:
- OSL_ENSURE(0,"Invalid element type");
+ OSL_FAIL("Invalid element type");
}
if ( !pTreeView->GetEntryCount() )
showPreview(NULL);
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index e328587d8760..a2259654a858 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -738,7 +738,7 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane
break;
default:
- OSL_ENSURE( false, "OApplicationDetailView::impl_fillTaskPaneData: illegal element type!" );
+ OSL_FAIL( "OApplicationDetailView::impl_fillTaskPaneData: illegal element type!" );
}
MnemonicGenerator aAllMnemonics( m_aExternalMnemonics );
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 6e07b440565e..0a60b4c9a2e9 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -283,7 +283,7 @@ SbaXDataBrowserController::FormControllerImpl::~FormControllerImpl()
//------------------------------------------------------------------
Reference< runtime::XFormOperations > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getFormOperations() throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::getFormOperations: not supported!" );
return NULL;
}
@@ -315,27 +315,27 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addChildController(
//------------------------------------------------------------------
Reference< runtime::XFormControllerContext > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getContext() throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::getContext: no support!!" );
return NULL;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setContext( const Reference< runtime::XFormControllerContext >& /*_context*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::setContext: no support!!" );
}
//------------------------------------------------------------------
Reference< XInteractionHandler > SAL_CALL SbaXDataBrowserController::FormControllerImpl::getInteractionHandler() throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::getInteractionHandler: no support!!" );
return NULL;
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setInteractionHandler( const Reference< XInteractionHandler >& /*_interactionHandler*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::setInteractionHandler: no support!!" );
}
//------------------------------------------------------------------
@@ -354,19 +354,19 @@ void SAL_CALL SbaXDataBrowserController::FormControllerImpl::setParent( const Re
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::dispose( ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::dispose: no, you do *not* want to do this!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addEventListener( const Reference< XEventListener >& /*xListener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addEventListener: no support!!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeEventListener( const Reference< XEventListener >& /*aListener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeEventListener: no support!!" );
}
//------------------------------------------------------------------
@@ -405,73 +405,73 @@ Reference< XEnumeration > SAL_CALL SbaXDataBrowserController::FormControllerImpl
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addModifyListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeModifyListener( const Reference< XModifyListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeModifyListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addConfirmDeleteListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener( const Reference< XConfirmDeleteListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeConfirmDeleteListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addSQLErrorListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener( const Reference< XSQLErrorListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeSQLErrorListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addRowSetApproveListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener( const Reference< XRowSetApproveListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeRowSetApproveListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addDatabaseParameterListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeDatabaseParameterListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::addParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::addParameterListener: no support!" );
}
//------------------------------------------------------------------
void SAL_CALL SbaXDataBrowserController::FormControllerImpl::removeParameterListener( const Reference< XDatabaseParameterListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" );
+ OSL_FAIL( "SbaXDataBrowserController::FormControllerImpl::removeParameterListener: no support!" );
}
//------------------------------------------------------------------
@@ -2063,7 +2063,7 @@ void SbaXDataBrowserController::Execute(sal_uInt16 nId, const Sequence< Property
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
break;
case SID_FM_DELETEROWS:
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index 0c1212c650fc..f9fe22be550b 100644
--- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
+++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
@@ -200,7 +200,7 @@ sal_Int32 SbaTableQueryBrowser::getDatabaseObjectType( EntryType _eType )
default:
break;
}
- OSL_ENSURE( false, "SbaTableQueryBrowser::getDatabaseObjectType: folder types and 'Unknown' not allowed here!" );
+ OSL_FAIL( "SbaTableQueryBrowser::getDatabaseObjectType: folder types and 'Unknown' not allowed here!" );
return DatabaseObject::TABLE;
}
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 9dc5609a734c..f82912466ef1 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -152,7 +152,7 @@ void UserDefinedFeatures::execute( const URL& _rFeatureURL, const Sequence< Prop
if ( xDispatch == xController )
{
- OSL_ENSURE( false, "UserDefinedFeatures::execute: the controller shouldn't be the dispatcher here!" );
+ OSL_FAIL( "UserDefinedFeatures::execute: the controller shouldn't be the dispatcher here!" );
xDispatch.clear();
}
@@ -233,7 +233,7 @@ OGenericUnoController::OGenericUnoController()
,m_bReadOnly(sal_False)
,m_bCurrentlyModified(sal_False)
{
- OSL_ENSURE( false, "OGenericUnoController::OGenericUnoController: illegal call!" );
+ OSL_FAIL( "OGenericUnoController::OGenericUnoController: illegal call!" );
// This ctor only exists because the MSVC compiler complained about an unresolved external
// symbol. It should not be used at all. Since using it yields strange runtime problems,
// we simply abort here.
@@ -612,7 +612,7 @@ void OGenericUnoController::InvalidateFeature_Impl()
::rtl::OString sMessage( "OGenericUnoController::InvalidateFeature_Impl: feature id " );
sMessage += ::rtl::OString::valueOf( aNextFeature.nId );
sMessage += ::rtl::OString( " has been invalidated, but is not supported!" );
- OSL_ENSURE( false, sMessage.getStr() );
+ OSL_FAIL( sMessage.getStr() );
}
#endif
if ( m_aSupportedFeatures.end() != aFeaturePos )
@@ -1167,7 +1167,7 @@ Reference< XFrame > SAL_CALL OGenericUnoController::getFrame(void) throw( Runtim
// -----------------------------------------------------------------------------
sal_Bool SAL_CALL OGenericUnoController::attachModel(const Reference< XModel > & /*xModel*/) throw( RuntimeException )
{
- OSL_ENSURE( false, "OGenericUnoController::attachModel: not supported!" );
+ OSL_FAIL( "OGenericUnoController::attachModel: not supported!" );
return sal_False;
}
@@ -1499,7 +1499,7 @@ sal_uInt16 OGenericUnoController::registerCommandURL( const ::rtl::OUString& _rC
++nFeatureId;
if ( nFeatureId == LAST_USER_DEFINED_FEATURE )
{
- OSL_ENSURE( false, "OGenericUnoController::registerCommandURL: no more space for user defined features!" );
+ OSL_FAIL( "OGenericUnoController::registerCommandURL: no more space for user defined features!" );
return 0L;
}
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 3e4fc21d64fe..d80a80281ae3 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -951,7 +951,7 @@ void SbaGridControl::SetRowHeight()
}
catch(Exception&)
{
- OSL_ENSURE(0,"setPropertyValue: PROPERTY_ROW_HEIGHT throws a exception");
+ OSL_FAIL("setPropertyValue: PROPERTY_ROW_HEIGHT throws a exception");
}
}
}
@@ -1109,11 +1109,11 @@ Reference< XPropertySet > SbaGridControl::getField(sal_uInt16 nModelPos)
xEmptyReturn.set(xCol->getPropertyValue(PROPERTY_BOUNDFIELD),UNO_QUERY);
}
else
- OSL_ENSURE(0,"SbaGridControl::getField getColumns returns NULL or ModelPos is > than count!");
+ OSL_FAIL("SbaGridControl::getField getColumns returns NULL or ModelPos is > than count!");
}
catch(Exception&)
{
- OSL_ENSURE(0,"SbaGridControl::getField Exception occurred!");
+ OSL_FAIL("SbaGridControl::getField Exception occurred!");
}
return xEmptyReturn;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 875900b76106..418a1bdef48b 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -251,7 +251,7 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser()
DBG_DTOR(SbaTableQueryBrowser,NULL);
if ( !rBHelper.bDisposed && !rBHelper.bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -2032,7 +2032,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
}
catch(DisposedException&)
{
- OSL_ENSURE(0,"Object already disposed!");
+ OSL_FAIL("Object already disposed!");
}
catch(Exception&)
{
@@ -3466,7 +3466,7 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa
if ( ( eLeft == etQueryContainer ) && ( eRight == etTableContainer ) )
return COMPARE_LESS;
- OSL_ENSURE( false, "SbaTableQueryBrowser::OnTreeEntryCompare: unexpected case!" );
+ OSL_FAIL( "SbaTableQueryBrowser::OnTreeEntryCompare: unexpected case!" );
return COMPARE_EQUAL;
}
@@ -3622,7 +3622,7 @@ Any SbaTableQueryBrowser::getCurrentSelection( Control& _rControl ) const
break;
default:
- OSL_ENSURE( false, "SbaTableQueryBrowser::getCurrentSelection: invalid (unexpected) object type!" );
+ OSL_FAIL( "SbaTableQueryBrowser::getCurrentSelection: invalid (unexpected) object type!" );
break;
}
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index a4f2f0a24eeb..3e66ab51e027 100644
--- a/dbaccess/source/ui/control/FieldDescControl.cxx
+++ b/dbaccess/source/ui/control/FieldDescControl.cxx
@@ -1424,7 +1424,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr )
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
}
m_pPreviousType = pFieldType;
}
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 075b8b6bab6d..fe9da7403ab3 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -600,14 +600,14 @@ namespace
//--------------------------------------------------------------------
void SAL_CALL SelectionSupplier::addSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SelectionSupplier::removeSelectionChangeListener: no support!" );
+ OSL_FAIL( "SelectionSupplier::removeSelectionChangeListener: no support!" );
// API bug: this should be a NoSupportException
}
//--------------------------------------------------------------------
void SAL_CALL SelectionSupplier::removeSelectionChangeListener( const Reference< XSelectionChangeListener >& /*_Listener*/ ) throw (RuntimeException)
{
- OSL_ENSURE( false, "SelectionSupplier::removeSelectionChangeListener: no support!" );
+ OSL_FAIL( "SelectionSupplier::removeSelectionChangeListener: no support!" );
// API bug: this should be a NoSupportException
}
}
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index da3bb881d30d..968fc0127157 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -702,7 +702,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
}
catch(Exception&)
{
- OSL_ENSURE(0,"IsReadOnly throws an exception!");
+ OSL_FAIL("IsReadOnly throws an exception!");
}
}
diff --git a/dbaccess/source/ui/dlg/admincontrols.cxx b/dbaccess/source/ui/dlg/admincontrols.cxx
index 2a27a78ed32a..a8b11805dcb3 100644
--- a/dbaccess/source/ui/dlg/admincontrols.cxx
+++ b/dbaccess/source/ui/dlg/admincontrols.cxx
@@ -108,7 +108,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( false, "TextResetOperator::operateOn: unexpected event ID!" );
+ OSL_FAIL( "TextResetOperator::operateOn: unexpected event ID!" );
// all those IDs should have been filtered out by payAttentionTo
break;
}
diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 3333f06c0380..f23f340b5e78 100644
--- a/dbaccess/source/ui/dlg/dbwiz.cxx
+++ b/dbaccess/source/ui/dlg/dbwiz.cxx
@@ -310,7 +310,7 @@ TabPage* ODbTypeWizDialog::createPage(WizardState _nState)
pPage = ODriversSettings::CreateUser(this,*m_pOutSet);
break;
default:
- OSL_ENSURE(0,"Wrong state!");
+ OSL_FAIL("Wrong state!");
break;
}
diff --git a/dbaccess/source/ui/dlg/dlgsave.cxx b/dbaccess/source/ui/dlg/dlgsave.cxx
index d9c7c6af7572..7d5738d1e7ff 100644
--- a/dbaccess/source/ui/dlg/dlgsave.cxx
+++ b/dbaccess/source/ui/dlg/dlgsave.cxx
@@ -309,7 +309,7 @@ OSaveAsDlg::OSaveAsDlg( Window * pParent,
break;
default:
- OSL_ENSURE( false, "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" );
+ OSL_FAIL( "OSaveAsDlg::OSaveAsDlg: Type not supported yet!" );
}
implInit();
diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index f9769f541153..75ed025ac6df 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -268,7 +268,7 @@ sal_Int32 DlgFilterCrit::GetOSQLPredicateType( const String& _rSelectedPredicate
nPredicateType = SQLFilterOperator::NOT_SQLNULL;
break;
default:
- OSL_ENSURE( false, "DlgFilterCrit::GetOSQLPredicateType: unknown predicate string!" );
+ OSL_FAIL( "DlgFilterCrit::GetOSQLPredicateType: unknown predicate string!" );
break;
}
@@ -753,7 +753,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox )
}
else
{
- OSL_ENSURE(0,"DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!");
+ OSL_FAIL("DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!");
}
}
pComp->SelectEntryPos(0);
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 8636a152dc9a..80a1378d6a5d 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -276,7 +276,7 @@ namespace
&& !lcl_hasDetails( aDisplayInfo )
)
{
- OSL_ENSURE( false, "lcl_buildExceptionChain: useles exception: no state, no error code, no message!" );
+ OSL_FAIL( "lcl_buildExceptionChain: useles exception: no state, no error code, no message!" );
continue;
}
@@ -482,7 +482,7 @@ namespace
case BUTTON_RETRY: nButtonID = BUTTONID_RETRY; break;
case BUTTON_HELP: nButtonID = BUTTONID_HELP; break;
default:
- OSL_ENSURE( false, "lcl_addButton: invalid button id!" );
+ OSL_FAIL( "lcl_addButton: invalid button id!" );
break;
}
_rDialog.AddButton( _eType, nButtonID, _bDefault ? BUTTONDIALOG_DEFBUTTON | BUTTONDIALOG_FOCUSBUTTON : 0 );
@@ -710,7 +710,7 @@ void OSQLMessageBox::Construct( WinBits _nStyle, MessageType _eImage )
case SQLExceptionInfo::SQL_EXCEPTION: eType = Error; break;
case SQLExceptionInfo::SQL_WARNING: eType = Warning; break;
case SQLExceptionInfo::SQL_CONTEXT: eType = Info; break;
- default: OSL_ENSURE( false, "OSQLMessageBox::Construct: invalid type!" );
+ default: OSL_FAIL( "OSQLMessageBox::Construct: invalid type!" );
}
}
impl_initImage( eType );
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 3bbee441e9cb..e0b0dd4d8a34 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -560,7 +560,7 @@ sal_Int16 ODatabaseExport::CheckString(const String& aCheckToken, sal_Int16 _nOl
}
break;
default:
- OSL_ENSURE(0,"ODatabaseExport: Unbekanntes Format");
+ OSL_FAIL("ODatabaseExport: Unbekanntes Format");
}
}
}
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index dd346d10063a..4ac330a3fc87 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -242,7 +242,7 @@ sal_Bool ORowSetImportExport::insertNewRow()
aValue <<= m_xRow->getClob(*aIter);
break;
default:
- OSL_ENSURE(0,"Unknown type");
+ OSL_FAIL("Unknown type");
}
if(m_xRow->wasNull())
m_xTargetRowUpdate->updateNull(i);
diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx
index 7f95797015af..655484d69920 100644
--- a/dbaccess/source/ui/misc/TableCopyHelper.cxx
+++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx
@@ -111,7 +111,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource,
if ( !xSrcConnection.is() || !i_rDestConnection.is() )
{
- OSL_ENSURE( false, "OTableCopyHelper::insertTable: no connection/s!" );
+ OSL_FAIL( "OTableCopyHelper::insertTable: no connection/s!" );
return;
}
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index fa0ebaa5d23c..ae08c7a38630 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -248,7 +248,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
if ( !m_xResultSet.is() )
{
- OSL_ENSURE( false, "ODatabaseImportExport::impl_initFromDescriptor: selection without result set is nonsense!" );
+ OSL_FAIL( "ODatabaseImportExport::impl_initFromDescriptor: selection without result set is nonsense!" );
m_aSelection.realloc( 0 );
}
}
@@ -257,7 +257,7 @@ void ODatabaseImportExport::impl_initFromDescriptor( const ODataAccessDescriptor
{
if ( m_bBookmarkSelection && !m_xRowLocate.is() )
{
- OSL_ENSURE( false, "ODatabaseImportExport::impl_initFromDescriptor: no XRowLocate -> no bookmars!" );
+ OSL_FAIL( "ODatabaseImportExport::impl_initFromDescriptor: no XRowLocate -> no bookmars!" );
m_aSelection.realloc( 0 );
}
}
@@ -627,7 +627,7 @@ void ORTFImportExport::appendRow(::rtl::OString* pHorzChar,sal_Int32 _nColumnCou
}
catch (Exception&)
{
- OSL_ENSURE(0,"RTF WRITE!");
+ OSL_FAIL("RTF WRITE!");
}
(*m_pStream) << OOO_STRING_SVTOOLS_RTF_CELL;
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 5dd44e9d721c..8f76cfeec73b 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -178,7 +178,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
SQLExceptionInfo aInfo;
if ( !_xDataSource.is() )
{
- OSL_ENSURE(0,"createConnection: coult not retrieve the data source!");
+ OSL_FAIL("createConnection: coult not retrieve the data source!");
return aInfo;
}
@@ -192,7 +192,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
}
catch(Exception&)
{
- OSL_ENSURE(0,"createConnection: error while retrieving data source properties!");
+ OSL_FAIL("createConnection: error while retrieving data source properties!");
}
@@ -203,7 +203,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
Reference<XCompletedConnection> xConnectionCompletion(_xDataSource, UNO_QUERY);
if (!xConnectionCompletion.is())
{
- OSL_ENSURE(0,"createConnection: missing an interface ... need an error message here!");
+ OSL_FAIL("createConnection: missing an interface ... need an error message here!");
}
else
{ // instantiate the default SDB interaction handler
@@ -230,7 +230,7 @@ SQLExceptionInfo createConnection( const Reference< ::com::sun::star::beans::XP
catch(SQLContext& e) { aInfo = SQLExceptionInfo(e); }
catch(SQLWarning& e) { aInfo = SQLExceptionInfo(e); }
catch(SQLException& e) { aInfo = SQLExceptionInfo(e); }
- catch(Exception&) { OSL_ENSURE(0,"SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
+ catch(Exception&) { OSL_FAIL("SbaTableQueryBrowser::OnExpandEntry: could not connect - unknown exception!"); }
return aInfo;
}
@@ -796,7 +796,7 @@ sal_Int32 mapTextAllign(const SvxCellHorJustify& _eAlignment)
case SVX_HOR_JUSTIFY_CENTER: nAlignment = ::com::sun::star::awt::TextAlign::CENTER; break;
case SVX_HOR_JUSTIFY_RIGHT: nAlignment = ::com::sun::star::awt::TextAlign::RIGHT; break;
default:
- OSL_ENSURE(0,"Invalid TextAlign!");
+ OSL_FAIL("Invalid TextAlign!");
}
return nAlignment;
}
@@ -810,7 +810,7 @@ SvxCellHorJustify mapTextJustify(const sal_Int32& _nAlignment)
case ::com::sun::star::awt::TextAlign::CENTER : eJustify = SVX_HOR_JUSTIFY_CENTER; break;
case ::com::sun::star::awt::TextAlign::RIGHT : eJustify = SVX_HOR_JUSTIFY_RIGHT; break;
default:
- OSL_ENSURE(0,"Invalid TextAlign!");
+ OSL_FAIL("Invalid TextAlign!");
}
return eJustify;
}
@@ -838,7 +838,7 @@ float ConvertFontWeight( ::FontWeight eWeight )
else if( eWeight == WEIGHT_BLACK )
return ::com::sun::star::awt::FontWeight::BLACK;
- OSL_ENSURE(0, "Unknown FontWeigth" );
+ OSL_FAIL("Unknown FontWeigth" );
return ::com::sun::star::awt::FontWeight::DONTKNOW;
}
// -----------------------------------------------------------------------------
@@ -865,7 +865,7 @@ float ConvertFontWidth( ::FontWidth eWidth )
else if( eWidth == WIDTH_ULTRA_EXPANDED )
return ::com::sun::star::awt::FontWidth::ULTRAEXPANDED;
- OSL_ENSURE(0, "Unknown FontWidth" );
+ OSL_FAIL("Unknown FontWidth" );
return ::com::sun::star::awt::FontWidth::DONTKNOW;
}
// -----------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 63a98f5aee6c..600fb72c68be 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -480,14 +480,14 @@ const DummyCopySource& DummyCopySource::Instance()
//------------------------------------------------------------------------
::rtl::OUString DummyCopySource::getQualifiedObjectName() const
{
- OSL_ENSURE( false, "DummyCopySource::getQualifiedObjectName: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getQualifiedObjectName: not to be called!" );
return ::rtl::OUString();
}
//------------------------------------------------------------------------
bool DummyCopySource::isView() const
{
- OSL_ENSURE( false, "DummyCopySource::isView: not to be called!" );
+ OSL_FAIL( "DummyCopySource::isView: not to be called!" );
return false;
}
@@ -509,27 +509,27 @@ Sequence< ::rtl::OUString > DummyCopySource::getColumnNames() const
//------------------------------------------------------------------------
Sequence< ::rtl::OUString > DummyCopySource::getPrimaryKeyColumnNames() const
{
- OSL_ENSURE( false, "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getPrimaryKeyColumnNames: not to be called!" );
return Sequence< ::rtl::OUString >();
}
//------------------------------------------------------------------------
OFieldDescription* DummyCopySource::createFieldDescription( const ::rtl::OUString& /*_rColumnName*/ ) const
{
- OSL_ENSURE( false, "DummyCopySource::createFieldDescription: not to be called!" );
+ OSL_FAIL( "DummyCopySource::createFieldDescription: not to be called!" );
return NULL;
}
//------------------------------------------------------------------------
::rtl::OUString DummyCopySource::getSelectStatement() const
{
- OSL_ENSURE( false, "DummyCopySource::getSelectStatement: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getSelectStatement: not to be called!" );
return ::rtl::OUString();
}
//------------------------------------------------------------------------
::utl::SharedUNOComponent< XPreparedStatement > DummyCopySource::getPreparedSelectStatement() const
{
- OSL_ENSURE( false, "DummyCopySource::getPreparedSelectStatement: not to be called!" );
+ OSL_FAIL( "DummyCopySource::getPreparedSelectStatement: not to be called!" );
return ::utl::SharedUNOComponent< XPreparedStatement >();
}
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 7d7ce2764d0c..7f8522ee9070 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -203,7 +203,7 @@ namespace dbaui
nImageResourceID = TABLE_TREE_ICON;
break;
default:
- OSL_ENSURE( false, "ImageProvider::getDefaultImage: invalid database object type!" );
+ OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break;
}
return nImageResourceID;
@@ -228,7 +228,7 @@ namespace dbaui
nImageResourceID = TABLEFOLDER_TREE_ICON;
break;
default:
- OSL_ENSURE( false, "ImageProvider::getDefaultImage: invalid database object type!" );
+ OSL_FAIL( "ImageProvider::getDefaultImage: invalid database object type!" );
break;
}
diff --git a/dbaccess/source/ui/misc/linkeddocuments.cxx b/dbaccess/source/ui/misc/linkeddocuments.cxx
index 897514b3a185..2207bbb541ad 100644
--- a/dbaccess/source/ui/misc/linkeddocuments.cxx
+++ b/dbaccess/source/ui/misc/linkeddocuments.cxx
@@ -171,7 +171,7 @@ namespace dbaui
break;
default:
- OSL_ENSURE( false, "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
+ OSL_FAIL( "OLinkedDocumentsAccess::implOpen: invalid open mode!" );
break;
}
aArguments.put( "OpenMode", sOpenMode );
diff --git a/dbaccess/source/ui/misc/propertystorage.cxx b/dbaccess/source/ui/misc/propertystorage.cxx
index fc65cb18d670..b1dbfb27558d 100644
--- a/dbaccess/source/ui/misc/propertystorage.cxx
+++ b/dbaccess/source/ui/misc/propertystorage.cxx
@@ -117,7 +117,7 @@ namespace dbaui
)
return;
- OSL_ENSURE( false, "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
+ OSL_FAIL( "SetItemPropertyStorage::getPropertyValue: unsupported item type!" );
}
//--------------------------------------------------------------------
@@ -129,7 +129,7 @@ namespace dbaui
)
return;
- OSL_ENSURE( false, "SetItemPropertyStorage::setPropertyValue: unsupported item type!" );
+ OSL_FAIL( "SetItemPropertyStorage::setPropertyValue: unsupported item type!" );
}
//........................................................................
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index ac1c49fa2696..f4552253d84f 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -464,7 +464,7 @@ TTableWindowData::value_type OJoinController::createTableWindowData(const ::rtl:
OJoinDesignView* pView = getJoinView();
if( pView )
return pView->getTableView()->createTableWindowData(_sComposedName,_sTableName,_sWindowName);
- OSL_ENSURE(0,"We should never ever reach this point!");
+ OSL_FAIL("We should never ever reach this point!");
return TTableWindowData::value_type();
}
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index a0d273e10a56..f2d906e5017a 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -1705,7 +1705,7 @@ bool OJoinTableView::allowQueries() const
// -----------------------------------------------------------------------------
void OJoinTableView::onNoColumns_throw()
{
- OSL_ENSURE( false, "OTableWindow::onNoColumns_throw: cannot really handle this!" );
+ OSL_FAIL( "OTableWindow::onNoColumns_throw: cannot really handle this!" );
throw SQLException();
}
//------------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 8e6e9657a19d..ccd9b3af9533 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -333,7 +333,7 @@ namespace
}
catch(SQLException&)
{
- OSL_FAIL(!"Failure while building Join criteria!");
+ OSL_FAIL("Failure while building Join criteria!");
}
}
@@ -703,7 +703,7 @@ namespace
}
catch(SQLException&)
{
- OSL_FAIL(!"Failure while building select list!");
+ OSL_FAIL("Failure while building select list!");
}
return aFieldListStr.makeStringAndClear();
}
@@ -878,7 +878,7 @@ namespace
}
catch(SQLException&)
{
- OSL_FAIL(!"Failure while building where clause!");
+ OSL_FAIL("Failure while building where clause!");
}
return sal_True;
}
@@ -979,7 +979,7 @@ namespace
}
catch(SQLException&)
{
- OSL_FAIL(!"Failure while building group by!");
+ OSL_FAIL("Failure while building group by!");
}
return eErrorCode;
@@ -1214,7 +1214,7 @@ namespace
}
catch(SQLException&)
{
- OSL_FAIL(!"Failure while building group by!");
+ OSL_FAIL("Failure while building group by!");
}
return aGroupByStr;
}
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 768183e8e5ec..302b57cef86d 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -198,7 +198,7 @@ namespace
Reference<XPropertySet> xColumn;
if ( !( _rxSourceForeignKeyColumns->getByName(*pIter) >>= xColumn ) )
{
- OSL_ENSURE( false, "addConnections: invalid foreign key column!" );
+ OSL_FAIL( "addConnections: invalid foreign key column!" );
continue;
}
@@ -212,7 +212,7 @@ namespace
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_FROM,aFind[0]+1);
else
- OSL_ENSURE(0,"Column not found!");
+ OSL_FAIL("Column not found!");
}
// get the position inside the tabe
Reference<XNameAccess> xRefColumns = _rDest.GetOriginalColumns();
@@ -222,7 +222,7 @@ namespace
if(aFind.getLength())
pNewConnData->SetFieldIndex(JTCS_TO,aFind[0]+1);
else
- OSL_ENSURE(0,"Column not found!");
+ OSL_FAIL("Column not found!");
}
pNewConnData->AppendConnLine(*pIter,sRelatedColumn);
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 28bd707d6e0a..f48ff8767b50 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -336,7 +336,7 @@ void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId,sal_Bool _bCreateUndo )
}
}
else
- OSL_ENSURE(0,"Invalid column id!");
+ OSL_FAIL("Invalid column id!");
}
//------------------------------------------------------------------------------
void OSelectionBrowseBox::Init()
@@ -387,7 +387,7 @@ void OSelectionBrowseBox::Init()
}
catch(const SQLException&)
{
- OSL_ENSURE(0,"Catched Exception when asking for database metadata options!");
+ OSL_FAIL("Catched Exception when asking for database metadata options!");
m_nMaxColumns = 0;
}
}
@@ -846,7 +846,7 @@ sal_Bool OSelectionBrowseBox::saveField(const String& _sFieldName,OTableFieldDes
notifyFunctionFieldChanged(sOldLocalizedFunctionName,sLocalizedFunctionName,_bListAction, nColumnId);
}
else
- OSL_ENSURE(0,"Unsupported function inserted!");
+ OSL_FAIL("Unsupported function inserted!");
}
else
diff --git a/dbaccess/source/ui/querydesign/TableWindow.cxx b/dbaccess/source/ui/querydesign/TableWindow.cxx
index b8033f9ec25c..57185506f84c 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -205,7 +205,7 @@ sal_Bool OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occurred!");
+ OSL_FAIL("Exception occurred!");
}
try
{
@@ -234,7 +234,7 @@ sal_Bool OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occurred!");
+ OSL_FAIL("Exception occurred!");
}
return sal_True;
@@ -278,7 +278,7 @@ void OTableWindow::impl_updateImage()
if ( !aImage )
{
- OSL_ENSURE( false, "OTableWindow::impl_updateImage: no images!" );
+ OSL_FAIL( "OTableWindow::impl_updateImage: no images!" );
return;
}
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 1034b55d94b2..52fa237d061d 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -361,7 +361,7 @@ OQueryController::~OQueryController()
DBG_DTOR(OQueryController,NULL);
if ( !getBroadcastHelper().bDisposed && !getBroadcastHelper().bInDispose )
{
- OSL_ENSURE(0,"Please check who doesn't dispose this component!");
+ OSL_FAIL("Please check who doesn't dispose this component!");
// increment ref count to prevent double call of Dtor
osl_incrementInterlockedCount( &m_refCount );
dispose();
@@ -863,7 +863,7 @@ void OQueryController::impl_initialize()
::rtl::OUString sIndependentSQLCommand;
if ( rArguments.get_ensureType( "IndependentSQLCommand", sIndependentSQLCommand ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: IndependentSQLCommand is regognized for compatibility only!" );
sCommand = sIndependentSQLCommand;
m_nCommandType = CommandType::COMMAND;
}
@@ -871,7 +871,7 @@ void OQueryController::impl_initialize()
::rtl::OUString sCurrentQuery;
if ( rArguments.get_ensureType( "CurrentQuery", sCurrentQuery ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
sCommand = sCurrentQuery;
m_nCommandType = CommandType::QUERY;
}
@@ -879,7 +879,7 @@ void OQueryController::impl_initialize()
sal_Bool bCreateView( sal_False );
if ( rArguments.get_ensureType( "CreateView", bCreateView ) && bCreateView )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: CurrentQuery is regognized for compatibility only!" );
m_nCommandType = CommandType::TABLE;
}
@@ -903,7 +903,7 @@ void OQueryController::impl_initialize()
m_sName = ::rtl::OUString();
break;
default:
- OSL_ENSURE( false, "OQueryController::impl_initialize: logic error in code!" );
+ OSL_FAIL( "OQueryController::impl_initialize: logic error in code!" );
throw RuntimeException();
}
@@ -911,7 +911,7 @@ void OQueryController::impl_initialize()
sal_Bool bGraphicalDesign( sal_True );
if ( rArguments.get_ensureType( (::rtl::OUString)PROPERTY_QUERYDESIGNVIEW, bGraphicalDesign ) )
{
- OSL_ENSURE( false, "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" );
+ OSL_FAIL( "OQueryController::impl_initialize: QueryDesignView is regognized for compatibility only!" );
m_bGraphicalDesign = bGraphicalDesign;
}
@@ -1350,12 +1350,12 @@ void OQueryController::executeQuery()
}
else
{
- OSL_ENSURE(0,"Couldn't create a beamer window!");
+ OSL_FAIL("Couldn't create a beamer window!");
}
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Couldn't create a beamer window!");
+ OSL_FAIL("Couldn't create a beamer window!");
}
}
}
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 3f4ca01f00e3..d334aa93b133 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -234,7 +234,7 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
}
catch(const Exception&)
{
- OSL_ENSURE(0,"ORelationTableView::AddConnection: Exception oocured!");
+ OSL_FAIL("ORelationTableView::AddConnection: Exception oocured!");
}
}
}
@@ -301,7 +301,7 @@ bool ORelationTableView::RemoveConnection( OTableConnection* pConn ,sal_Bool /*_
}
catch(Exception&)
{
- OSL_ENSURE(0,"ORelationTableView::RemoveConnection: Something other than SQLException occurred!");
+ OSL_FAIL("ORelationTableView::RemoveConnection: Something other than SQLException occurred!");
}
return false;
}
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 6c9753e6f21f..d6e0c2703fa9 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1307,7 +1307,7 @@ OFieldDescription* OTableEditorCtrl::GetFieldDescr( long nRow )
m_pRowList->size());
if( (nRow<0) || (sal::static_int_cast< unsigned long >(nRow)>=nListCount) )
{
- OSL_ENSURE(0,"(nRow<0) || (nRow>=nListCount)");
+ OSL_FAIL("(nRow<0) || (nRow>=nListCount)");
return NULL;
}
::boost::shared_ptr<OTableRow> pRow = (*m_pRowList)[ nRow ];
diff --git a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
index f33e55ff686f..0867deb7a4b7 100644
--- a/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TableDesignControl.cxx
@@ -201,7 +201,7 @@ void OTableRowView::copy()
//------------------------------------------------------------------------------
void OTableRowView::paste()
{
- OSL_ENSURE(0,"OTableRowView::Paste : (pseudo-) abstract method called !");
+ OSL_FAIL("OTableRowView::Paste : (pseudo-) abstract method called !");
}
//------------------------------------------------------------------------------
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index 57c11cdebb47..3fb4b032e3bc 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -1095,7 +1095,7 @@ bool CopyTableWizard::impl_processCopyError_nothrow( const CopyTableRowEvent& _r
case CopyTableContinuation::AskUser: break; // stop asking the listeners, ask the user
default:
- OSL_ENSURE( false, "CopyTableWizard::impl_processCopyError_nothrow: invalid listener response!" );
+ OSL_FAIL( "CopyTableWizard::impl_processCopyError_nothrow: invalid listener response!" );
// ask next listener
continue;
}
@@ -1397,7 +1397,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
if( !xTable.is() )
{
- OSL_ENSURE( false, "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
+ OSL_FAIL( "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
break;
}
@@ -1414,7 +1414,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
xTable = rWizard.createTable();
if ( !xTable.is() )
{
- OSL_ENSURE( false, "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
+ OSL_FAIL( "CopyTableWizard::impl_doCopy_nothrow: createTable should throw here, shouldn't it?" );
break;
}
}
@@ -1462,7 +1462,7 @@ void CopyTableWizard::impl_doCopy_nothrow()
break;
default:
- OSL_ENSURE( false, "CopyTableWizard::impl_doCopy_nothrow: What operation, please?" );
+ OSL_FAIL( "CopyTableWizard::impl_doCopy_nothrow: What operation, please?" );
break;
}
}
diff --git a/dbaccess/source/ui/uno/dbinteraction.cxx b/dbaccess/source/ui/uno/dbinteraction.cxx
index 42d1f3ad1234..8e029adfdbde 100644
--- a/dbaccess/source/ui/uno/dbinteraction.cxx
+++ b/dbaccess/source/ui/uno/dbinteraction.cxx
@@ -223,7 +223,7 @@ namespace dbaui
if ( nDisapprovePos != -1 )
_rContinuations[ nDisapprovePos ]->select();
else
- OSL_ENSURE( false, "BasicInteractionHandler::implHandle: no handler for NO!" );
+ OSL_FAIL( "BasicInteractionHandler::implHandle: no handler for NO!" );
break;
case RET_CANCEL:
@@ -232,13 +232,13 @@ namespace dbaui
else if ( nDisapprovePos != -1 )
_rContinuations[ nDisapprovePos ]->select();
else
- OSL_ENSURE( false, "BasicInteractionHandler::implHandle: no handler for CANCEL!" );
+ OSL_FAIL( "BasicInteractionHandler::implHandle: no handler for CANCEL!" );
break;
case RET_RETRY:
if ( nRetryPos != -1 )
_rContinuations[ nRetryPos ]->select();
else
- OSL_ENSURE( false, "BasicInteractionHandler::implHandle: where does the RETRY come from?" );
+ OSL_FAIL( "BasicInteractionHandler::implHandle: where does the RETRY come from?" );
break;
}
}