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 | 91697b75c337dcab54d56efb6e24701147900676 (patch) | |
tree | f966cbebd749de514bc4c03d47d9bbf94a8402f3 /dbaccess/source/ui/browser | |
parent | 899053f93c31824c82d48ed051aa1886d5ac751f (diff) |
fix assertions
Diffstat (limited to 'dbaccess/source/ui/browser')
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 14 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/dsbrowserDnD.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/formadapter.cxx | 8 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/genericcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 16 |
7 files changed, 25 insertions, 25 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index e96fc00a308e..ab8884031861 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 0cbc6b5ae91e..76fa37d62bf8 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 39133f2bed88..3baafb3e860f 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 0a3abc7615d1..1d72cb229de3 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 e462d3e6955a..99076519c5ef 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 66058ce54f68..9e39ac173874 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 133baa6257a7..77a297ce00b8 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 } |