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 | |
parent | 899053f93c31824c82d48ed051aa1886d5ac751f (diff) |
fix assertions
Diffstat (limited to 'dbaccess/source/ui')
28 files changed, 67 insertions, 67 deletions
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx index aec064898d3f..639d74115353 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 050b1d1fe1fd..3974fd68f4bf 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 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 } diff --git a/dbaccess/source/ui/control/charsetlistbox.cxx b/dbaccess/source/ui/control/charsetlistbox.cxx index 1d7075357303..040e1fd41242 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 c2f505b7a391..4946c8a8bf10 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 614ba74957a5..9dd0a24ebbbf 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 51582e1fdcf6..51838459da45 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 9c7504d0eb5d..6a067dbbfafc 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 5ab0be4af4c4..f64231b60dc2 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 719e262d9741..17843bd898a4 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 6d6f898093f2..4294d5e5b96e 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 96c9d8d6cab6..1b48dab42801 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 1062c735c044..18eab7138f2e 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 c2187756e54f..f9769f541153 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 0920bb8b5fa3..5ba79c16e661 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 2c66efcefe53..cf04d792d241 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 73b26fc09a1a..d6e373cc6639 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 a71b79dddda4..ccfda77a5b0e 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 6e302825fdda..213a198e41bb 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 1f0b56904c7d..726f4680c9a1 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 a16b288bcca1..ea2610498581 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 48ae96c47928..e3c41b1846f7 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 ); |