diff options
author | Frank Schönheit <fs@openoffice.org> | 2001-04-03 13:16:03 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2001-04-03 13:16:03 +0000 |
commit | d22a1fcd9f3cb49bb80276d0d332941af39ee1bb (patch) | |
tree | 27c4ee413acadac364add96b77874b1f3ee149b6 /dbaccess | |
parent | b616acfed18dd6c364baf79ef2d14f044a354848 (diff) |
corrected some wrong OSL_ASSERTs
Diffstat (limited to 'dbaccess')
22 files changed, 117 insertions, 111 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index b4fa14d929bd..c12b060f3839 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RowSet.cxx,v $ * - * $Revision: 1.48 $ + * $Revision: 1.49 $ * - * last change: $Author: fs $ $Date: 2001-04-03 08:28:23 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:12:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -358,9 +358,7 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const switch(nHandle) { case PROPERTY_ID_ACTIVECONNECTION: - m_bOwnConnection = sal_False; - m_bCreateStatement = sal_True; - m_bRebuildConnOnExecute = sal_False; + // remove as event listener try { Reference< XComponent > xComponent(m_xActiveConnection, UNO_QUERY); @@ -374,6 +372,15 @@ void SAL_CALL ORowSet::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const catch(Exception&) // doesn't matter here { } + + // if we owned the connection, dispose it + if(m_bOwnConnection) + ::comphelper::disposeComponent(m_xActiveConnection); + + m_bOwnConnection = sal_False; + m_bCreateStatement = sal_True; + m_bRebuildConnOnExecute = sal_False; + // we have to dispose our querycomposer try { diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx index 67f12722047a..f9d81a443478 100644 --- a/dbaccess/source/core/api/RowSetBase.hxx +++ b/dbaccess/source/core/api/RowSetBase.hxx @@ -2,9 +2,9 @@ * * $RCSfile: RowSetBase.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: oj $ $Date: 2001-02-23 15:22:32 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:12:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -180,18 +180,15 @@ namespace dbaccess // fire a notification for all that are listening on column::VALUE property void firePropertyChange(const ORowSetMatrix::iterator& _rOldRow); - virtual void fireRowcount() - {OSL_ASSERT("fireRowcount() not allowed for clone!");} // fire if rowcount changed + virtual void fireRowcount() { } // fire if rowcount changed virtual void notifyAllListenersRowBeforeChange(const ::com::sun::star::sdb::RowChangeEvent &rEvt) - {OSL_ASSERT("fireRowcount() not allowed for clone!");} // notify before row will change + { } // fire if rowcount changed virtual void notifyAllListenersRowChanged(const ::com::sun::star::sdb::RowChangeEvent &rEvt) - {OSL_ASSERT("fireRowcount() not allowed for clone!");} // notify row changed - virtual void notifyAllListenersCursorBeforeMove() - {OSL_ASSERT("fireRowcount() not allowed for clone!");} // notify before cursor will move - virtual void notifyAllListenersCursorMoved() - {OSL_ASSERT("fireRowcount() not allowed for clone!");} // notify cursor moved - virtual void notifyAllListeners() - {OSL_ASSERT("fireRowcount() not allowed for clone!");} // notify all that rowset changed + { } // notify row changed + virtual void notifyAllListenersCursorBeforeMove() { } // notify row changed + + virtual void notifyAllListenersCursorMoved() { } // notify cursor moved + virtual void notifyAllListeners() { } // notify all that rowset changed // check if the insert must be canceled virtual void checkInsert() = 0; diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx index cb17cd0f7212..cbd90b6de28c 100644 --- a/dbaccess/source/core/api/column.cxx +++ b/dbaccess/source/core/api/column.cxx @@ -2,9 +2,9 @@ * * $RCSfile: column.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: jl $ $Date: 2001-03-23 13:18:50 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:12:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -559,7 +559,7 @@ void OColumns::loadSettings(const OConfigurationNode& _rLocation, const IColumnF append(*pColumNames, pExistent); else { - OSL_ASSERT("OColumns::loadSettings : createColumn returned nonsense !"); + OSL_ENSURE(sal_False, "OColumns::loadSettings : createColumn returned nonsense !"); continue; } } @@ -578,7 +578,7 @@ void OColumns::loadSettings(const OConfigurationNode& _rLocation, const IColumnF if (pExistentSettings) pExistentSettings->readUIFrom(aCurrent); else - OSL_ASSERT("OColumns::loadSettings : no settings for the column !"); + OSL_ENSURE(sal_False, "OColumns::loadSettings : no settings for the column !"); } } @@ -588,12 +588,12 @@ void OColumns::storeSettings(const OConfigurationNode& _rLocation) MutexGuard aGuard(m_rMutex); if (!_rLocation.isValid()) { - OSL_ASSERT("OColumns::storeSettings: have no location !"); + OSL_ENSURE(sal_False, "OColumns::storeSettings: have no location !"); return; } if (_rLocation.isReadonly()) { - OSL_ASSERT("OColumns::storeSettings: the location is read-only !"); + OSL_ENSURE(sal_False, "OColumns::storeSettings: the location is read-only !"); return; } @@ -625,7 +625,7 @@ void OColumns::storeSettings(const OConfigurationNode& _rLocation) OColumnSettings* pCurrentSettings = pCurrent->getSettings(); if (!pCurrentSettings) { - OSL_ASSERT("OColumns::storeSettings: column without settings we can write !"); + OSL_ENSURE(sal_False, "OColumns::storeSettings: can't write column without settings!"); continue; } sCurrent = pCurrent->m_sName; @@ -649,7 +649,7 @@ void OColumns::storeSettings(const OConfigurationNode& _rLocation) aColumnNode = _rLocation.createNode(sCurrent); if (!aColumnNode.isValid()) { - OSL_ASSERT("OColumns::storeSettings: could not create the structures for writing a column !"); + OSL_ENSURE(sal_False, "OColumns::storeSettings: could not create the structures for writing a column !"); continue; } } @@ -751,7 +751,7 @@ Reference< XNamed > OColumns::createObject(const ::rtl::OUString& _rName) // ------------------------------------------------------------------------- Reference< XPropertySet > OColumns::createEmptyObject() { - OSL_ASSERT("Are not filled this way!"); + OSL_ENSURE(sal_False, "Are not filled this way!"); // connectivity::sdbcx::OColumn* pRet = new OTableColumnDescriptor(isCaseSensitive()); OTableColumnDescriptor* pRet = new OTableColumnDescriptor(); Reference< XPropertySet > xRet = pRet; diff --git a/dbaccess/source/core/api/datasettings.cxx b/dbaccess/source/core/api/datasettings.cxx index faa84615f3ed..842c09870daa 100644 --- a/dbaccess/source/core/api/datasettings.cxx +++ b/dbaccess/source/core/api/datasettings.cxx @@ -2,9 +2,9 @@ * * $RCSfile: datasettings.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-02-20 09:40:47 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:12:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -260,7 +260,7 @@ void ODataSettings_Base::storeTo(const OConfigurationNode& _rConfigLocation) con { if (!_rConfigLocation.isValid() || _rConfigLocation.isReadonly()) { - OSL_ASSERT("ODataSettings_Base::storeTo : invalid config key (NULL or readonly) !"); + OSL_ENSURE(sal_False, "ODataSettings_Base::storeTo : invalid config key (NULL or readonly) !"); return; } @@ -311,7 +311,7 @@ void ODataSettings_Base::loadFrom(const OConfigurationNode& _rConfigLocation) { if (!_rConfigLocation.isValid()) { - OSL_ASSERT("ODataSettings_Base::loadFrom: invalid config key (NULL) !"); + OSL_ENSURE(sal_False, "ODataSettings_Base::loadFrom: invalid config key (NULL) !"); return; } diff --git a/dbaccess/source/core/api/querydescriptor.cxx b/dbaccess/source/core/api/querydescriptor.cxx index c74f2d3543f6..c61c7d702a1f 100644 --- a/dbaccess/source/core/api/querydescriptor.cxx +++ b/dbaccess/source/core/api/querydescriptor.cxx @@ -2,9 +2,9 @@ * * $RCSfile: querydescriptor.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: jl $ $Date: 2001-03-23 13:18:50 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:12:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -166,7 +166,7 @@ OQueryDescriptor::OQueryDescriptor(const ::com::sun::star::uno::Reference< XProp } catch(Exception&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OQueryDescriptor::OQueryDescriptor: caught an exception!"); } } diff --git a/dbaccess/source/shared/apitools.cxx b/dbaccess/source/shared/apitools.cxx index ae9e5fae8afc..789242c8ff5f 100644 --- a/dbaccess/source/shared/apitools.cxx +++ b/dbaccess/source/shared/apitools.cxx @@ -2,9 +2,9 @@ * * $RCSfile: apitools.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-10-27 07:34:13 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:16:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -133,7 +133,7 @@ void OSubComponent::release() throw (RuntimeException) dispose(); // only the alive ref holds the object - OSL_ASSERT( m_refCount == 1 ); + OSL_ENSURE( m_refCount == 1, "OSubComponent::release: invalid ref count!" ); // release the parent in the ~ if (xParent.is()) diff --git a/dbaccess/source/shared/registrationhelper.cxx b/dbaccess/source/shared/registrationhelper.cxx index 312d8fcbdcb3..efe4af98177a 100644 --- a/dbaccess/source/shared/registrationhelper.cxx +++ b/dbaccess/source/shared/registrationhelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: registrationhelper.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-04-02 06:15:29 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:16:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,7 +116,7 @@ void OModuleRegistration::revokeComponent(const ::rtl::OUString& _rImplementatio { if (!s_pImplementationNames) { - OSL_ASSERT("OModuleRegistration::revokeComponent : have no class infos ! Are you sure called this method at the right time ?"); + OSL_ENSURE(sal_False, "OModuleRegistration::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, @@ -158,7 +158,7 @@ sal_Bool OModuleRegistration::writeComponentInfos( if (!s_pImplementationNames) { - OSL_ASSERT("OModuleRegistration::writeComponentInfos : have no class infos ! Are you sure called this method at the right time ?"); + OSL_ENSURE(sal_False, "OModuleRegistration::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, @@ -189,7 +189,7 @@ sal_Bool OModuleRegistration::writeComponentInfos( } catch(Exception&) { - OSL_ASSERT("OModuleRegistration::writeComponentInfos : something went wrong while creating the keys !"); + OSL_ENSURE(sal_False, "OModuleRegistration::writeComponentInfos : something went wrong while creating the keys !"); return sal_False; } } @@ -207,7 +207,7 @@ Reference< XInterface > OModuleRegistration::getComponentFactory( if (!s_pImplementationNames) { - OSL_ASSERT("OModuleRegistration::getComponentFactory : have no class infos ! Are you sure called this method at the right time ?"); + OSL_ENSURE(sal_False, "OModuleRegistration::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/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx index e296c5cc5430..ab3b4e40110d 100644 --- a/dbaccess/source/ui/browser/dsbrowserDnD.cxx +++ b/dbaccess/source/ui/browser/dsbrowserDnD.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dsbrowserDnD.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-03-30 13:42:02 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -618,7 +618,7 @@ namespace dbaui catch(SQLException& e) { showError(SQLExceptionInfo(e)); } catch(Exception& ) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "SbaTableQueryBrowser::implPasteTable: caught a generic exception!"); } } @@ -801,6 +801,9 @@ namespace dbaui /************************************************************************* * history: * $Log: not supported by cvs2svn $ + * Revision 1.5 2001/03/30 13:42:02 oj + * remove <: + * * Revision 1.4 2001/03/30 08:47:18 oj * correct the creation of views * diff --git a/dbaccess/source/ui/browser/exsrcbrw.cxx b/dbaccess/source/ui/browser/exsrcbrw.cxx index 9940b1f91979..a461e8347bfd 100644 --- a/dbaccess/source/ui/browser/exsrcbrw.cxx +++ b/dbaccess/source/ui/browser/exsrcbrw.cxx @@ -2,9 +2,9 @@ * * $RCSfile: exsrcbrw.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: jl $ $Date: 2001-03-23 13:24:16 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -264,11 +264,11 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U aControlProps = *(Sequence< ::com::sun::star::beans::PropertyValue>*)pArguments->Value.getValue(); } else - OSL_ASSERT(((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer()); + OSL_ENSURE(sal_False, ((ByteString("SbaExternalSourceBrowser::dispatch(AddGridColumn) : unknown argument (") += ByteString((const sal_Unicode*)pArguments->Name, gsl_getSystemTextEncoding()).GetBuffer()) += ") !").GetBuffer()); } if (!sControlType.getLength()) { - OSL_ASSERT("SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnType) !"); sControlType = ::rtl::OUString::createFromAscii("TextField"); } OSL_ENSURE(aControlProps.getLength(), "SbaExternalSourceBrowser::dispatch(AddGridColumn) : missing argument (ColumnProperties) !"); @@ -286,9 +286,8 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U } catch(Exception&) { - OSL_ASSERT("SbaExternalSourceBrowser::dispatch : could not set a column property (maybe you forgot a READONLY attribute for a dispatch-argument ?) !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch : could not set a column property (maybe you forgot a READONLY attribute for a dispatch-argument ?) !"); } - ; } // correct the position @@ -323,7 +322,7 @@ void SAL_CALL SbaExternalSourceBrowser::dispatch(const ::com::sun::star::util::U } if (!xMasterForm.is()) { - OSL_ASSERT("SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::dispatch(FormSlots/AttachToForm) : please specify a form to attach to as argument !"); return; } @@ -504,7 +503,7 @@ void SbaExternalSourceBrowser::Attach(const Reference< XRowSet > & xMaster) } catch(Exception&) { - OSL_ASSERT("SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::Attach : couldn't restore the cursor position !"); } } @@ -629,7 +628,7 @@ void SAL_CALL SbaExternalSourceBrowser::focusLost(const ::com::sun::star::awt::F if (xCommitable.is()) xCommitable->commit(); else - OSL_ASSERT("SbaExternalSourceBrowser::focusLost : why is my control not commitable ?"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::focusLost : why is my control not commitable ?"); } //------------------------------------------------------------------ @@ -682,13 +681,13 @@ void SAL_CALL SbaExternalSourceBrowser::FormControllerImpl::removeActivateListen //------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::FormControllerImpl::setModel(const Reference< ::com::sun::star::awt::XTabControllerModel > & Model) throw( RuntimeException ) { - OSL_ASSERT("SbaExternalSourceBrowser::FormControllerImpl::setModel : invalid call, can't change my model !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::FormControllerImpl::setModel : invalid call, can't change my model !"); } //------------------------------------------------------------------ Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL SbaExternalSourceBrowser::FormControllerImpl::getModel(void) throw( RuntimeException ) { - OSL_ASSERT("SbaExternalSourceBrowser::FormControllerImpl::getModel : don't (and won't) have a model !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::FormControllerImpl::getModel : don't (and won't) have a model !"); if (m_pOwner->m_pDataSourceImpl) return Reference< ::com::sun::star::awt::XTabControllerModel > ((Reference< XInterface > )*m_pOwner->m_pDataSourceImpl, UNO_QUERY); @@ -698,7 +697,7 @@ Reference< ::com::sun::star::awt::XTabControllerModel > SAL_CALL SbaExternalSou //------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::FormControllerImpl::setContainer(const Reference< ::com::sun::star::awt::XControlContainer > & _Container) throw( RuntimeException ) { - OSL_ASSERT("SbaExternalSourceBrowser::FormControllerImpl::setContainer : invalid call, can't change my container !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::FormControllerImpl::setContainer : invalid call, can't change my container !"); } //------------------------------------------------------------------ @@ -723,13 +722,13 @@ Sequence< Reference< ::com::sun::star::awt::XControl > > SAL_CALL SbaExternalSou //------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::FormControllerImpl::autoTabOrder(void) throw( RuntimeException ) { - OSL_ASSERT("SbaExternalSourceBrowser::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::FormControllerImpl::autoTabOrder : nothing to do (always have only one control) !"); } //------------------------------------------------------------------ void SAL_CALL SbaExternalSourceBrowser::FormControllerImpl::activateTabOrder(void) throw( RuntimeException ) { - OSL_ASSERT("SbaExternalSourceBrowser::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !"); + OSL_ENSURE(sal_False, "SbaExternalSourceBrowser::FormControllerImpl::activateTabOrder : nothing to do (always have only one control) !"); } //------------------------------------------------------------------ diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 2e24212afe87..35943cbb3941 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unodatbr.cxx,v $ * - * $Revision: 1.49 $ + * $Revision: 1.50 $ * - * last change: $Author: fs $ $Date: 2001-04-03 08:16:53 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -790,7 +790,7 @@ void SbaTableQueryBrowser::propertyChange(const PropertyChangeEvent& evt) } catch(Exception&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "SbaTableQueryBrowser::propertyChange: caught an exception!"); } } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index f8306e0d8972..ca3e4e979e94 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FieldDescControl.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-03-22 07:57:36 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:39 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1841,7 +1841,7 @@ void OFieldDescControl::DisplayData(OFieldDescription* pFieldDescr ) if( pNumType ) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OFieldDescControl::DisplayData: invalid num type!"); } if( pLength ) diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx index 97db8bf13041..563178b527cf 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.cxx +++ b/dbaccess/source/ui/dlg/AdabasStat.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AdabasStat.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-03-30 11:49:33 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -219,7 +219,7 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, { ::comphelper::disposeComponent(xRes); ::comphelper::disposeComponent(xStmt); - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OAdabasStatistics::OAdabasStatistics: caught an exception!"); } m_ET_SYSDEVSPACE.SetSpecialReadOnly(sal_True); m_ET_TRANSACTIONLOG.SetSpecialReadOnly(sal_True); diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx index c74af4972fae..86bc29202db8 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.cxx +++ b/dbaccess/source/ui/dlg/RelationDlg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RelationDlg.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-03-20 08:46:15 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -755,7 +755,7 @@ IMPL_LINK( ORelationDialog, OKClickHdl, Button*, pButton ) } catch(Exception&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "ORelationDialog, OKClickHdl: caught an exception!"); } m_bTriedOneUpdate = TRUE; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 44b1223b3097..c67c9d078c08 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TokenWriter.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: fs $ $Date: 2001-03-29 13:34:30 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -315,7 +315,7 @@ void ODatabaseImportExport::initialize() m_xResultSetMetaData = Reference<XResultSetMetaDataSupplier>(m_xRow,UNO_QUERY)->getMetaData(); } else - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "ODatabaseImportExport::initialize: could not instantiate a rowset!"); } catch(Exception& ) { @@ -823,7 +823,7 @@ void OHTMLImportExport::WriteTables() } catch ( Exception& ) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OHTMLImportExport::WriteTables: caught an exception!"); } WriteCell(pFormat[i-1],pColWidth[i-1],nHeight,pHorJustify[i-1],aValue,sHTML_tabledata); } diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d5c5073e5163..692bda054aa4 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -2,9 +2,9 @@ * * $RCSfile: UITools.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: oj $ $Date: 2001-03-22 08:04:43 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -199,7 +199,7 @@ SQLExceptionInfo createConnection( const ::rtl::OUString& _rsDataSourceName, Reference< XInteractionHandler > xHandler(_rMF->createInstance(SERVICE_SDB_INTERACTION_HANDLER), UNO_QUERY); if (!xHandler.is()) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "createConnection: could not instantiate an interaction handler!"); // ShowServiceNotAvailableError(NULL, String(SERVICE_SDB_INTERACTION_HANDLER), sal_True); // TODO: a real parent! } diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index 7f78e90e6589..9b044a68a24d 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -2,9 +2,9 @@ * * $RCSfile: WCPage.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: oj $ $Date: 2001-03-30 08:44:50 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -290,7 +290,7 @@ sal_Bool OCopyTable::LeavePage() } else if(m_eOldStyle == OCopyTableWizard::WIZARD_APPEND_DATA) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OCopyTable::LeavePage: how this?"); m_pParent->m_xSourceObject = NULL; return LeavePage(); } diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index c7cd2e692ee4..adbee242143d 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: WCopyTable.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: oj $ $Date: 2001-03-30 08:44:50 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -394,7 +394,7 @@ IMPL_LINK( OCopyTableWizard, ImplOKHdl, OKButton*, EMPTYARG ) break; default: { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OCopyTableWizard::ImplOKHdl: invalid creation style!"); } } @@ -847,7 +847,7 @@ void OCopyTableWizard::appendColumns(Reference<XColumnsSupplier>& _rxColSup,cons } else { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OCopyTableWizard::appendColumns: invalid field name!"); } } diff --git a/dbaccess/source/ui/misc/uiservices.cxx b/dbaccess/source/ui/misc/uiservices.cxx index 3db7f6619c7c..fd5b447ef5ca 100644 --- a/dbaccess/source/ui/misc/uiservices.cxx +++ b/dbaccess/source/ui/misc/uiservices.cxx @@ -2,9 +2,9 @@ * * $RCSfile: uiservices.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-02-28 10:11:33 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:15:03 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -139,7 +139,7 @@ extern "C" sal_Bool SAL_CALL component_writeInfo( } catch (InvalidRegistryException& ) { - OSL_ASSERT("DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); + OSL_ENSURE(sal_False, "DBA::component_writeInfo : could not create a registry key ! ## InvalidRegistryException !"); } return sal_False; diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 6e2bf1545071..75691062a265 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -2,9 +2,9 @@ * * $RCSfile: querycontroller.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: oj $ $Date: 2001-04-02 10:18:20 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:14:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -761,7 +761,7 @@ void SAL_CALL OQueryController::initialize( const Sequence< Any >& aArguments ) } catch(SQLException&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OQueryController::initialize: caught an exception!"); } } diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index d9a65d3b5f48..21991a088e89 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RelationController.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-04-03 08:40:28 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:14:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -439,7 +439,7 @@ void SAL_CALL ORelationController::initialize( const Sequence< Any >& aArguments } catch(SQLException&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "ORelationController::initialize: caught an exception!"); } } @@ -675,7 +675,7 @@ OTableWindowData* ORelationController::createTableWindowData() // } // else // { -// OSL_ASSERT(0); +// OSL_ENSURE(sal_False, 0); // } // // } @@ -687,7 +687,7 @@ OTableWindowData* ORelationController::createTableWindowData() // } // catch(Exception&) // { -// OSL_ASSERT(0); +// OSL_ENSURE(sal_False, 0); // } //} // ----------------------------------------------------------------------------- @@ -805,7 +805,7 @@ OTableWindowData* ORelationController::createTableWindowData() // } // else // { -// OSL_ASSERT(0); +// OSL_ENSURE(sal_False, 0); // } // } // } diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index f4c4228b761b..a503ea80638b 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TEditControl.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: oj $ $Date: 2001-04-02 09:54:18 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:14:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1106,7 +1106,7 @@ void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const OTypeInfo* _ SwitchType( _pTypeInfo ); break; default: - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableEditorCtrl::SetData: invalid column!"); } SetControlText(nRow,nColId,_pTypeInfo ? _pTypeInfo->aUIName : ::rtl::OUString()); } @@ -1133,7 +1133,7 @@ void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const String& _rNe break; case FIELD_TYPE: - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableEditorCtrl::SetData: invalid column!"); break; case FIELD_DESCR: @@ -1155,7 +1155,7 @@ void OTableEditorCtrl::SetData( long nRow, sal_uInt16 nColId, const String& _rNe case FIELD_PROPERTY_NUMTYPE: // pFieldDescr->SetNumType( _rNewData ); - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableEditorCtrl::SetData: invalid column!"); break; case FIELD_PROPERTY_AUTOINC: @@ -1217,7 +1217,7 @@ String OTableEditorCtrl::GetData( long nRow, sal_uInt16 nColId ) return String::CreateFromInt32(pFieldDescr->GetPrecision()); case FIELD_PROPERTY_NUMTYPE: - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableEditorCtrl::GetData: invalid column!"); // return pFieldDescr->GetNumType(); case FIELD_PROPERTY_AUTOINC: diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 06dd2ad0a612..01ed9ff62a42 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -2,9 +2,9 @@ * * $RCSfile: TableController.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: fs $ $Date: 2001-04-03 08:45:36 $ + * last change: $Author: fs $ $Date: 2001-04-03 14:14:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -670,7 +670,7 @@ void SAL_CALL OTableController::initialize( const Sequence< Any >& aArguments ) } catch(SQLException&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableController::initialize: caught an exception!"); } } // ----------------------------------------------------------------------------- @@ -1021,7 +1021,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_ } else { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableController::appendColumns: invalid field name!"); } } @@ -1033,7 +1033,7 @@ void OTableController::appendColumns(Reference<XColumnsSupplier>& _rxColSup,sal_ } catch(Exception&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableController::appendColumns: caught an exception!"); } } // ----------------------------------------------------------------------------- @@ -1069,7 +1069,7 @@ void OTableController::appendKey(Reference<XKeysSupplier>& _rxSup) } catch(Exception&) { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableController::appendKey: caught an exception!"); } } // ----------------------------------------------------------------------------- @@ -1399,7 +1399,7 @@ void OTableController::alterColumns() } else { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableController::alterColumns: invalid column!"); } } else if(xColumnFactory.is() && xAlter.is() && nPos < nColumnCount) @@ -1422,7 +1422,7 @@ void OTableController::alterColumns() } else { - OSL_ASSERT(0); + OSL_ENSURE(sal_False, "OTableController::alterColumns: invalid column (2)!"); } } else |