[Libreoffice-commits] .: 5 commits - dbaccess/source reportdesign/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Sun Mar 13 08:41:45 PDT 2011
dbaccess/source/core/api/CacheSet.cxx | 6
dbaccess/source/core/api/HelperCollections.cxx | 2
dbaccess/source/core/api/KeySet.cxx | 10 -
dbaccess/source/core/api/RowSet.cxx | 2
dbaccess/source/core/api/RowSetBase.cxx | 84 ++++++------
dbaccess/source/core/api/RowSetCache.cxx | 8 -
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 12 -
dbaccess/source/core/api/TableDeco.cxx | 4
dbaccess/source/core/api/columnsettings.cxx | 2
dbaccess/source/core/api/querydescriptor.cxx | 2
dbaccess/source/core/api/resultcolumn.cxx | 2
dbaccess/source/core/api/tablecontainer.cxx | 2
dbaccess/source/core/dataaccess/ComponentDefinition.cxx | 2
dbaccess/source/core/dataaccess/ModelImpl.cxx | 4
dbaccess/source/core/dataaccess/databasecontext.cxx | 4
dbaccess/source/core/dataaccess/databasedocument.cxx | 2
dbaccess/source/core/dataaccess/documentdefinition.cxx | 6
dbaccess/source/core/dataaccess/documenteventexecutor.cxx | 8 -
dbaccess/source/core/misc/ContainerMediator.cxx | 2
dbaccess/source/core/misc/services.cxx | 2
dbaccess/source/core/recovery/dbdocrecovery.cxx | 10 -
dbaccess/source/core/recovery/settingsimport.cxx | 12 -
dbaccess/source/core/recovery/subcomponentrecovery.cxx | 14 +-
dbaccess/source/ext/macromigration/macromigrationdialog.cxx | 6
dbaccess/source/ext/macromigration/migrationengine.cxx | 12 -
dbaccess/source/ext/macromigration/migrationlog.cxx | 6
dbaccess/source/ext/macromigration/progresscapture.cxx | 2
dbaccess/source/filter/migration/cfgimport.cxx | 6
dbaccess/source/filter/xml/xmlConnectionData.cxx | 2
dbaccess/source/filter/xml/xmlExport.cxx | 8 -
dbaccess/source/filter/xml/xmlHierarchyCollection.cxx | 2
dbaccess/source/filter/xml/xmlQuery.cxx | 2
dbaccess/source/filter/xml/xmlTable.cxx | 4
dbaccess/source/ui/app/AppController.cxx | 18 +-
dbaccess/source/ui/app/AppControllerGen.cxx | 4
dbaccess/source/ui/app/AppDetailPageHelper.cxx | 12 -
dbaccess/source/ui/app/AppDetailView.cxx | 2
dbaccess/source/ui/browser/brwctrlr.cxx | 42 +++---
dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 2
dbaccess/source/ui/browser/genericcontroller.cxx | 10 -
dbaccess/source/ui/browser/sbagrid.cxx | 6
dbaccess/source/ui/browser/unodatbr.cxx | 8 -
dbaccess/source/ui/control/FieldDescControl.cxx | 2
dbaccess/source/ui/control/dbtreelistbox.cxx | 4
dbaccess/source/ui/dlg/DbAdminImpl.cxx | 2
dbaccess/source/ui/dlg/admincontrols.cxx | 2
dbaccess/source/ui/dlg/dbwiz.cxx | 2
dbaccess/source/ui/dlg/dlgsave.cxx | 2
dbaccess/source/ui/dlg/queryfilter.cxx | 4
dbaccess/source/ui/dlg/sqlmessage.cxx | 6
dbaccess/source/ui/misc/DExport.cxx | 2
dbaccess/source/ui/misc/RowSetDrop.cxx | 2
dbaccess/source/ui/misc/TableCopyHelper.cxx | 2
dbaccess/source/ui/misc/TokenWriter.cxx | 6
dbaccess/source/ui/misc/UITools.cxx | 16 +-
dbaccess/source/ui/misc/WCopyTable.cxx | 12 -
dbaccess/source/ui/misc/imageprovider.cxx | 4
dbaccess/source/ui/misc/linkeddocuments.cxx | 2
dbaccess/source/ui/misc/propertystorage.cxx | 4
dbaccess/source/ui/querydesign/JoinController.cxx | 2
dbaccess/source/ui/querydesign/JoinTableView.cxx | 2
dbaccess/source/ui/querydesign/QueryDesignView.cxx | 10 -
dbaccess/source/ui/querydesign/QueryTableView.cxx | 6
dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 6
dbaccess/source/ui/querydesign/TableWindow.cxx | 6
dbaccess/source/ui/querydesign/querycontroller.cxx | 16 +-
dbaccess/source/ui/relationdesign/RelationTableView.cxx | 4
dbaccess/source/ui/tabledesign/TEditControl.cxx | 2
dbaccess/source/ui/tabledesign/TableDesignControl.cxx | 2
dbaccess/source/ui/uno/copytablewizard.cxx | 8 -
dbaccess/source/ui/uno/dbinteraction.cxx | 6
reportdesign/source/core/api/FixedLine.cxx | 2
reportdesign/source/core/api/ReportDefinition.cxx | 6
reportdesign/source/core/misc/conditionalexpression.cxx | 2
reportdesign/source/core/misc/reportformula.cxx | 2
reportdesign/source/core/sdr/PropertyForward.cxx | 2
reportdesign/source/core/sdr/RptModel.cxx | 2
reportdesign/source/core/sdr/RptObject.cxx | 14 +-
reportdesign/source/core/sdr/UndoActions.cxx | 4
reportdesign/source/core/sdr/formatnormalizer.cxx | 2
reportdesign/source/filter/xml/xmlCell.cxx | 2
reportdesign/source/filter/xml/xmlComponent.cxx | 2
reportdesign/source/filter/xml/xmlCondPrtExpr.cxx | 2
reportdesign/source/filter/xml/xmlControlProperty.cxx | 2
reportdesign/source/filter/xml/xmlExport.cxx | 4
reportdesign/source/filter/xml/xmlFixedContent.cxx | 2
reportdesign/source/filter/xml/xmlFormatCondition.cxx | 2
reportdesign/source/filter/xml/xmlFormattedField.cxx | 2
reportdesign/source/filter/xml/xmlFunction.cxx | 4
reportdesign/source/filter/xml/xmlGroup.cxx | 4
reportdesign/source/filter/xml/xmlHelper.cxx | 2
reportdesign/source/filter/xml/xmlImage.cxx | 2
reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 2
reportdesign/source/filter/xml/xmlReport.cxx | 2
reportdesign/source/filter/xml/xmlReportElement.cxx | 2
reportdesign/source/filter/xml/xmlReportElementBase.cxx | 2
reportdesign/source/filter/xml/xmlSection.cxx | 4
reportdesign/source/filter/xml/xmlStyleImport.cxx | 4
reportdesign/source/filter/xml/xmlSubDocument.cxx | 2
reportdesign/source/filter/xml/xmlTable.cxx | 6
reportdesign/source/ui/dlg/CondFormat.cxx | 2
reportdesign/source/ui/dlg/GroupsSorting.cxx | 10 -
reportdesign/source/ui/dlg/dlgpage.cxx | 2
reportdesign/source/ui/inspection/GeometryHandler.cxx | 10 -
reportdesign/source/ui/misc/Undo.cxx | 10 -
reportdesign/source/ui/report/ReportController.cxx | 6
reportdesign/source/ui/report/ReportSection.cxx | 8 -
reportdesign/source/ui/report/dlgedfac.cxx | 2
reportdesign/source/ui/report/propbrw.cxx | 2
109 files changed, 321 insertions(+), 321 deletions(-)
New commits:
commit 7cb820eec5206afbdec039055131b140ec00358b
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 12:04:35 2011 +0100
Move OSL_ENSURE(0,...) to OSL_FAIL(...)
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 6521f94..cf931fc 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -137,11 +137,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);
@@ -676,7 +676,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 9bfc643..acc2d3e 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 3a61897..42b20fe 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -133,7 +133,7 @@ OKeySet::~OKeySet()
}
catch(...)
{
- OSL_ENSURE(0,"Unknown Exception occurred");
+ OSL_FAIL("Unknown Exception occurred");
}
m_xComposer = NULL;
@@ -764,7 +764,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");
}
}
@@ -823,7 +823,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() ");
}
}
}
@@ -975,7 +975,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 e36a995..0facdec 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 51a0061..1e47ba8 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 at 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 );
}
@@ -478,9 +478,9 @@ sal_Bool SAL_CALL ORowSetBase::moveToBookmark( const Any& bookmark ) throw(SQLEx
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);
}
@@ -1285,7 +1285,7 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
}
catch(Exception&)
{
- OSL_ENSURE(0,"firePropertyChange: Exception");
+ OSL_FAIL("firePropertyChange: Exception");
}
OSL_TRACE("DBACCESS ORowSetBase::firePropertyChange() Clone = %i ID = %i\n",m_bClone,osl_getThreadIdentifier(NULL));
}
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index a7b6460..73e9c59 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -847,7 +847,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;
}
}
@@ -1228,7 +1228,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;
@@ -1317,7 +1317,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);
}
@@ -1325,7 +1325,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 4653903..542e8a4 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -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 26b1687..13887a7 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/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index e9b9864..8aac98a 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/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index a3f4032..16ecc70 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -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/filter/migration/cfgimport.cxx b/dbaccess/source/filter/migration/cfgimport.cxx
index ed84756..cd2f5ef 100644
--- a/dbaccess/source/filter/migration/cfgimport.cxx
+++ b/dbaccess/source/filter/migration/cfgimport.cxx
@@ -489,7 +489,7 @@ sal_Bool isDocumentReport(const Reference< XMultiServiceFactory >& _xORB,const :
}
catch(Exception)
{
- OSL_ENSURE(0,"isDocumentReport: catched exception!");
+ OSL_FAIL("isDocumentReport: catched exception!");
}
return bReport;
}
@@ -549,7 +549,7 @@ void OCfgImport::createDataSource(const ::rtl::OUString& _sName)
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception: convert");
+ OSL_FAIL("Exception: convert");
UCBContentHelper::Kill(sFileName);
}
}
@@ -848,7 +848,7 @@ void SAL_CALL OCfgImport::endNode()
}
catch(Exception&)
{
- OSL_ENSURE(0,"convertLinks: Exception catched!");
+ OSL_FAIL("convertLinks: Exception catched!");
}
m_sBookmarkName = ::rtl::OUString();
m_sDocumentLocation = ::rtl::OUString();
diff --git a/dbaccess/source/filter/xml/xmlConnectionData.cxx b/dbaccess/source/filter/xml/xmlConnectionData.cxx
index 96b1db0..1da225c 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 57dec63..6a146d1 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -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 7d4adee..974e06f 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 903dd78..5ad5894 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 1ae9e6d..2ed0a35 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 1924a3e..dfec19f 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();
@@ -1276,7 +1276,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 ) );
@@ -1697,7 +1697,7 @@ namespace
case E_NONE:
break;
default:
- OSL_ENSURE(0,"Invalid ElementType!");
+ OSL_FAIL("Invalid ElementType!");
break;
}
return sToolbar;
@@ -2340,7 +2340,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>());
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index a251a0f..cef9000 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);
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 068464c..138e2d4 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)
@@ -682,7 +682,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 );
@@ -859,7 +859,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 )
@@ -944,7 +944,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/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index b110213..e008aa0 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -2023,7 +2023,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/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 408c56a..80b933e 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 f744f65..cd89353 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -250,7 +250,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();
@@ -1895,7 +1895,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&)
{
diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx
index 69143f3..f894209 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/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index c8e1360..43be62c 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/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx
index 1b836cb..4f45fb7 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/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx
index bbd70a1..e6ed20e 100644
--- a/dbaccess/source/ui/dlg/queryfilter.cxx
+++ b/dbaccess/source/ui/dlg/queryfilter.cxx
@@ -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/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index f8b3cb5..d0f1cdd 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 f1d7288..0171b3f 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/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index e1496d4..9a22283 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -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 d587513..b2ac4ce 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::XPr
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::XPr
}
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::XPr
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::XPr
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/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index eb938fa..648dd70 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/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 6d5eaa5..9994c4d 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -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 eef516e..9aad2c9 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -336,7 +336,7 @@ void OSelectionBrowseBox::ColumnMoved( USHORT nColId,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 c142b12..e96f485 100644
--- a/dbaccess/source/ui/querydesign/TableWindow.cxx
+++ b/dbaccess/source/ui/querydesign/TableWindow.cxx
@@ -205,7 +205,7 @@ BOOL OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occurred!");
+ OSL_FAIL("Exception occurred!");
}
try
{
@@ -234,7 +234,7 @@ BOOL OTableWindow::FillListBox()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception occurred!");
+ OSL_FAIL("Exception occurred!");
}
return TRUE;
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 9283a2e..fa0e724 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();
@@ -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 0bb53fd..ca0d1d5 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 b01b3ec..e858527 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -1305,7 +1305,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 e35fc32..41a7eef 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/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 522e3c3..3a94794 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -188,7 +188,7 @@ OFixedLine::OFixedLine(uno::Reference< uno::XComponentContext > const & _xContex
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OFixedLine::OFixedLine: Exception caught!");
+ OSL_FAIL("OFixedLine::OFixedLine: Exception caught!");
}
osl_decrementInterlockedCount( &m_refCount );
}
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index e4eee67..069d781 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -769,7 +769,7 @@ void OReportDefinition::init()
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Error!");
+ OSL_FAIL("Error!");
}
}
// -----------------------------------------------------------------------------
@@ -1183,7 +1183,7 @@ void SAL_CALL OReportDefinition::setParent( const uno::Reference< uno::XInterfac
// XCloneable
uno::Reference< util::XCloneable > SAL_CALL OReportDefinition::createClone( ) throw (uno::RuntimeException)
{
- OSL_ENSURE(0,"Not yet implemented correctly");
+ OSL_FAIL("Not yet implemented correctly");
uno::Reference< report::XReportComponent> xSource = this;
uno::Reference< report::XReportDefinition> xSet(cloneObject(xSource,m_aProps->m_xFactory,SERVICE_REPORTDEFINITION),uno::UNO_QUERY_THROW);
return xSet.get();
@@ -1600,7 +1600,7 @@ void SAL_CALL OReportDefinition::storeToStorage( const uno::Reference< embed::XS
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Exception Caught: Could not commit report storage!");
+ OSL_FAIL("Exception Caught: Could not commit report storage!");
throw io::IOException();
}
diff --git a/reportdesign/source/core/sdr/PropertyForward.cxx b/reportdesign/source/core/sdr/PropertyForward.cxx
index e1f1fcf..8556420 100644
--- a/reportdesign/source/core/sdr/PropertyForward.cxx
+++ b/reportdesign/source/core/sdr/PropertyForward.cxx
@@ -164,7 +164,7 @@ void SAL_CALL OPropertyMediator::propertyChange( const PropertyChangeEvent& evt
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
m_bInChange = sal_False;
}
diff --git a/reportdesign/source/core/sdr/RptModel.cxx b/reportdesign/source/core/sdr/RptModel.cxx
index 3be333a..9df7732 100644
--- a/reportdesign/source/core/sdr/RptModel.cxx
+++ b/reportdesign/source/core/sdr/RptModel.cxx
@@ -93,7 +93,7 @@ void OReportModel::detachController()
SdrPage* OReportModel::AllocPage(bool /*bMasterPage*/)
{
DBG_CHKTHIS( rpt_OReportModel, 0);
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return NULL;
}
diff --git a/reportdesign/source/core/sdr/RptObject.cxx b/reportdesign/source/core/sdr/RptObject.cxx
index 363a52c..9f2a8e6 100644
--- a/reportdesign/source/core/sdr/RptObject.cxx
+++ b/reportdesign/source/core/sdr/RptObject.cxx
@@ -172,7 +172,7 @@ SdrObject* OObjectBase::createObject(const uno::Reference< report::XReportCompon
pNewObj = OOle2Obj::Create( _xComponent,nType );
break;
default:
- OSL_ENSURE(0,"Unknown object id");
+ OSL_FAIL("Unknown object id");
break;
}
@@ -205,7 +205,7 @@ namespace
nTextAlign = style::ParagraphAdjust_RIGHT;
break;
default:
- OSL_ENSURE(0,"Illegal text alignment value!");
+ OSL_FAIL("Illegal text alignment value!");
break;
}
aRet <<= (style::ParagraphAdjust)nTextAlign;
@@ -228,7 +228,7 @@ namespace
nTextAlign = awt::TextAlign::RIGHT;
break;
default:
- OSL_ENSURE(0,"Illegal text alignment value!");
+ OSL_FAIL("Illegal text alignment value!");
break;
}
aRet <<= nTextAlign;
@@ -396,7 +396,7 @@ void OObjectBase::EndListening(sal_Bool /*bRemoveListener*/)
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"OObjectBase::EndListening: Exception caught!");
+ OSL_FAIL("OObjectBase::EndListening: Exception caught!");
}
}
m_xPropertyChangeListener.clear();
@@ -532,7 +532,7 @@ sal_Int32 OCustomShape::GetStep() const
{
// get step property
sal_Int32 nStep = 0;
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return nStep;
}
//----------------------------------------------------------------------------
@@ -718,7 +718,7 @@ sal_Int32 OUnoObject::GetStep() const
DBG_CHKTHIS( rpt_OUnoObject,NULL);
// get step property
sal_Int32 nStep = 0;
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return nStep;
}
@@ -1013,7 +1013,7 @@ sal_Int32 OOle2Obj::GetStep() const
DBG_CHKTHIS( rpt_OOle2Obj,NULL);
// get step property
sal_Int32 nStep = 0;
- OSL_ENSURE(0,"Who called me!");
+ OSL_FAIL("Who called me!");
return nStep;
}
diff --git a/reportdesign/source/core/sdr/UndoActions.cxx b/reportdesign/source/core/sdr/UndoActions.cxx
index 5e043b4..073e0ec 100644
--- a/reportdesign/source/core/sdr/UndoActions.cxx
+++ b/reportdesign/source/core/sdr/UndoActions.cxx
@@ -224,7 +224,7 @@ void OUndoContainerAction::Undo()
implReInsert();
break;
default:
- OSL_ENSURE(0,"Illegal case value");
+ OSL_FAIL("Illegal case value");
break;
}
}
@@ -252,7 +252,7 @@ void OUndoContainerAction::Redo()
implReRemove();
break;
default:
- OSL_ENSURE(0,"Illegal case value");
+ OSL_FAIL("Illegal case value");
break;
}
}
diff --git a/reportdesign/source/filter/xml/xmlCell.cxx b/reportdesign/source/filter/xml/xmlCell.cxx
index 9548d62..9d36945 100644
--- a/reportdesign/source/filter/xml/xmlCell.cxx
+++ b/reportdesign/source/filter/xml/xmlCell.cxx
@@ -245,7 +245,7 @@ void OXMLCell::EndElement()
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OXMLCell::EndElement -> exception catched");
+ OSL_FAIL("OXMLCell::EndElement -> exception catched");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlComponent.cxx b/reportdesign/source/filter/xml/xmlComponent.cxx
index cbe97b2..6b94d90 100644
--- a/reportdesign/source/filter/xml/xmlComponent.cxx
+++ b/reportdesign/source/filter/xml/xmlComponent.cxx
@@ -98,7 +98,7 @@ OXMLComponent::OXMLComponent( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting props into report component!");
+ OSL_FAIL("Exception catched while putting props into report component!");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
index 30d2714..26fab9f 100644
--- a/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
+++ b/reportdesign/source/filter/xml/xmlCondPrtExpr.cxx
@@ -81,7 +81,7 @@ OXMLCondPrtExpr::OXMLCondPrtExpr( ORptFilter& _rImport,
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting Function props!");
+ OSL_FAIL("Exception catched while putting Function props!");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlControlProperty.cxx b/reportdesign/source/filter/xml/xmlControlProperty.cxx
index bc3726d..c57ab46 100644
--- a/reportdesign/source/filter/xml/xmlControlProperty.cxx
+++ b/reportdesign/source/filter/xml/xmlControlProperty.cxx
@@ -165,7 +165,7 @@ void OXMLControlProperty::EndElement()
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Unknown property found!");
+ OSL_FAIL("Unknown property found!");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index f9186b9..914f39a 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -473,7 +473,7 @@ void ORptExport::exportFormatConditions(const Reference<XReportControlModel>& _x
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
}
// -----------------------------------------------------------------------------
@@ -720,7 +720,7 @@ void ORptExport::exportReportComponentAutoStyles(const Reference<XSection>& _xPr
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlFixedContent.cxx b/reportdesign/source/filter/xml/xmlFixedContent.cxx
index e4b22fd..6d101bd 100644
--- a/reportdesign/source/filter/xml/xmlFixedContent.cxx
+++ b/reportdesign/source/filter/xml/xmlFixedContent.cxx
@@ -106,7 +106,7 @@ void OXMLCharContent::InsertControlCharacter(sal_Int16 _nControl)
m_pFixedContent->Characters(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("\n")));
break;
default:
- OSL_ENSURE(0,"Not supported control character");
+ OSL_FAIL("Not supported control character");
break;
}
}
diff --git a/reportdesign/source/filter/xml/xmlFormatCondition.cxx b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
index 1180547..eaaae27 100644
--- a/reportdesign/source/filter/xml/xmlFormatCondition.cxx
+++ b/reportdesign/source/filter/xml/xmlFormatCondition.cxx
@@ -95,7 +95,7 @@ OXMLFormatCondition::OXMLFormatCondition( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlFormattedField.cxx b/reportdesign/source/filter/xml/xmlFormattedField.cxx
index aec8621..9b6cf0c 100644
--- a/reportdesign/source/filter/xml/xmlFormattedField.cxx
+++ b/reportdesign/source/filter/xml/xmlFormattedField.cxx
@@ -92,7 +92,7 @@ OXMLFormattedField::OXMLFormattedField( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlFunction.cxx b/reportdesign/source/filter/xml/xmlFunction.cxx
index 00eb175..8572caa 100644
--- a/reportdesign/source/filter/xml/xmlFunction.cxx
+++ b/reportdesign/source/filter/xml/xmlFunction.cxx
@@ -101,7 +101,7 @@ OXMLFunction::OXMLFunction( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting Function props!");
+ OSL_FAIL("Exception catched while putting Function props!");
}
}
}
@@ -132,7 +132,7 @@ void OXMLFunction::EndElement()
m_xFunction.clear();
}catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlGroup.cxx b/reportdesign/source/filter/xml/xmlGroup.cxx
index f56239d..a096290 100644
--- a/reportdesign/source/filter/xml/xmlGroup.cxx
+++ b/reportdesign/source/filter/xml/xmlGroup.cxx
@@ -193,7 +193,7 @@ OXMLGroup::OXMLGroup( ORptFilter& _rImport
}
catch(const Exception&)
{
- OSL_ENSURE(0,"Exception catched while putting group props!");
+ OSL_FAIL("Exception catched while putting group props!");
}
}
}
@@ -271,7 +271,7 @@ void OXMLGroup::EndElement()
m_xGroups->insertByIndex(0,uno::makeAny(m_xGroup));
}catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 47e5b2c..4585c95 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -330,7 +330,7 @@ void OXMLHelper::copyStyleElements(const bool _bOld,const ::rtl::OUString& _sSty
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OXMLHelper::copyStyleElements -> exception catched");
+ OSL_FAIL("OXMLHelper::copyStyleElements -> exception catched");
}
}
}
diff --git a/reportdesign/source/filter/xml/xmlImage.cxx b/reportdesign/source/filter/xml/xmlImage.cxx
index a665e74..79a47cc 100644
--- a/reportdesign/source/filter/xml/xmlImage.cxx
+++ b/reportdesign/source/filter/xml/xmlImage.cxx
@@ -114,7 +114,7 @@ OXMLImage::OXMLImage( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the image props");
+ OSL_FAIL("Exception catched while filling the image props");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index af642e5..a4d6c3d 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -233,7 +233,7 @@ void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
bExport = false;
}
diff --git a/reportdesign/source/filter/xml/xmlReport.cxx b/reportdesign/source/filter/xml/xmlReport.cxx
index a27712d..99b056b 100644
--- a/reportdesign/source/filter/xml/xmlReport.cxx
+++ b/reportdesign/source/filter/xml/xmlReport.cxx
@@ -111,7 +111,7 @@ OXMLReport::OXMLReport( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlReportElement.cxx b/reportdesign/source/filter/xml/xmlReportElement.cxx
index a3a8b3c..cacc79c 100644
--- a/reportdesign/source/filter/xml/xmlReportElement.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElement.cxx
@@ -85,7 +85,7 @@ OXMLReportElement::OXMLReportElement( ORptFilter& rImport,
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the report definition props");
+ OSL_FAIL("Exception catched while filling the report definition props");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlReportElementBase.cxx b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
index 031eca2..e65df6e 100644
--- a/reportdesign/source/filter/xml/xmlReportElementBase.cxx
+++ b/reportdesign/source/filter/xml/xmlReportElementBase.cxx
@@ -108,7 +108,7 @@ void OXMLReportElementBase::EndElement()
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception caught while inserting a new control!");
+ OSL_FAIL("Exception caught while inserting a new control!");
}
}
//----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlSection.cxx b/reportdesign/source/filter/xml/xmlSection.cxx
index 3dc4567..3e80a4c 100644
--- a/reportdesign/source/filter/xml/xmlSection.cxx
+++ b/reportdesign/source/filter/xml/xmlSection.cxx
@@ -102,13 +102,13 @@ OXMLSection::OXMLSection( ORptFilter& rImport,
break;
default:
- OSL_ENSURE(0,"OXMLSection: Unknown attribute!");
+ OSL_FAIL("OXMLSection: Unknown attribute!");
}
}
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the section props");
+ OSL_FAIL("Exception catched while filling the section props");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 9317ed5..b9c3bd3 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -311,7 +311,7 @@ SvXMLStyleContext *OReportStylesContext::CreateStyleStyleChildContext(
xAttrList, *this, nFamily );
break;
default:
- OSL_ENSURE(0,"OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
+ OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
break;
}
}
@@ -368,7 +368,7 @@ Reference < XNameContainer >
xStyles = ((SvXMLImport *)&GetImport())->GetTextImport()->GetFrameStyles();
break;
default:
- OSL_ENSURE(0,"OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
+ OSL_FAIL("OReportStylesContext::CreateStyleStyleChildContext: Unknown style family. PLease check.");
break;
}
if( !xStyles.is() && sName.getLength() && GetOwnImport().GetModel().is() )
diff --git a/reportdesign/source/filter/xml/xmlSubDocument.cxx b/reportdesign/source/filter/xml/xmlSubDocument.cxx
index d19f9b4..1ed68c7 100644
--- a/reportdesign/source/filter/xml/xmlSubDocument.cxx
+++ b/reportdesign/source/filter/xml/xmlSubDocument.cxx
@@ -144,7 +144,7 @@ void OXMLSubDocument::EndElement()
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
}
diff --git a/reportdesign/source/filter/xml/xmlTable.cxx b/reportdesign/source/filter/xml/xmlTable.cxx
index f52db55..d04091e 100644
--- a/reportdesign/source/filter/xml/xmlTable.cxx
+++ b/reportdesign/source/filter/xml/xmlTable.cxx
@@ -122,7 +122,7 @@ OXMLTable::OXMLTable( ORptFilter& rImport
}
catch(Exception&)
{
- OSL_ENSURE(0,"Exception catched while filling the section props");
+ OSL_FAIL("Exception catched while filling the section props");
}
}
// -----------------------------------------------------------------------------
@@ -269,7 +269,7 @@ void OXMLTable::EndElement()
}
catch(beans::PropertyVetoException)
{
- OSL_ENSURE(0,"Could not set the correct position or size!");
+ OSL_FAIL("Could not set the correct position or size!");
}
}
}
@@ -282,7 +282,7 @@ void OXMLTable::EndElement()
}
catch(Exception&)
{
- OSL_ENSURE(0,"OXMLTable::EndElement -> exception catched");
+ OSL_FAIL("OXMLTable::EndElement -> exception catched");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx
index a505e11..987abb4 100644
--- a/reportdesign/source/ui/dlg/CondFormat.cxx
+++ b/reportdesign/source/ui/dlg/CondFormat.cxx
@@ -394,7 +394,7 @@ namespace rptui
}
catch(Exception&)
{
- OSL_ENSURE(0,"Can not access format condition!");
+ OSL_FAIL("Can not access format condition!");
}
impl_conditionCountChanged();
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 664535e..4e37333 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -243,7 +243,7 @@ uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups()
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can not access group!");
+ OSL_FAIL("Can not access group!");
}
}
if ( !vClipboardList.empty() )
@@ -514,7 +514,7 @@ BOOL OFieldExpressionControl::SaveModified(bool _bAppendRow)
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"OFieldExpressionControl::SaveModified: Exception caught!");
+ OSL_FAIL("OFieldExpressionControl::SaveModified: Exception caught!");
}
}
@@ -545,7 +545,7 @@ String OFieldExpressionControl::GetCellText( long nRow, USHORT /*nColId*/ ) cons
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught while getting expression value from the group");
+ OSL_FAIL("Exception caught while getting expression value from the group");
}
}
return sText;
@@ -626,7 +626,7 @@ EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(long nRow) const
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception cathced while try to get a group!");
+ OSL_FAIL("Exception cathced while try to get a group!");
}
}
return EditBrowseBox::CLEAN;
@@ -1163,7 +1163,7 @@ sal_Int32 OGroupsSortingDialog::getColumnDataType(const ::rtl::OUString& _sColum
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Eception caught while getting the type of a column");
+ OSL_FAIL("Eception caught while getting the type of a column");
}
return nDataType;
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 0217b4f..e11a415 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -76,7 +76,7 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
AddTabPage( RID_SVXPAGE_LINE,pFact->GetTabPageCreatorFunc( RID_SVXPAGE_LINE ), 0 );
break;
default:
- OSL_ENSURE(0,"Unknown page id");
+ OSL_FAIL("Unknown page id");
}
SvtCJKOptions aCJKOptions;
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index e4b1c53..313aa24 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -1706,7 +1706,7 @@ void GeometryHandler::impl_fillMimeTypes_nothrow(::std::vector< ::rtl::OUString
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -1738,7 +1738,7 @@ void GeometryHandler::impl_fillScopeList_nothrow(::std::vector< ::rtl::OUString
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
@@ -1856,7 +1856,7 @@ sal_Bool GeometryHandler::isDefaultFunction( const ::rtl::OUString& _sQuotedFunc
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return bDefaultFunction;
}
@@ -1896,7 +1896,7 @@ sal_Bool GeometryHandler::impl_isDefaultFunction_nothrow( const uno::Reference<
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
return bDefaultFunction;
}
@@ -1987,7 +1987,7 @@ void GeometryHandler::createDefaultFunction(::osl::ResettableMutexGuard& _aGuard
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/misc/Undo.cxx b/reportdesign/source/ui/misc/Undo.cxx
index e76b3a9..bc0fe6e 100644
--- a/reportdesign/source/ui/misc/Undo.cxx
+++ b/reportdesign/source/ui/misc/Undo.cxx
@@ -91,7 +91,7 @@ namespace
}
catch(const uno::Exception&)
{
- OSL_ENSURE(0,"lcl_insertElements:Exception caught!");
+ OSL_FAIL("lcl_insertElements:Exception caught!");
}
}
}
@@ -111,7 +111,7 @@ namespace
}
catch(const uno::Exception&)
{
- OSL_ENSURE(0,"lcl_setValues:Exception caught!");
+ OSL_FAIL("lcl_setValues:Exception caught!");
}
}
}
@@ -156,7 +156,7 @@ OSectionUndo::~OSectionUndo()
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Exception caught!");
+ OSL_FAIL("Exception caught!");
}
}
}
@@ -359,7 +359,7 @@ void OGroupUndo::implReInsert( )
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched while undoing remove group");
+ OSL_FAIL("Exception catched while undoing remove group");
}
}
//----------------------------------------------------------------------------
@@ -371,7 +371,7 @@ void OGroupUndo::implReRemove( )
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched while redoing remove group");
+ OSL_FAIL("Exception catched while redoing remove group");
}
}
//----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 6ebc2de..f81baf2 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -221,7 +221,7 @@ namespace
aFontDescriptor.Underline = awt::FontUnderline::SINGLE - aFontDescriptor.Underline;
break;
default:
- OSL_ENSURE(0,"Illegal value in default!");
+ OSL_FAIL("Illegal value in default!");
break;
}
@@ -358,7 +358,7 @@ void OReportController::disposing()
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught while disposing row sets.");
+ OSL_FAIL("Exception caught while disposing row sets.");
}
m_xRowSet.clear();
m_xRowSetMediator.clear();
@@ -2209,7 +2209,7 @@ void SAL_CALL OReportController::elementReplaced( const ContainerEvent& /*_rEven
{
SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard( getMutex() );
- OSL_ENSURE(0,"Not yet implemented!");
+ OSL_FAIL("Not yet implemented!");
}
// -----------------------------------------------------------------------------
void SAL_CALL OReportController::propertyChange( const beans::PropertyChangeEvent& evt ) throw (RuntimeException)
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index fbd7226..87474e5 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -111,7 +111,7 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception catched!");
+ OSL_FAIL("Exception catched!");
}
m_pFunc.reset(new DlgEdFuncSelect( this ));
@@ -315,7 +315,7 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Exception caught while pasting a new object!");
+ OSL_FAIL("Exception caught while pasting a new object!");
}
if ( !_bForce )
break;
@@ -391,7 +391,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
}
catch(uno::Exception&)
{
- OSL_ENSURE(0,"Can't copy report elements!");
+ OSL_FAIL("Can't copy report elements!");
}
}
}
@@ -604,7 +604,7 @@ void OReportSection::_propertyChanged(const beans::PropertyChangeEvent& _rEvent)
}
catch(uno::Exception)
{
- OSL_ENSURE(0,"Exception caught: OReportSection::_propertyChanged(");
+ OSL_FAIL("Exception caught: OReportSection::_propertyChanged(");
}
Resize();
diff --git a/reportdesign/source/ui/report/dlgedfac.cxx b/reportdesign/source/ui/report/dlgedfac.cxx
index 2591913..e4330cc 100644
--- a/reportdesign/source/ui/report/dlgedfac.cxx
+++ b/reportdesign/source/ui/report/dlgedfac.cxx
@@ -101,7 +101,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
pObjFactory->pNewObj = new OOle2Obj(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument")),OBJ_OLE2);
break;
default:
- OSL_ENSURE(0,"Unknown object id");
+ OSL_FAIL("Unknown object id");
break;
}
}
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index b0e2e88..fbf4b9a 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -408,7 +408,7 @@ void PropBrw::implSetNewObject( const uno::Sequence< Reference<uno::XInterface>
}
else
{
- OSL_ENSURE(0,"Unknown service name!");
+ OSL_FAIL("Unknown service name!");
nResId = RID_STR_CLASS_FORMATTEDFIELD;
}
commit 04e4235ce2ba0b51c434ca7c374cde3c0d55a455
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Sat Mar 12 11:27:59 2011 +0100
Move OSL_ENSURE(false,...) to OSL_FAIL(...)
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 966ec22..3a61897 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -176,7 +176,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
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index cba433d..4653903 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);
diff --git a/dbaccess/source/core/api/columnsettings.cxx b/dbaccess/source/core/api/columnsettings.cxx
index ca978e3..985a252 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 0fa8088..1f5e69a 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 9a185be..208942e 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/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index b8b0ee8..255330b 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 630f37a..c9987df 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 23ff3bf..6889551 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 06b2d8b..c72d7f7 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 6ab3772..a3f4032 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;
}
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index e3301f1..ab44de2 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 82b5f85..bfc634d 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/misc/services.cxx b/dbaccess/source/core/misc/services.cxx
index d226843..5edd032 100644
--- a/dbaccess/source/core/misc/services.cxx
+++ b/dbaccess/source/core/misc/services.cxx
@@ -110,7 +110,7 @@ extern "C" OOO_DLLPUBLIC_DBA sal_Bool SAL_CALL component_writeInfo(
}
catch (InvalidRegistryException& )
{
- OSL_ENSURE( false, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !" );
+ OSL_FAIL( "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !" );
}
return sal_False;
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index ac29154..5dc9a5e 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 6d469da..5fd359d 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 48732cb..9c7b411 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 7070414..5e6952f 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 04d8c18..90b77e3 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 c9e917d..6deae06 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 f0580ed..6ff10cf 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/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index c43b5a1..57dec63 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;
}
}
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 98434e0..1924a3e 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1931,7 +1931,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;
@@ -2039,7 +2039,7 @@ Reference< XComponent > OApplicationController::newElement( ElementType _eType,
break;
default:
- OSL_ENSURE( false, "OApplicationController::newElement: illegal type!" );
+ OSL_FAIL( "OApplicationController::newElement: illegal type!" );
break;
}
@@ -2278,7 +2278,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;
}
}
@@ -2651,7 +2651,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
@@ -2974,7 +2974,7 @@ Any SAL_CALL OApplicationController::getSelection( ) throw (RuntimeException)
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list