diff options
Diffstat (limited to 'dbaccess/source/ui/dlg')
-rw-r--r-- | dbaccess/source/ui/dlg/AdabasStat.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 31 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbfindex.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/finteraction.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/indexdialog.cxx | 27 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/paramdialog.cxx | 16 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/queryfilter.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/sqlmessage.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/tablespage.cxx | 9 |
13 files changed, 67 insertions, 59 deletions
diff --git a/dbaccess/source/ui/dlg/AdabasStat.cxx b/dbaccess/source/ui/dlg/AdabasStat.cxx index 59b453d80fcc..26f6d9537086 100644 --- a/dbaccess/source/ui/dlg/AdabasStat.cxx +++ b/dbaccess/source/ui/dlg/AdabasStat.cxx @@ -29,9 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_dbaccess.hxx" -#include <tools/debug.hxx> #include <cppuhelper/exc_hlp.hxx> #include <tools/diagnose_ex.h> +#include <osl/diagnose.h> #include "AdabasStat.hxx" #include <comphelper/types.hxx> #include <com/sun/star/sdbc/XStatement.hpp> @@ -84,7 +84,7 @@ OAdabasStatistics::OAdabasStatistics( Window* pParent, FreeResource(); - DBG_ASSERT(m_xConnection.is(),"No connection"); + OSL_ENSURE(m_xConnection.is(),"No connection"); if(m_xConnection.is()) { Reference<XStatement> xStmt; diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index d9e52edeaa1b..f3272593a4ac 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -45,6 +45,7 @@ #include "dbaccess_helpid.hrc" #include "localresaccess.hxx" #include <osl/process.h> +#include <osl/diagnose.h> #include <vcl/msgbox.hxx> #include <sfx2/filedlghelper.hxx> #include "dbadmin.hxx" @@ -119,7 +120,7 @@ DBG_NAME(OConnectionHelper) if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); m_aPB_Connection.SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections)); - DBG_ASSERT(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "OConnectionHelper::OConnectionHelper : really need a DSN type collection !"); m_aConnectionURL.SetTypeCollection(m_pCollection); } @@ -438,7 +439,7 @@ DBG_NAME(OConnectionHelper) void OConnectionHelper::impl_setURL( const String& _rURL, sal_Bool _bPrefix ) { String sURL( _rURL ); - DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" ); + OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_setURL: have no interpreter for the URLs!" ); if ( m_pCollection && sURL.Len() ) { @@ -484,7 +485,7 @@ DBG_NAME(OConnectionHelper) // get the pure text String sURL = _bPrefix ? m_aConnectionURL.GetText() : m_aConnectionURL.GetTextNoPrefix(); - DBG_ASSERT( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" ); + OSL_ENSURE( m_pCollection, "OConnectionHelper::impl_getURL: have no interpreter for the URLs!" ); if ( m_pCollection && sURL.Len() ) { diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index dbb348fe1cb2..9d16da80cb26 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -66,6 +66,7 @@ #include <unotools/pathoptions.hxx> #include <svtools/roadmapwizard.hxx> #include "TextConnectionHelper.hxx" +#include <osl/diagnose.h> //......................................................................... @@ -202,7 +203,7 @@ DBG_NAME(OTextConnectionPageSetup) ::dbaccess::ODsnTypeCollection* pCollection = NULL; if (pCollectionItem) pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !"); + OSL_ENSURE(pCollection, "OLDAPConnectionPageSetup::FillItemSet : really need a DSN type collection !"); String sUrl = pCollection->getPrefix( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdbc:address:ldap:"))); sUrl += m_aETHostServer.GetText(); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 83e42119c1e5..b1d6ae683a5e 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -76,6 +76,7 @@ #include <svl/stritem.hxx> #include <tools/urlobj.hxx> #include <tools/diagnose_ex.h> +#include <osl/diagnose.h> #include <typelib/typedescription.hxx> #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> @@ -110,7 +111,7 @@ namespace sal_Bool bCorrectType = sal_False; SfxItemPool* pPool = _rSet.GetPool(); - DBG_ASSERT( pPool, "implCheckItemType: invalid item pool!" ); + OSL_ENSURE( pPool, "implCheckItemType: invalid item pool!" ); if ( pPool ) { const SfxPoolItem& rDefItem = pPool->GetDefaultItem( _nId ); @@ -238,12 +239,12 @@ ODbDataSourceAdministrationHelper::ODbDataSourceAdministrationHelper(const Refer ShowServiceNotAvailableError(_pParent->GetParent(), String(SERVICE_SDB_DATABASECONTEXT), sal_True); } - DBG_ASSERT(m_xDynamicContext.is(), "ODbAdminDialog::ODbAdminDialog : no XNamingService interface !"); + OSL_ENSURE(m_xDynamicContext.is(), "ODbAdminDialog::ODbAdminDialog : no XNamingService interface !"); } //------------------------------------------------------------------------- sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyValue >& _rDriverParam) { - DBG_ASSERT(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!"); + OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::getCurrentSettings : not to be called without an example set!"); if (!m_pItemSetHelper->getOutputSet()) return sal_False; @@ -356,7 +357,7 @@ sal_Bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< Propert //------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::successfullyConnected() { - DBG_ASSERT(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!"); + OSL_ENSURE(m_pItemSetHelper->getOutputSet(), "ODbDataSourceAdministrationHelper::successfullyConnected: not to be called without an example set!"); if (!m_pItemSetHelper->getOutputSet()) return; @@ -422,7 +423,7 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::O try { xDriverManager = Reference< XDriverAccess >(getORB()->createInstance(SERVICE_SDBC_CONNECTIONPOOL), UNO_QUERY); - DBG_ASSERT(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!"); + OSL_ENSURE(xDriverManager.is(), "ODbDataSourceAdministrationHelper::getDriver: could not instantiate the driver manager, or it does not provide the necessary interface!"); } catch (Exception& e) { @@ -477,16 +478,16 @@ Reference< XPropertySet > ODbDataSourceAdministrationHelper::getCurrentDataSourc } - DBG_ASSERT(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!"); + OSL_ENSURE(m_xDatasource.is(), "ODbDataSourceAdministrationHelper::getCurrentDataSource: no data source!"); return m_xDatasource; } //------------------------------------------------------------------------- ::rtl::OUString ODbDataSourceAdministrationHelper::getDatasourceType( const SfxItemSet& _rSet ) { SFX_ITEMSET_GET( _rSet, pConnectURL, SfxStringItem, DSID_CONNECTURL, sal_True ); - DBG_ASSERT( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" ); + OSL_ENSURE( pConnectURL , "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!" ); SFX_ITEMSET_GET(_rSet, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True); - DBG_ASSERT(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); + OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); return pCollection->getType(pConnectURL->GetValue()); } @@ -507,9 +508,9 @@ String ODbDataSourceAdministrationHelper::getConnectionURL() const SFX_ITEMSET_GET(*m_pItemSetHelper->getOutputSet(), pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True); OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!"); - DBG_ASSERT(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); + OSL_ENSURE(pTypeCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid items in the source set!"); ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); - DBG_ASSERT(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!"); + OSL_ENSURE(pCollection, "ODbDataSourceAdministrationHelper::getDatasourceType: invalid type collection!"); switch( pCollection->determineType(eType) ) { @@ -706,7 +707,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr //------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::translateProperties(const SfxItemSet& _rSource, const Reference< XPropertySet >& _rxDest) { - DBG_ASSERT(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!"); + OSL_ENSURE(_rxDest.is(), "ODbDataSourceAdministrationHelper::translateProperties: invalid property set!"); if (!_rxDest.is()) return; @@ -1058,7 +1059,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet TypeDescription aTD(_rValue.getValueType()); typelib_IndirectTypeDescription* pSequenceTD = reinterpret_cast< typelib_IndirectTypeDescription* >(aTD.get()); - DBG_ASSERT(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!"); + OSL_ENSURE(pSequenceTD && pSequenceTD->pType, "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid sequence type!"); Type aElementType(pSequenceTD->pType); switch (aElementType.getTypeClass()) @@ -1111,9 +1112,9 @@ void ODbDataSourceAdministrationHelper::convertUrl(SfxItemSet& _rDest) SFX_ITEMSET_GET(_rDest, pTypeCollection, DbuTypeCollectionItem, DSID_TYPECOLLECTION, sal_True); OSL_ENSURE(pUrlItem,"Connection URL is NULL. -> GPF!"); - DBG_ASSERT(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!"); + OSL_ENSURE(pTypeCollection, "ODbAdminDialog::getDatasourceType: invalid items in the source set!"); ::dbaccess::ODsnTypeCollection* pCollection = pTypeCollection->getCollection(); - DBG_ASSERT(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!"); + OSL_ENSURE(pCollection, "ODbAdminDialog::getDatasourceType: invalid type collection!"); USHORT nPortNumberId = 0; sal_Int32 nPortNumber = -1; @@ -1175,7 +1176,7 @@ sal_Bool ODbDataSourceAdministrationHelper::saveChanges(const SfxItemSet& _rSour // ----------------------------------------------------------------------------- void ODbDataSourceAdministrationHelper::setDataSourceOrName( const Any& _rDataSourceOrName ) { - DBG_ASSERT( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" ); + OSL_ENSURE( !m_aDataSourceOrName.hasValue(), "ODbDataSourceAdministrationHelper::setDataSourceOrName: already have one!" ); // hmm. We could reset m_xDatasource/m_xModel, probably, and continue working m_aDataSourceOrName = _rDataSourceOrName; } diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 432b45a3d3eb..5c71bf0bc6b3 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -36,7 +36,7 @@ #include "moduledbu.hxx" #include "dbu_dlg.hrc" #include "dbfindex.hrc" -#include <tools/debug.hxx> +#include <osl/diagnose.h> #include <unotools/localfilehelper.hxx> #include <tools/urlobj.hxx> #include <unotools/pathoptions.hxx> @@ -166,7 +166,7 @@ OTableIndex ODbaseIndexDialog::implRemoveIndex(const String& _rName, TableIndexL } (void)_bMustExist; - DBG_ASSERT(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); + OSL_ENSURE(!_bMustExist || (aSearch != _rList.end()), "ODbaseIndexDialog::implRemoveIndex : did not find the index!"); return aReturn; } diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index c09b34bb151f..75e0cc73a71d 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -92,6 +92,7 @@ #include <comphelper/namedvaluecollection.hxx> #include <comphelper/sequenceashashmap.hxx> #include <tools/diagnose_ex.h> +#include <osl/diagnose.h> #include <connectivity/DriversConfig.hxx> #include <memory> @@ -171,7 +172,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(Window* _pParent if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "ODbTypeWizDialogSetup::ODbTypeWizDialogSetup : really need a DSN type collection !"); FreeResource(); diff --git a/dbaccess/source/ui/dlg/finteraction.cxx b/dbaccess/source/ui/dlg/finteraction.cxx index aee6876e8ebc..562ebf435223 100644 --- a/dbaccess/source/ui/dlg/finteraction.cxx +++ b/dbaccess/source/ui/dlg/finteraction.cxx @@ -31,6 +31,7 @@ #include "finteraction.hxx" #include <tools/debug.hxx> +#include <osl/diagnose.h> #include <com/sun/star/ucb/InteractiveIOException.hpp> //........................................................................ @@ -51,7 +52,7 @@ namespace dbaui ,m_bDoesNotExist(sal_False) { DBG_CTOR( OFilePickerInteractionHandler, NULL ); - DBG_ASSERT( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); + OSL_ENSURE( m_xMaster.is(), "OFilePickerInteractionHandler::OFilePickerInteractionHandler: invalid master handler!" ); } //-------------------------------------------------------------------- diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 1c164b0de875..311bea0cc1ad 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -52,6 +52,7 @@ #include "UITools.hxx" #include <comphelper/processfactory.hxx> #include <unotools/confignode.hxx> +#include <osl/diagnose.h> //......................................................................... namespace dbaui @@ -100,7 +101,7 @@ namespace dbaui DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rItems.GetItem(DSID_TYPECOLLECTION)); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); - DBG_ASSERT(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !"); + OSL_ENSURE(m_pCollection, "OGeneralPage::OGeneralPage : really need a DSN type collection !"); // If no driver for embedded DBs is installed, and no dBase driver, then hide the "Create new database" option sal_Int32 nCreateNewDBIndex = m_pCollection->getIndexOf( m_pCollection->getEmbeddedDatabase() ); @@ -360,8 +361,8 @@ namespace dbaui // collect some items and some values SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True); SFX_ITEMSET_GET(_rSet, pUrlItem, SfxStringItem, DSID_CONNECTURL, sal_True); - DBG_ASSERT(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !"); - DBG_ASSERT(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !"); + OSL_ENSURE(pUrlItem, "OGeneralPage::implInitControls : missing the type attribute !"); + OSL_ENSURE(pNameItem, "OGeneralPage::implInitControls : missing the type attribute !"); sName = pNameItem->GetValue(); sConnectURL = pUrlItem->GetValue(); } diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 9d7a1a2759c3..1b0a647e0f06 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -41,6 +41,7 @@ #include <svtools/imgdef.hxx> #include "browserids.hxx" #include <connectivity/dbtools.hxx> +#include <osl/diagnose.h> //...................................................................... namespace dbaui { @@ -145,14 +146,14 @@ namespace dbaui //------------------------------------------------------------------ void DbaIndexList::enableSelectHandler() { - DBG_ASSERT(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); + OSL_ENSURE(m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); m_bSuspendSelectHdl = sal_False; } //------------------------------------------------------------------ void DbaIndexList::disableSelectHandler() { - DBG_ASSERT(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); + OSL_ENSURE(!m_bSuspendSelectHdl, "DbaIndexList::enableSelectHandler: invalid call (this is not cumulative)!"); m_bSuspendSelectHdl = sal_True; } @@ -340,7 +341,7 @@ DBG_NAME(DbaIndexDialog) //------------------------------------------------------------------ sal_Bool DbaIndexDialog::implCommit(SvLBoxEntry* _pEntry) { - DBG_ASSERT(_pEntry, "DbaIndexDialog::implCommit: invalid entry!"); + OSL_ENSURE(_pEntry, "DbaIndexDialog::implCommit: invalid entry!"); Indexes::iterator aCommitPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); @@ -408,7 +409,7 @@ DBG_NAME(DbaIndexDialog) for (SvLBoxEntry* pAdjust = m_aIndexes.First(); pAdjust; pAdjust = m_aIndexes.Next(pAdjust)) { Indexes::iterator aAfterInsertPos = m_pIndexes->find(m_aIndexes.GetEntryText(pAdjust)); - DBG_ASSERT(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!"); + OSL_ENSURE(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!"); pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterInsertPos - m_pIndexes->begin()))); } @@ -424,7 +425,7 @@ DBG_NAME(DbaIndexDialog) { // the selected index SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected, "DbaIndexDialog::OnDropIndex: invalid call!"); + OSL_ENSURE(pSelected, "DbaIndexDialog::OnDropIndex: invalid call!"); if (pSelected) { // let the user confirm the drop @@ -450,7 +451,7 @@ DBG_NAME(DbaIndexDialog) { // do the drop Indexes::iterator aDropPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); - DBG_ASSERT(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!"); + OSL_ENSURE(aDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: did not find the index in my collection!"); SQLExceptionInfo aExceptionInfo; sal_Bool bSuccess = sal_False; @@ -480,7 +481,7 @@ DBG_NAME(DbaIndexDialog) for (SvLBoxEntry* pAdjust = m_aIndexes.First(); pAdjust; pAdjust = m_aIndexes.Next(pAdjust)) { Indexes::iterator aAfterDropPos = m_pIndexes->find(m_aIndexes.GetEntryText(pAdjust)); - DBG_ASSERT(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!"); + OSL_ENSURE(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!"); pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterDropPos - m_pIndexes->begin()))); } @@ -501,7 +502,7 @@ DBG_NAME(DbaIndexDialog) { // the selected index SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected, "DbaIndexDialog::OnRenameIndex: invalid call!"); + OSL_ENSURE(pSelected, "DbaIndexDialog::OnRenameIndex: invalid call!"); // save the changes made 'til here // Upon leaving the edit mode, the control will be re-initialized with the @@ -530,7 +531,7 @@ DBG_NAME(DbaIndexDialog) { // the selected index SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected, "DbaIndexDialog::OnResetIndex: invalid call!"); + OSL_ENSURE(pSelected, "DbaIndexDialog::OnResetIndex: invalid call!"); Indexes::iterator aResetPos = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(pSelected->GetUserData()); @@ -588,7 +589,7 @@ DBG_NAME(DbaIndexDialog) { if (m_aIndexes.IsEditingActive()) { - DBG_ASSERT(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!"); + OSL_ENSURE(!m_bEditAgain, "DbaIndexDialog::OnCloseDialog: somebody was faster than hell!"); // this means somebody entered a new name, which was invalid, which cause us to posted us an event, // and before the event arrived the user clicked onto "close". VERY fast, this user .... m_aIndexes.EndEditing(sal_False); @@ -599,7 +600,7 @@ DBG_NAME(DbaIndexDialog) // the currently selected entry const SvLBoxEntry* pSelected = m_aIndexes.FirstSelected(); - DBG_ASSERT(pSelected == m_pPreviousSelection, "DbaIndexDialog::OnCloseDialog: inconsistence!"); + OSL_ENSURE(pSelected == m_pPreviousSelection, "DbaIndexDialog::OnCloseDialog: inconsistence!"); sal_Int32 nResponse = RET_NO; if (pSelected) @@ -644,7 +645,7 @@ DBG_NAME(DbaIndexDialog) { Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(_pEntry->GetUserData()); - DBG_ASSERT(aPosition >= m_pIndexes->begin() && aPosition < m_pIndexes->end(), + OSL_ENSURE(aPosition >= m_pIndexes->begin() && aPosition < m_pIndexes->end(), "DbaIndexDialog::OnEntryEdited: invalid entry!"); String sNewName = m_aIndexes.GetEntryText(_pEntry); @@ -768,7 +769,7 @@ DBG_NAME(DbaIndexDialog) //------------------------------------------------------------------ IMPL_LINK( DbaIndexDialog, OnModified, void*, /*NOTINTERESTEDIN*/ ) { - DBG_ASSERT(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!"); + OSL_ENSURE(m_pPreviousSelection, "DbaIndexDialog, OnModified: invalid call!"); Indexes::iterator aPosition = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData()); aPosition->setModified(sal_True); diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx index 21023208a4d7..dd5817c88f58 100644 --- a/dbaccess/source/ui/dlg/paramdialog.cxx +++ b/dbaccess/source/ui/dlg/paramdialog.cxx @@ -40,7 +40,7 @@ #include "dbustrings.hrc" #include <vcl/svapp.hxx> #include <vcl/msgbox.hxx> -#include <tools/debug.hxx> +#include <osl/diagnose.h> #include <tools/diagnose_ex.h> #include "localresaccess.hxx" #include <unotools/syslocale.hxx> @@ -105,7 +105,7 @@ DBG_NAME(OParameterDialog) m_xFormatter->attachNumberFormatsSupplier(xNumberFormats); try { - DBG_ASSERT(rParamContainer->getCount(), "OParameterDialog::OParameterDialog : can't handle empty containers !"); + OSL_ENSURE(rParamContainer->getCount(), "OParameterDialog::OParameterDialog : can't handle empty containers !"); m_aFinalValues.realloc(rParamContainer->getCount()); PropertyValue* pValues = m_aFinalValues.getArray(); @@ -298,7 +298,7 @@ DBG_NAME(OParameterDialog) { sal_uInt16 nCurrent = m_aAllParams.GetSelectEntryPos(); sal_uInt16 nCount = m_aAllParams.GetEntryCount(); - DBG_ASSERT(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !"); + OSL_ENSURE(nCount == m_aVisitedParams.size(), "OParameterDialog::OnButtonClicked : inconsistent lists !"); // search the next entry in list we haven't visited yet sal_uInt16 nNext = (nCurrent + 1) % nCount; @@ -343,13 +343,13 @@ DBG_NAME(OParameterDialog) // initialize the controls with the new values sal_uInt16 nSelected = m_aAllParams.GetSelectEntryPos(); - DBG_ASSERT(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !"); + OSL_ENSURE(nSelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnEntrySelected : no current entry !"); m_aParam.SetText(::comphelper::getString(m_aFinalValues[nSelected].Value)); m_nCurrentlySelected = nSelected; // with this the value isn't dirty - DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !"); + OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnEntrySelected : invalid current entry !"); m_aVisitedParams[m_nCurrentlySelected] &= ~EF_DIRTY; m_aResetVisitFlag.SetTimeout(1000); @@ -361,10 +361,10 @@ DBG_NAME(OParameterDialog) //------------------------------------------------------------------------------ IMPL_LINK(OParameterDialog, OnVisitedTimeout, Timer*, /*pTimer*/) { - DBG_ASSERT(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !"); + OSL_ENSURE(m_nCurrentlySelected != LISTBOX_ENTRY_NOTFOUND, "OParameterDialog::OnVisitedTimeout : invalid call !"); // mark the currently selected entry as visited - DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !"); + OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnVisitedTimeout : invalid entry !"); m_aVisitedParams[m_nCurrentlySelected] |= EF_VISITED; // was it the last "not visited yet" entry ? @@ -411,7 +411,7 @@ DBG_NAME(OParameterDialog) IMPL_LINK(OParameterDialog, OnValueModified, Control*, /*pBox*/) { // mark the currently selected entry as dirty - DBG_ASSERT(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); + OSL_ENSURE(m_nCurrentlySelected < m_aVisitedParams.size(), "OParameterDialog::OnValueModified : invalid entry !"); m_aVisitedParams[m_nCurrentlySelected] |= EF_DIRTY; m_bNeedErrorOnCurrent = sal_True; diff --git a/dbaccess/source/ui/dlg/queryfilter.cxx b/dbaccess/source/ui/dlg/queryfilter.cxx index 98e54ca522f5..9107f34e3911 100644 --- a/dbaccess/source/ui/dlg/queryfilter.cxx +++ b/dbaccess/source/ui/dlg/queryfilter.cxx @@ -42,9 +42,8 @@ #include <com/sun/star/sdbc/XRow.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/container/XNameAccess.hpp> -#include <tools/debug.hxx> -#include <tools/diagnose_ex.h> #include <tools/diagnose_ex.h> +#include <osl/diagnose.h> #include "moduledbu.hxx" #include <connectivity/sqliterator.hxx> #include <connectivity/dbtools.hxx> @@ -465,7 +464,7 @@ Reference< XPropertySet > DlgFilterCrit::getMatchingColumn( const Edit& _rValueI //------------------------------------------------------------------------------ IMPL_LINK( DlgFilterCrit, PredicateLoseFocus, Edit*, _pField ) { - DBG_ASSERT( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" ); + OSL_ENSURE( _pField, "DlgFilterCrit::PredicateLoseFocus: invalid event source!" ); if ( _pField ) { // retrieve the field affected @@ -754,7 +753,7 @@ IMPL_LINK( DlgFilterCrit, ListSelectHdl, ListBox *, pListBox ) } else { - DBG_ASSERT(0,"DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!"); + OSL_ENSURE(0,"DlgFilterCrit::ListSelectHdl: Diese Column d�rfte garnicht vorhanden sein!"); } } pComp->SelectEntryPos(0); diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx index 2299c82f8425..db55c80da176 100644 --- a/dbaccess/source/ui/dlg/sqlmessage.cxx +++ b/dbaccess/source/ui/dlg/sqlmessage.cxx @@ -35,6 +35,7 @@ #include <com/sun/star/sdbc/SQLException.hpp> #include <com/sun/star/sdb/SQLContext.hpp> #include <vcl/fixed.hxx> +#include <osl/diagnose.h> #include <svtools/svtreebx.hxx> #include <svtools/svmedit.hxx> #include <connectivity/dbexception.hxx> @@ -259,7 +260,7 @@ namespace iter.next( aCurrentElement ); const SQLException* pCurrentError = (const SQLException*)aCurrentElement; - DBG_ASSERT( pCurrentError, "lcl_buildExceptionChain: iterator failure!" ); + OSL_ENSURE( pCurrentError, "lcl_buildExceptionChain: iterator failure!" ); // hasMoreElements should not have returned <TRUE/> in this case ExceptionDisplayInfo aDisplayInfo( aCurrentElement.getType() ); @@ -399,7 +400,7 @@ OExceptionChainDialog::~OExceptionChainDialog() IMPL_LINK(OExceptionChainDialog, OnExceptionSelected, void*, EMPTYARG) { SvLBoxEntry* pSelected = m_aExceptionList.FirstSelected(); - DBG_ASSERT(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?"); + OSL_ENSURE(!pSelected || !m_aExceptionList.NextSelected(pSelected), "OExceptionChainDialog::OnExceptionSelected : multi selection ?"); String sText; diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 46894150bfed..45e2f7ca6fe6 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -55,6 +55,7 @@ #include "dbaccess_helpid.hrc" #include "UITools.hxx" #include <osl/mutex.hxx> +#include <osl/diagnose.h> #include <svtools/imgdef.hxx> #include "TablesSingleDlg.hxx" #include <tools/diagnose_ex.h> @@ -256,7 +257,7 @@ DBG_NAME(OTableSubscriptionPage) // get the name of the data source we're working for SFX_ITEMSET_GET(_rSet, pNameItem, SfxStringItem, DSID_NAME, sal_True); - DBG_ASSERT(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!"); + OSL_ENSURE(pNameItem, "OTableSubscriptionPage::implInitControls: missing the name attribute!"); String sDSName = pNameItem->GetValue(); if (bValid && sDSName.Len() && !m_xCurrentConnection.is() ) @@ -264,7 +265,7 @@ DBG_NAME(OTableSubscriptionPage) // the PropertyValues for the current dialog settings Sequence< PropertyValue > aConnectionParams; - DBG_ASSERT(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!"); + OSL_ENSURE(m_pTablesDlg, "OTableSubscriptionPage::implInitControls: need a parent dialog doing the translation!"); if ( m_pTablesDlg ) { if (!m_pTablesDlg->getCurrentSettings(aConnectionParams)) @@ -446,11 +447,11 @@ DBG_NAME(OTableSubscriptionPage) { SvLBoxEntry* pLHS = static_cast<SvLBoxEntry*>(_pSortData->pLeft); SvLBoxEntry* pRHS = static_cast<SvLBoxEntry*>(_pSortData->pRight); - DBG_ASSERT(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); + OSL_ENSURE(pLHS && pRHS, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid tree entries!"); SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); - DBG_ASSERT(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!"); + OSL_ENSURE(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!"); String sLeftText = pLeftTextItem->GetText(); String sRightText = pRightTextItem->GetText(); |