diff options
author | David Tardon <dtardon@redhat.com> | 2011-02-25 17:47:41 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2011-02-25 17:47:41 +0100 |
commit | 9391bfcd34b2f54f0a5e78578fe78f843d9f8671 (patch) | |
tree | ba4f5ed78fb68de434712c888f9d3c175f2e0f22 | |
parent | f5502dad6c1fcf575e43579d62d732ed61636ca6 (diff) |
fix assertions
48 files changed, 104 insertions, 104 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index c042e9125..4e30b0253 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1483,7 +1483,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl } catch(Exception&) { - OSL_ASSERT("ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!"); + OSL_FAIL("ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!"); } // we're done with the parameters, now for the real execution diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index d8deb84bb..5cea24600 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -1085,7 +1085,7 @@ sal_Bool SAL_CALL ORowSetBase::previous( ) throw(SQLException, RuntimeException } else { - OSL_ASSERT( "ORowSetBase::previous: inconsistency!" ); + OSL_FAIL( "ORowSetBase::previous: inconsistency!" ); // we should never reach this place, as we should not get into this whole branch if m_bBeforeFirst // was |true| from the beginning movementFailed(); diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 23473fe21..7b32c6b90 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -626,7 +626,7 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const ::rtl::OUStr catch( const Exception& e ) { (void)e; - OSL_ASSERT( "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" ); + OSL_FAIL( "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" ); // every part of the additive statement should have passed other tests already, and should not // be able to cause any errors ... me thinks } @@ -704,7 +704,7 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const catch( const Exception& e ) { (void)e; - OSL_ASSERT( "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" ); + OSL_FAIL( "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" ); // every part of the additive statement should have passed other tests already, and should not // be able to cause any errors ... me thinks } @@ -1016,7 +1016,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition, if (SQL_ISRULE(pCondition,boolean_primary)) { // this should not occur - OSL_ASSERT("boolean_primary in And-Criteria"); + OSL_FAIL("boolean_primary in And-Criteria"); return sal_False; } // Das erste Element ist (wieder) eine AND-Verknuepfung diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx index 171d85098..26b1687ee 100644 --- a/dbaccess/source/core/api/TableDeco.cxx +++ b/dbaccess/source/core/api/TableDeco.cxx @@ -561,7 +561,7 @@ void ODBTableDecorator::fillPrivileges() const catch(const SQLException& e) { (void)e; - OSL_ASSERT("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !"); + OSL_FAIL("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !"); } } diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index 9a69b8934..d86f9798d 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -147,7 +147,7 @@ void SAL_CALL OColumn::setName( const ::rtl::OUString& _rName ) throw(::com::sun void OColumn::fireValueChange(const ::connectivity::ORowSetValue& /*_rOldValue*/) { - OSL_ASSERT( "OColumn::fireValueChange: not implemented!" ); + OSL_FAIL( "OColumn::fireValueChange: not implemented!" ); } void OColumn::registerProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const Type& _rMemberType ) diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index 32d599f20..c7a65caa1 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -258,7 +258,7 @@ void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) thro } else { - OSL_ASSERT("OQuery::propertyChange : my CommandDefinition has more properties than I do !"); + OSL_FAIL("OQuery::propertyChange : my CommandDefinition has more properties than I do !"); } } diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx index 1f8ec3c23..fb8b1e045 100644 --- a/dbaccess/source/core/api/querycontainer.cxx +++ b/dbaccess/source/core/api/querycontainer.cxx @@ -318,7 +318,7 @@ void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObj { if (_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinitions, UNO_QUERY).get()) { // our "master container" (with the command definitions) is being disposed - OSL_ASSERT("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !"); + OSL_FAIL("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !"); dispose(); } else diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index dafc7beb0..38051bbdb 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -268,7 +268,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any& xSet->setPropertyValue(PROPERTY_FETCHSIZE, rValue); break; default: - OSL_ASSERT("unknown Property"); + OSL_FAIL("unknown Property"); } } diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx index c85127de8..d73cff87f 100644 --- a/dbaccess/source/core/dataaccess/ContentHelper.cxx +++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx @@ -307,12 +307,12 @@ void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< :: // XPropertyContainer void SAL_CALL OContentHelper::addProperty( const ::rtl::OUString& /*Name*/, sal_Int16 /*Attributes*/, const Any& /*DefaultValue*/ ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException) { - OSL_ASSERT( "OContentHelper::addProperty: not implemented!" ); + OSL_FAIL( "OContentHelper::addProperty: not implemented!" ); } void SAL_CALL OContentHelper::removeProperty( const ::rtl::OUString& /*Name*/ ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException) { - OSL_ASSERT( "OContentHelper::removeProperty: not implemented!" ); + OSL_FAIL( "OContentHelper::removeProperty: not implemented!" ); } // XInitialization diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx index fb37f3d74..9038df36c 100644 --- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx +++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx @@ -330,7 +330,7 @@ void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName) if (m_aBookmarks.end() == aMapPos) { - OSL_ASSERT("OBookmarkContainer::implRemove: inconsistence!"); + OSL_FAIL("OBookmarkContainer::implRemove: inconsistence!"); return; } diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index b6210fa36..e92de90de 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -1292,18 +1292,18 @@ void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _Ev Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getPrinter( ) throw (RuntimeException) { - OSL_ASSERT( "ODatabaseDocument::getPrinter: not supported!" ); + OSL_FAIL( "ODatabaseDocument::getPrinter: not supported!" ); return Sequence< PropertyValue >(); } void SAL_CALL ODatabaseDocument::setPrinter( const Sequence< PropertyValue >& /*aPrinter*/ ) throw (IllegalArgumentException, RuntimeException) { - OSL_ASSERT( "ODatabaseDocument::setPrinter: not supported!" ); + OSL_FAIL( "ODatabaseDocument::setPrinter: not supported!" ); } void SAL_CALL ODatabaseDocument::print( const Sequence< PropertyValue >& /*xOptions*/ ) throw (IllegalArgumentException, RuntimeException) { - OSL_ASSERT( "ODatabaseDocument::print: not supported!" ); + OSL_FAIL( "ODatabaseDocument::print: not supported!" ); } void ODatabaseDocument::impl_reparent_nothrow( const WeakReference< XNameAccess >& _rxContainer ) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 5b4383029..6e7d7654c 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -216,7 +216,7 @@ sal_Bool SAL_CALL OAuthenticationContinuation::canSetRealm( ) throw(RuntimeExce void SAL_CALL OAuthenticationContinuation::setRealm( const ::rtl::OUString& /*Realm*/ ) throw(RuntimeException) { - OSL_ASSERT("OAuthenticationContinuation::setRealm: not supported!"); + OSL_FAIL("OAuthenticationContinuation::setRealm: not supported!"); } sal_Bool SAL_CALL OAuthenticationContinuation::canSetUserName( ) throw(RuntimeException) @@ -260,7 +260,7 @@ sal_Bool SAL_CALL OAuthenticationContinuation::canSetAccount( ) throw(RuntimeEx void SAL_CALL OAuthenticationContinuation::setAccount( const ::rtl::OUString& ) throw(RuntimeException) { - OSL_ASSERT("OAuthenticationContinuation::setAccount: not supported!"); + OSL_FAIL("OAuthenticationContinuation::setAccount: not supported!"); } Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberAccountModes( RememberAuthentication& _reDefault ) throw(RuntimeException) @@ -698,7 +698,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O } catch( const Exception& ) { - OSL_ASSERT( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" ); + OSL_FAIL( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" ); } if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) ) { @@ -859,7 +859,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any & } break; default: - OSL_ASSERT( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" ); + OSL_FAIL( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" ); } } return bModified; @@ -1064,7 +1064,7 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con rValue <<= m_pImpl->m_aLayoutInformation; break; default: - OSL_ASSERT("unknown Property"); + OSL_FAIL("unknown Property"); } } } @@ -1116,7 +1116,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const if (!_rxHandler.is()) { - OSL_ASSERT("ODatabaseSource::connectWithCompletion: invalid interaction handler!"); + OSL_FAIL("ODatabaseSource::connectWithCompletion: invalid interaction handler!"); return getConnection(m_pImpl->m_sUser, m_pImpl->m_aPassword,_bIsolated); } diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx index 0f8e5ad4a..a1faa92d2 100644 --- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx +++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx @@ -558,7 +558,7 @@ void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Refer } catch(Exception&) { - OSL_ASSERT("ODefinitionContainer::implAppend: caught something !"); + OSL_FAIL("ODefinitionContainer::implAppend: caught something !"); } } diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx index d11d558a9..7aec5106e 100644 --- a/dbaccess/source/core/dataaccess/documentdefinition.cxx +++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx @@ -683,7 +683,7 @@ namespace } catch ( Exception& ) { - OSL_ASSERT( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" ); + OSL_FAIL( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" ); } } } @@ -698,7 +698,7 @@ namespace } catch ( Exception& ) { - OSL_ASSERT( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" ); + OSL_FAIL( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" ); } } } @@ -730,7 +730,7 @@ namespace } catch( Exception& ) { - OSL_ASSERT( "LayoutManagerLock::LayoutManagerLock: caught an exception!" ); + OSL_FAIL( "LayoutManagerLock::LayoutManagerLock: caught an exception!" ); } } @@ -935,7 +935,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons sal_Int16( nOpenMode ) ) ), _rxEnvironment ); // Unreachable - OSL_ASSERT( "unreachable" ); + OSL_FAIL( "unreachable" ); } OSL_ENSURE( m_pImpl->m_aProps.sPersistentName.getLength(), diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 15df93763..c159edb71 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -359,7 +359,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const if (STRING_NOTFOUND == nSeparator) { // there should be at least one such separator - OSL_ASSERT("ODsnTypeCollection::implDetermineType : missing the colon !"); + OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the colon !"); return DST_UNKNOWN; } // find first : @@ -382,7 +382,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const if (STRING_NOTFOUND == nSeparator) { // at the moment only jdbc is allowed to have just one separator - OSL_ASSERT("ODsnTypeCollection::implDetermineType : missing the second colon !"); + OSL_FAIL("ODsnTypeCollection::implDetermineType : missing the second colon !"); return DST_UNKNOWN; } diff --git a/dbaccess/source/ext/adabas/Acomponentmodule.cxx b/dbaccess/source/ext/adabas/Acomponentmodule.cxx index 6ed328231..f35aad3f7 100644 --- a/dbaccess/source/ext/adabas/Acomponentmodule.cxx +++ b/dbaccess/source/ext/adabas/Acomponentmodule.cxx @@ -205,7 +205,7 @@ namespace COMPMOD_NAMESPACE { if (!s_pImplementationNames) { - OSL_ASSERT("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OModule::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); return; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -247,7 +247,7 @@ namespace COMPMOD_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OModule::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); return sal_True; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, @@ -278,7 +278,7 @@ namespace COMPMOD_NAMESPACE } catch(Exception&) { - OSL_ASSERT("OModule::writeComponentInfos : something went wrong while creating the keys !"); + OSL_FAIL("OModule::writeComponentInfos : something went wrong while creating the keys !"); return sal_False; } } @@ -296,7 +296,7 @@ namespace COMPMOD_NAMESPACE if (!s_pImplementationNames) { - OSL_ASSERT("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); + OSL_FAIL("OModule::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); return NULL; } OSL_ENSURE(s_pImplementationNames && s_pSupportedServices && s_pCreationFunctionPointers && s_pFactoryFunctionPointers, diff --git a/dbaccess/source/ext/adabas/Aservices.cxx b/dbaccess/source/ext/adabas/Aservices.cxx index b530783cc..953b04717 100644 --- a/dbaccess/source/ext/adabas/Aservices.cxx +++ b/dbaccess/source/ext/adabas/Aservices.cxx @@ -83,7 +83,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( } catch (InvalidRegistryException& ) { - OSL_ASSERT("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/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx index aa65ebdcd..feeb8f5bd 100644 --- a/dbaccess/source/filter/xml/xmlStyleImport.cxx +++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx @@ -120,7 +120,7 @@ void OTableStyleContext::FillPropertySet( pStyle = PTR_CAST(SvXMLNumFormatContext,pMyStyles-> FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_True)); else { - OSL_ASSERT("not possible to get style"); + OSL_FAIL("not possible to get style"); } } if ( pStyle ) diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx index 6e45ac99f..3c0c66d33 100644 --- a/dbaccess/source/filter/xml/xmlfilter.cxx +++ b/dbaccess/source/filter/xml/xmlfilter.cxx @@ -277,7 +277,7 @@ sal_Int32 ReadThroughComponent( aError += ','; aError += ByteString::CreateFromInt32( r.ColumnNumber ); - OSL_ASSERT( aError.GetBuffer() ); + OSL_FAIL( aError.GetBuffer() ); return 1; } #else diff --git a/dbaccess/source/sdbtools/misc/sdbt_services.cxx b/dbaccess/source/sdbtools/misc/sdbt_services.cxx index 06bfebaf2..f5f6651e9 100644 --- a/dbaccess/source/sdbtools/misc/sdbt_services.cxx +++ b/dbaccess/source/sdbtools/misc/sdbt_services.cxx @@ -79,7 +79,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( } catch (const InvalidRegistryException& ) { - OSL_ASSERT("sdbt::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); + OSL_FAIL("sdbt::component_writeInfo: could not create a registry key (InvalidRegistryException) !"); } return sal_False; diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index a4ed47dd8..98434e0f2 100644 --- a/dbaccess/source/ui/app/AppController.cxx +++ b/dbaccess/source/ui/app/AppController.cxx @@ -473,7 +473,7 @@ sal_Bool OApplicationController::Construct(Window* _pParent) } catch(Exception&) { - OSL_ASSERT("OApplicationController::Construct : the construction of UnoDataBrowserView failed !"); + OSL_FAIL("OApplicationController::Construct : the construction of UnoDataBrowserView failed !"); } if ( !bSuccess ) @@ -2514,7 +2514,7 @@ sal_Int8 OApplicationController::executeDrop( const ExecuteDropEvent& _rEvt ) OApplicationView* pView = getContainer(); if ( !pView || pView->getElementType() == E_NONE ) { - OSL_ASSERT("OApplicationController::executeDrop: what the hell did queryDrop do?"); + OSL_FAIL("OApplicationController::executeDrop: what the hell did queryDrop do?"); // queryDrop shoud not have allowed us to reach this situation .... return DND_ACTION_NONE; } @@ -2715,7 +2715,7 @@ sal_Bool SAL_CALL OApplicationController::attachModel(const Reference< XModel > Reference< XOfficeDatabaseDocument > xOfficeDoc( _rxModel, UNO_QUERY ); if ( !xOfficeDoc.is() && _rxModel.is() ) { - OSL_ASSERT( "OApplicationController::attachModel: invalid model!" ); + OSL_FAIL( "OApplicationController::attachModel: invalid model!" ); return sal_False; } diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx index 83020e12b..e9d4903d6 100644 --- a/dbaccess/source/ui/app/AppControllerDnD.cxx +++ b/dbaccess/source/ui/app/AppControllerDnD.cxx @@ -586,7 +586,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc bValidDescriptor = (0 != sCommand.getLength()); if (!bValidDescriptor) { - OSL_ASSERT("OApplicationController::paste: invalid descriptor!"); + OSL_FAIL("OApplicationController::paste: invalid descriptor!"); return sal_False; } @@ -637,7 +637,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc if (!bSuccess) { - OSL_ASSERT("OApplicationController::paste: could not extract the source query object!"); + OSL_FAIL("OApplicationController::paste: could not extract the source query object!"); // TODO: maybe this is worth an error message to be displayed to the user .... return sal_False; } @@ -648,7 +648,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc Reference< XSingleServiceFactory > xQueryFactory(xDestQueries, UNO_QUERY); if (!xQueryFactory.is()) { - OSL_ASSERT("OApplicationController::paste: invalid destination query container!"); + OSL_FAIL("OApplicationController::paste: invalid destination query container!"); return sal_False; } diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index f12593db3..59b42d114 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -134,7 +134,7 @@ using namespace ::svt; DBG_UNHANDLED_EXCEPTION(); \ } \ -#define DO_SAFE( action, message ) try { action; } catch(Exception&) { OSL_ASSERT(message); } ; +#define DO_SAFE( action, message ) try { action; } catch(Exception&) { OSL_FAIL(message); } ; //.................................................................. namespace dbaui @@ -851,7 +851,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent) } catch(Exception&) { - OSL_ASSERT("SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed !"); + OSL_FAIL("SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed !"); } if (!bSuccess) @@ -1437,7 +1437,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for if (aEvent.Source != getRowSet()) { // not my data source -> allow anything - OSL_ASSERT("SbaXDataBrowserController::approveParameter : invalid event source !"); + OSL_FAIL("SbaXDataBrowserController::approveParameter : invalid event source !"); return sal_True; } @@ -1475,7 +1475,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for Sequence< PropertyValue > aFinalValues = pParamValues->getValues(); if (aFinalValues.getLength() != aRequest.Parameters->getCount()) { - OSL_ASSERT("SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense!"); + OSL_FAIL("SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense!"); setLoadingCancelled(); return sal_False; } @@ -1495,7 +1495,7 @@ sal_Bool SbaXDataBrowserController::approveParameter(const ::com::sun::star::for try { xParam->setPropertyValue(PROPERTY_VALUE, pFinalValues->Value); } catch(Exception&) { - OSL_ASSERT("SbaXDataBrowserController::approveParameter: setting one of the properties failed!"); + OSL_FAIL("SbaXDataBrowserController::approveParameter: setting one of the properties failed!"); } } } @@ -2356,7 +2356,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) } catch(Exception&) { - OSL_ASSERT("SbaXDataBrowserController::SaveModified : could not save the current record !"); + OSL_FAIL("SbaXDataBrowserController::SaveModified : could not save the current record !"); bResult = sal_False; } @@ -2886,7 +2886,7 @@ void SAL_CALL LoadFormHelper::loaded(const ::com::sun::star::lang::EventObject& void SAL_CALL LoadFormHelper::unloaded(const ::com::sun::star::lang::EventObject& /*aEvent*/) throw( RuntimeException ) { ::osl::MutexGuard aGuard(m_aAccessSafety); - OSL_ASSERT("LoadFormHelper::unloaded : shouldn't be called !"); + OSL_FAIL("LoadFormHelper::unloaded : shouldn't be called !"); implDispose(); } diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index 4e9e5444e..e13d66029 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -125,7 +125,7 @@ void SbaTableQueryBrowser::select(SvLBoxEntry* _pEntry, sal_Bool _bSelect) m_pTreeModel->InvalidateEntry(_pEntry); } else { - OSL_ASSERT("SbaTableQueryBrowser::select: invalid entry!"); + OSL_FAIL("SbaTableQueryBrowser::select: invalid entry!"); } } @@ -145,7 +145,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const if (pTextItem) return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized(); else { - OSL_ASSERT("SbaTableQueryBrowser::isSelected: invalid entry!"); + OSL_FAIL("SbaTableQueryBrowser::isSelected: invalid entry!"); } return sal_False; } diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index c0bd89709..b8a0a5b53 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -138,7 +138,7 @@ namespace dbaui EntryType eEntryType = getEntryType( pHitEntry ); if (!isContainer(eEntryType)) { - OSL_ASSERT("SbaTableQueryBrowser::executeDrop: what the hell did queryDrop do?"); + OSL_FAIL("SbaTableQueryBrowser::executeDrop: what the hell did queryDrop do?"); // queryDrop shoud not have allowed us to reach this situation .... return DND_ACTION_NONE; } diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx index caad93bfe..eeee6b7ec 100644 --- a/dbaccess/source/ui/browser/formadapter.cxx +++ b/dbaccess/source/ui/browser/formadapter.cxx @@ -1079,7 +1079,7 @@ IMPLEMENT_LISTENER_ADMINISTRATION(SbaXFormAdapter, form, SubmitListener, m_aSubm // ------------------------------------------------------------------------- sal_Bool SAL_CALL SbaXFormAdapter::getGroupControl() throw( RuntimeException ) { - OSL_ASSERT("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !"); + OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !"); return sal_False; } @@ -1105,7 +1105,7 @@ Sequence< Reference< ::com::sun::star::awt::XControlModel > > SAL_CALL SbaXFormA // ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::setGroup(const Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, const ::rtl::OUString& /*GroupName*/) throw( RuntimeException ) { - OSL_ASSERT("SAL_CALL SbaXFormAdapter::setGroup : not supported !"); + OSL_FAIL("SAL_CALL SbaXFormAdapter::setGroup : not supported !"); } // ------------------------------------------------------------------------- @@ -1118,13 +1118,13 @@ sal_Int32 SAL_CALL SbaXFormAdapter::getGroupCount() throw( RuntimeException ) // ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::getGroup(sal_Int32 /*nGroup*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/, ::rtl::OUString& /*Name*/) throw( RuntimeException ) { - OSL_ASSERT("SAL_CALL SbaXFormAdapter::getGroup : not supported !"); + OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroup : not supported !"); } // ------------------------------------------------------------------------- void SAL_CALL SbaXFormAdapter::getGroupByName(const ::rtl::OUString& /*Name*/, Sequence< Reference< ::com::sun::star::awt::XControlModel > >& /*_rGroup*/) throw( RuntimeException ) { - OSL_ASSERT("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !"); + OSL_FAIL("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !"); } // ::com::sun::star::lang::XComponent diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index fffda81a8..f1f499b02 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -270,7 +270,7 @@ sal_Bool OGenericUnoController::Construct(Window* /*pParent*/) } catch(Exception&) { - OSL_ASSERT("OGenericUnoController::Construct: could not create (or start listening at) the database context!"); + OSL_FAIL("OGenericUnoController::Construct: could not create (or start listening at) the database context!"); } if (!m_xDatabaseContext.is()) diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index b73b5bb67..408c56ad0 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1289,7 +1289,7 @@ void SbaGridControl::DoColumnDrag(sal_uInt16 nColumnPos) } catch(Exception&) { - OSL_ASSERT("SbaGridControl::DoColumnDrag : something went wrong while getting the column"); + OSL_FAIL("SbaGridControl::DoColumnDrag : something went wrong while getting the column"); } if (0 == sField.getLength()) return; @@ -1372,7 +1372,7 @@ void SbaGridControl::DoFieldDrag(sal_uInt16 nColumnPos, sal_Int16 nRowPos) } catch(Exception&) { - OSL_ASSERT("SbaGridControl::DoFieldDrag : could not retrieve the cell's contents !"); + OSL_FAIL("SbaGridControl::DoFieldDrag : could not retrieve the cell's contents !"); return; } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 8cb263ee3..1130bb7a7 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -374,7 +374,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) } catch(Exception&) { - OSL_ASSERT("SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!"); + OSL_FAIL("SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!"); } // some help ids if (getBrowserView() && getBrowserView()->getVclControl()) @@ -468,7 +468,7 @@ sal_Bool SbaTableQueryBrowser::InitializeForm(const Reference< ::com::sun::star: } catch(Exception&) { - OSL_ASSERT("SbaTableQueryBrowser::InitializeForm : something went wrong !"); + OSL_FAIL("SbaTableQueryBrowser::InitializeForm : something went wrong !"); return sal_False; } @@ -1144,7 +1144,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS } catch(Exception&) { - OSL_ASSERT("SbaTableQueryBrowser::populateTree: could not fill the tree"); + OSL_FAIL("SbaTableQueryBrowser::populateTree: could not fill the tree"); } } } @@ -1338,7 +1338,7 @@ void SbaTableQueryBrowser::implRemoveStatusListeners() } catch (Exception&) { - OSL_ASSERT("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!"); + OSL_FAIL("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!"); } } } @@ -1900,7 +1900,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue } catch(Exception&) { - OSL_ASSERT("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!"); + OSL_FAIL("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!"); } Reference<XPropertySet> xProp(getRowSet(),UNO_QUERY); @@ -2066,7 +2066,7 @@ void SbaTableQueryBrowser::populateTree(const Reference<XNameAccess>& _xNameAcce } catch(Exception&) { - OSL_ASSERT("SbaTableQueryBrowser::populateTree: could not fill the tree"); + OSL_FAIL("SbaTableQueryBrowser::populateTree: could not fill the tree"); } } @@ -2253,7 +2253,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry ) bSuccess = pEntryData->xContainer.is(); } else { - OSL_ASSERT("SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!"); + OSL_FAIL("SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!"); } } catch( const Exception& ) @@ -2826,7 +2826,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve } else if (xNames.get() == m_xDatabaseContext.get()) { // a datasource has been replaced in the context - OSL_ASSERT("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!"); + OSL_FAIL("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!"); // very suspicious: the database context should not allow to replace data source, only to register // and revoke them } diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index 8919a6b15..02628e3f1 100644 --- a/dbaccess/source/ui/control/charsetlistbox.cxx +++ b/dbaccess/source/ui/control/charsetlistbox.cxx @@ -74,7 +74,7 @@ namespace dbaui OCharsetDisplay::const_iterator aFind = m_aCharSets.findIanaName( _rIanaName ); if (aFind == m_aCharSets.end()) { - OSL_ASSERT( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" ); + OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" ); aFind = m_aCharSets.findEncoding( RTL_TEXTENCODING_DONTKNOW ); } @@ -90,7 +90,7 @@ namespace dbaui // in our settings, there was an encoding selected which is not valid for the current // data source type // This is worth at least an assertion. - OSL_ASSERT( "CharSetListBox::SelectEntryByIanaName: invalid character set!" ); + OSL_FAIL( "CharSetListBox::SelectEntryByIanaName: invalid character set!" ); sDisplayName = String(); } diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index 250295ee4..3b8db9f03 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -667,7 +667,7 @@ PopupMenu* DBTreeListBox::CreateContextMenu( void ) break; default: - OSL_ASSERT( "DBTreeListBox::CreateContextMenu: unexpected return value of the interceptor call!" ); + OSL_FAIL( "DBTreeListBox::CreateContextMenu: unexpected return value of the interceptor call!" ); case ContextMenuInterceptorAction_IGNORED: break; diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 440d1ae72..3c78e436f 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -193,7 +193,7 @@ void OTableTreeListBox::UpdateTableList( const Reference< XConnection >& _rxConn } catch(RuntimeException&) { - OSL_ASSERT("OTableTreeListBox::UpdateTableList : caught an RuntimeException!"); + OSL_FAIL("OTableTreeListBox::UpdateTableList : caught an RuntimeException!"); } catch ( const SQLException& ) { diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index 332ddd53d..961a2759c 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -650,7 +650,7 @@ DBG_NAME(OConnectionHelper) } catch(Exception&) { - OSL_ASSERT("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!"); + OSL_FAIL("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!"); } } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 4f91b6d65..c8e13602b 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -135,7 +135,7 @@ namespace ::rtl::OString sMessage("ODbAdminDialog::implTranslateProperty: could not set the property "); sMessage += ::rtl::OString(_rName.getStr(), _rName.getLength(), RTL_TEXTENCODING_ASCII_US); sMessage += ::rtl::OString("!"); - OSL_ASSERT(sMessage.getStr()); + OSL_FAIL(sMessage.getStr()); #endif } @@ -643,7 +643,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr ::rtl::OString aMessage("ODbDataSourceAdministrationHelper::translateProperties: could not extract the property "); aMessage += ::rtl::OString(aDirect->second.getStr(), aDirect->second.getLength(), RTL_TEXTENCODING_ASCII_US); aMessage += ::rtl::OString("!"); - OSL_ASSERT(aMessage.getStr()); + OSL_FAIL(aMessage.getStr()); #endif } // transfer it into an item @@ -949,7 +949,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem* } else { - OSL_ASSERT("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!"); + OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!"); return aValue; } @@ -998,7 +998,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet _rSet.Put(SfxStringItem(_nId, sValue.getStr())); } else { - OSL_ASSERT( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no string)!" ) @@ -1028,7 +1028,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet _rSet.Put( aItem ); } else { - OSL_ASSERT( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no boolean)!" ) @@ -1045,7 +1045,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet _rSet.Put( SfxInt32Item( _nId, nValue ) ); } else { - OSL_ASSERT( + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no int)!" ) @@ -1074,11 +1074,11 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet } break; default: - OSL_ASSERT("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); + OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); } } else { - OSL_ENSURE(false, + OSL_FAIL( ( ::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" ) += ::rtl::OString( translatePropertyId( _nId ) ) += ::rtl::OString( " should be no string sequence)!" ) @@ -1092,7 +1092,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet break; default: - OSL_ENSURE(false, "ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); + OSL_FAIL("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!"); } } diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 4e07c7a66..a50283ed4 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -285,7 +285,7 @@ namespace dbaui aValue = PTR_CAST( OptionalBoolItem, pItem )->GetFullValue(); } else - OSL_ASSERT( "SpecialSettingsPage::implInitControls: unknown boolean item type!" ); + OSL_FAIL( "SpecialSettingsPage::implInitControls: unknown boolean item type!" ); if ( !aValue ) { diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index 20f2f561c..7c0acb11d 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -388,7 +388,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath() } break; default: - OSL_ASSERT( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" ); + OSL_FAIL( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" ); } enableButtons( WZB_NEXT, m_pGeneralPage->GetDatabaseCreationMode() != OGeneralPage::eOpenExisting ); @@ -726,7 +726,7 @@ sal_Bool ODbTypeWizDialogSetup::leaveState(WizardState _nState) // ----------------------------------------------------------------------------- void ODbTypeWizDialogSetup::setTitle(const ::rtl::OUString& /*_sTitle*/) { - OSL_ASSERT( "ODbTypeWizDialogSetup::setTitle: not implemented!" ); + OSL_FAIL( "ODbTypeWizDialogSetup::setTitle: not implemented!" ); // why? } diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx index 0f6c586d5..7537283b4 100644 --- a/dbaccess/source/ui/dlg/dlgattr.cxx +++ b/dbaccess/source/ui/dlg/dlgattr.cxx @@ -63,7 +63,7 @@ SbaSbAttrDlg::SbaSbAttrDlg(Window* pParent, const SfxItemSet* pCellAttrs, SvNumb SetText(aTitle); if( nFlags & TP_ATTR_CHAR ) { - OSL_ASSERT( "found flag TP_ATTR_CHAR" ); + OSL_FAIL( "found flag TP_ATTR_CHAR" ); } if( nFlags & TP_ATTR_NUMBER ) AddTabPage( RID_SVXPAGE_NUMBERFORMAT,String(ModuleRes(TP_ATTR_NUMBER)) ); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index a66f9c8de..e9a846e3c 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -396,7 +396,7 @@ DBG_NAME(DbaIndexDialog) } if ((i>0x7FFFFFFF) || (i<0)) { - OSL_ASSERT("DbaIndexDialog::OnNewIndex: no free index name found!"); + OSL_FAIL("DbaIndexDialog::OnNewIndex: no free index name found!"); // can't do anything ... of course we try another base, but this could end with the same result ... return; } diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 88752ca5b..6b801ece2 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -95,7 +95,7 @@ DBG_NAME(OParameterDialog) m_xFormatter = Reference< XNumberFormatter>(_rxORB->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.NumberFormatter"))), UNO_QUERY); else { - OSL_ASSERT("OParameterDialog::OParameterDialog: need a service factory!"); + OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!"); } Reference< XNumberFormatsSupplier > xNumberFormats = ::dbtools::getNumberFormats(m_xConnection, sal_True); diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index a58ff7844..bee3c6c4c 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -454,7 +454,7 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI sField = aLB_WHEREFIELD3.GetSelectEntry(); } else { - OSL_ASSERT( "DlgFilterCrit::getMatchingColumn: invalid event source!" ); + OSL_FAIL( "DlgFilterCrit::getMatchingColumn: invalid event source!" ); } // the field itself diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index c2ed02147..fb950ebca 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -594,7 +594,7 @@ void OSQLMessageBox::impl_initImage( MessageType _eImage ) switch (_eImage) { default: - OSL_ASSERT( "OSQLMessageBox::impl_initImage: unsupported image type!" ); + OSL_FAIL( "OSQLMessageBox::impl_initImage: unsupported image type!" ); case Info: m_aInfoImage.SetImage(InfoBox::GetStandardImage()); diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 22ba517d7..f1f1dffa1 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -174,7 +174,7 @@ DBG_NAME(OTableSubscriptionPage) } catch(SQLException&) { - OSL_ASSERT("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!"); + OSL_FAIL("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!"); } // uncheck all diff --git a/dbaccess/source/ui/misc/TableCopyHelper.cxx b/dbaccess/source/ui/misc/TableCopyHelper.cxx index ed35f27d4..bf7d3855e 100644 --- a/dbaccess/source/ui/misc/TableCopyHelper.cxx +++ b/dbaccess/source/ui/misc/TableCopyHelper.cxx @@ -99,7 +99,7 @@ void OTableCopyHelper::insertTable( const ::rtl::OUString& i_rSourceDataSource, { if ( CommandType::QUERY != i_nCommandType && CommandType::TABLE != i_nCommandType ) { - OSL_ASSERT( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" ); + OSL_FAIL( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" ); return; } diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx index 3929c33e0..35ee109b1 100644 --- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx +++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx @@ -333,7 +333,7 @@ namespace } catch(SQLException&) { - OSL_ASSERT(!"Failure while building Join criteria!"); + OSL_FAIL(!"Failure while building Join criteria!"); } } @@ -703,7 +703,7 @@ namespace } catch(SQLException&) { - OSL_ASSERT(!"Failure while building select list!"); + OSL_FAIL(!"Failure while building select list!"); } return aFieldListStr.makeStringAndClear(); } @@ -878,7 +878,7 @@ namespace } catch(SQLException&) { - OSL_ASSERT(!"Failure while building where clause!"); + OSL_FAIL(!"Failure while building where clause!"); } return sal_True; } @@ -979,7 +979,7 @@ namespace } catch(SQLException&) { - OSL_ASSERT(!"Failure while building group by!"); + OSL_FAIL(!"Failure while building group by!"); } return eErrorCode; @@ -1214,7 +1214,7 @@ namespace } catch(SQLException&) { - OSL_ASSERT(!"Failure while building group by!"); + OSL_FAIL(!"Failure while building group by!"); } return aGroupByStr; } @@ -1985,7 +1985,7 @@ namespace Reference< XConnection> xConnection = rController.getConnection(); if ( !xConnection.is() ) { - OSL_ASSERT( "InitFromParseNodeImpl: no connection? no connection!" ); + OSL_FAIL( "InitFromParseNodeImpl: no connection? no connection!" ); break; } @@ -2092,7 +2092,7 @@ namespace } catch(SQLException&) { - OSL_ASSERT(!"getMaxTablesInSelect!"); + OSL_FAIL("getMaxTablesInSelect!"); } } while ( false ); @@ -2297,7 +2297,7 @@ namespace break; } - OSL_ASSERT( "InstallFields: don't know how to interpret this parse node!" ); + OSL_FAIL( "InstallFields: don't know how to interpret this parse node!" ); } while ( false ); } diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index 680d55c80..86e4da567 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -440,7 +440,7 @@ void OQueryTableView::AddTabWin(const ::rtl::OUString& _rTableName, const ::rtl: } catch(SQLException&) { - OSL_ASSERT(!"qualifiedNameComponents"); + OSL_FAIL("qualifiedNameComponents"); } } // ----------------------------------------------------------------------------- diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 0658bdb7f..eef516ee5 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -1448,7 +1448,7 @@ sal_Int8 OSelectionBrowseBox::ExecuteDrop( const BrowserExecuteDropEvent& _rEvt TransferableDataHelper aDropped(_rEvt.maDropEvent.Transferable); if (!OJoinExchObj::isFormatAvailable(aDropped.GetDataFlavorExVector())) { - OSL_ASSERT("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!"); + OSL_FAIL("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!"); return DND_ACTION_NONE; } diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index c75f5ce51..5f86ed31b 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -233,7 +233,7 @@ namespace dbaui break;} default: - OSL_ASSERT("OSQLParser::ShowParseTree: unzulaessiger NodeType"); + OSL_FAIL("OSQLParser::ShowParseTree: unzulaessiger NodeType"); rString += _pNode->getTokenValue(); } _pBox->InsertEntry(rString,_pParent); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index 4f4dedb21..b01b3eccb 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -275,7 +275,7 @@ void OTableEditorCtrl::InitCellController() } catch(SQLException&) { - OSL_ASSERT(!"getMaxColumnNameLength"); + OSL_FAIL("getMaxColumnNameLength"); } pNameCell = new OSQLNameEdit( &GetDataWindow(), sExtraNameChars,WB_LEFT ); |