[Libreoffice-commits] .: 2 commits - dbaccess/source reportdesign/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Thu Feb 24 09:31:30 PST 2011


 dbaccess/source/core/api/RowSet.cxx                     |    2 -
 dbaccess/source/core/api/RowSetBase.cxx                 |    2 -
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx  |    6 ++---
 dbaccess/source/core/api/TableDeco.cxx                  |    2 -
 dbaccess/source/core/api/column.cxx                     |    2 -
 dbaccess/source/core/api/query.cxx                      |    2 -
 dbaccess/source/core/api/querycontainer.cxx             |    2 -
 dbaccess/source/core/api/resultset.cxx                  |    2 -
 dbaccess/source/core/dataaccess/ContentHelper.cxx       |    4 +--
 dbaccess/source/core/dataaccess/bookmarkcontainer.cxx   |    2 -
 dbaccess/source/core/dataaccess/databasedocument.cxx    |    6 ++---
 dbaccess/source/core/dataaccess/datasource.cxx          |   12 +++++-----
 dbaccess/source/core/dataaccess/definitioncontainer.cxx |    2 -
 dbaccess/source/core/dataaccess/documentdefinition.cxx  |    8 +++----
 dbaccess/source/core/misc/dsntypes.cxx                  |    4 +--
 dbaccess/source/filter/xml/xmlStyleImport.cxx           |    2 -
 dbaccess/source/filter/xml/xmlfilter.cxx                |    2 -
 dbaccess/source/ui/app/AppController.cxx                |    6 ++---
 dbaccess/source/ui/app/AppControllerDnD.cxx             |    6 ++---
 dbaccess/source/ui/browser/brwctrlr.cxx                 |   14 ++++++------
 dbaccess/source/ui/browser/dsEntriesNoExp.cxx           |    4 +--
 dbaccess/source/ui/browser/dsbrowserDnD.cxx             |    2 -
 dbaccess/source/ui/browser/formadapter.cxx              |    8 +++----
 dbaccess/source/ui/browser/genericcontroller.cxx        |    2 -
 dbaccess/source/ui/browser/sbagrid.cxx                  |    4 +--
 dbaccess/source/ui/browser/unodatbr.cxx                 |   16 +++++++-------
 dbaccess/source/ui/control/charsetlistbox.cxx           |    4 +--
 dbaccess/source/ui/control/dbtreelistbox.cxx            |    2 -
 dbaccess/source/ui/control/tabletree.cxx                |    2 -
 dbaccess/source/ui/dlg/ConnectionHelper.cxx             |    2 -
 dbaccess/source/ui/dlg/DbAdminImpl.cxx                  |   14 ++++++------
 dbaccess/source/ui/dlg/advancedsettings.cxx             |    2 -
 dbaccess/source/ui/dlg/dbwizsetup.cxx                   |    4 +--
 dbaccess/source/ui/dlg/dlgattr.cxx                      |    2 -
 dbaccess/source/ui/dlg/indexdialog.cxx                  |    2 -
 dbaccess/source/ui/dlg/paramdialog.cxx                  |    2 -
 dbaccess/source/ui/dlg/queryfilter.cxx                  |    2 -
 dbaccess/source/ui/dlg/sqlmessage.cxx                   |    2 -
 dbaccess/source/ui/dlg/tablespage.cxx                   |    2 -
 dbaccess/source/ui/misc/TableCopyHelper.cxx             |    2 -
 dbaccess/source/ui/querydesign/QueryDesignView.cxx      |    4 +--
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx   |    2 -
 reportdesign/source/core/sdr/UndoEnv.cxx                |    4 +--
 reportdesign/source/filter/xml/xmlStyleImport.cxx       |    6 ++---
 reportdesign/source/filter/xml/xmlfilter.cxx            |   18 ++++++++--------
 reportdesign/source/ui/dlg/dlgpage.cxx                  |    2 -
 reportdesign/source/ui/inspection/GeometryHandler.cxx   |    2 -
 reportdesign/source/ui/misc/FunctionHelper.cxx          |    2 -
 reportdesign/source/ui/report/propbrw.cxx               |    8 +++----
 49 files changed, 108 insertions(+), 108 deletions(-)

New commits:
commit a66fec7123aa82cf441066cf91e0e287450f0784
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Feb 24 18:26:34 2011 +0100

    Move DBG_ERROR -> OSL_ASSERT

diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index ff50e3f..c042e91 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1483,7 +1483,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
     }
     catch(Exception&)
     {
-        DBG_ERROR("ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!");
+        OSL_ASSERT("ORowSet::executeWithCompletion: caught an unexpected exception type while filling in the parameters!");
     }
 
     // we're done with the parameters, now for the real execution
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 9f9df1e..d8deb84 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -1085,7 +1085,7 @@ sal_Bool SAL_CALL ORowSetBase::previous(  ) throw(SQLException, RuntimeException
         }
         else
         {
-            DBG_ERROR( "ORowSetBase::previous: inconsistency!" );
+            OSL_ASSERT( "ORowSetBase::previous: inconsistency!" );
                 // we should never reach this place, as we should not get into this whole branch if m_bBeforeFirst
                 // was |true| from the beginning
             movementFailed();
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 80138ee..23473fe 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -626,7 +626,7 @@ void SAL_CALL OSingleSelectQueryComposer::setElementaryQuery( const ::rtl::OUStr
     catch( const Exception& e )
     {
         (void)e;
-        DBG_ERROR( "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
+        OSL_ASSERT( "OSingleSelectQueryComposer::setElementaryQuery: there should be no error anymore for the additive statement!" );
         // every part of the additive statement should have passed other tests already, and should not
         // be able to cause any errors ... me thinks
     }
@@ -704,7 +704,7 @@ void OSingleSelectQueryComposer::setSingleAdditiveClause( SQLPart _ePart, const
     catch( const Exception& e )
     {
         (void)e;
-        DBG_ERROR( "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" );
+        OSL_ASSERT( "OSingleSelectQueryComposer::setSingleAdditiveClause: there should be no error anymore for the additive statement!" );
         // every part of the additive statement should have passed other tests already, and should not
         // be able to cause any errors ... me thinks
     }
@@ -1016,7 +1016,7 @@ sal_Bool OSingleSelectQueryComposer::setANDCriteria( OSQLParseNode * pCondition,
     if (SQL_ISRULE(pCondition,boolean_primary))
     {
         // this should not occur
-        DBG_ERROR("boolean_primary in And-Criteria");
+        OSL_ASSERT("boolean_primary in And-Criteria");
         return sal_False;
     }
     // Das erste Element ist (wieder) eine AND-Verknuepfung
diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index e7f9a0c..171d850 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -561,7 +561,7 @@ void ODBTableDecorator::fillPrivileges() const
     catch(const SQLException& e)
     {
         (void)e;
-        DBG_ERROR("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !");
+        OSL_ASSERT("ODBTableDecorator::ODBTableDecorator : could not collect the privileges !");
     }
 }
 
diff --git a/dbaccess/source/core/api/column.cxx b/dbaccess/source/core/api/column.cxx
index 73a397e..9a69b89 100644
--- a/dbaccess/source/core/api/column.cxx
+++ b/dbaccess/source/core/api/column.cxx
@@ -147,7 +147,7 @@ void SAL_CALL OColumn::setName( const ::rtl::OUString& _rName ) throw(::com::sun
 
 void OColumn::fireValueChange(const ::connectivity::ORowSetValue& /*_rOldValue*/)
 {
-    DBG_ERROR( "OColumn::fireValueChange: not implemented!" );
+    OSL_ASSERT( "OColumn::fireValueChange: not implemented!" );
 }
 
 void OColumn::registerProperty( const ::rtl::OUString& _rName, sal_Int32 _nHandle, sal_Int32 _nAttributes, void* _pPointerToMember, const Type& _rMemberType )
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 0a79bdb..32d599f 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -258,7 +258,7 @@ void SAL_CALL OQuery::propertyChange( const PropertyChangeEvent& _rSource ) thro
         }
         else
         {
-            DBG_ERROR("OQuery::propertyChange : my CommandDefinition has more properties than I do !");
+            OSL_ASSERT("OQuery::propertyChange : my CommandDefinition has more properties than I do !");
         }
     }
 
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index dc24490..1f8ec3c 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -318,7 +318,7 @@ void SAL_CALL OQueryContainer::disposing( const ::com::sun::star::lang::EventObj
 {
     if (_rSource.Source.get() == Reference< XInterface >(m_xCommandDefinitions, UNO_QUERY).get())
     {	// our "master container" (with the command definitions) is being disposed
-        DBG_ERROR("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !");
+        OSL_ASSERT("OQueryContainer::disposing : nobody should dispose the CommandDefinition container before disposing my connection !");
         dispose();
     }
     else
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx
index abfd109..dafc7be 100644
--- a/dbaccess/source/core/api/resultset.cxx
+++ b/dbaccess/source/core/api/resultset.cxx
@@ -268,7 +268,7 @@ void OResultSet::setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const Any&
             xSet->setPropertyValue(PROPERTY_FETCHSIZE, rValue);
             break;
         default:
-            DBG_ERROR("unknown Property");
+            OSL_ASSERT("unknown Property");
     }
 }
 
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 223895d..c85127d 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -307,12 +307,12 @@ void SAL_CALL OContentHelper::removePropertiesChangeListener( const Sequence< ::
 // XPropertyContainer
 void SAL_CALL OContentHelper::addProperty( const ::rtl::OUString& /*Name*/, sal_Int16 /*Attributes*/, const Any& /*DefaultValue*/ ) throw (PropertyExistException, IllegalTypeException, IllegalArgumentException, RuntimeException)
 {
-    DBG_ERROR( "OContentHelper::addProperty: not implemented!" );
+    OSL_ASSERT( "OContentHelper::addProperty: not implemented!" );
 }
 
 void SAL_CALL OContentHelper::removeProperty( const ::rtl::OUString& /*Name*/ ) throw (UnknownPropertyException, NotRemoveableException, RuntimeException)
 {
-    DBG_ERROR( "OContentHelper::removeProperty: not implemented!" );
+    OSL_ASSERT( "OContentHelper::removeProperty: not implemented!" );
 }
 
 // XInitialization
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index 43002e3..fb37f3d 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -330,7 +330,7 @@ void OBookmarkContainer::implRemove(const ::rtl::OUString& _rName)
 
     if (m_aBookmarks.end() == aMapPos)
     {
-        DBG_ERROR("OBookmarkContainer::implRemove: inconsistence!");
+        OSL_ASSERT("OBookmarkContainer::implRemove: inconsistence!");
         return;
     }
 
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index c16a81e..b6210fa 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -1292,18 +1292,18 @@ void SAL_CALL ODatabaseDocument::notifyDocumentEvent( const ::rtl::OUString& _Ev
 
 Sequence< PropertyValue > SAL_CALL ODatabaseDocument::getPrinter(  ) throw (RuntimeException)
 {
-    DBG_ERROR( "ODatabaseDocument::getPrinter: not supported!" );
+    OSL_ASSERT( "ODatabaseDocument::getPrinter: not supported!" );
     return Sequence< PropertyValue >();
 }
 
 void SAL_CALL ODatabaseDocument::setPrinter( const Sequence< PropertyValue >& /*aPrinter*/ ) throw (IllegalArgumentException, RuntimeException)
 {
-    DBG_ERROR( "ODatabaseDocument::setPrinter: not supported!" );
+    OSL_ASSERT( "ODatabaseDocument::setPrinter: not supported!" );
 }
 
 void SAL_CALL ODatabaseDocument::print( const Sequence< PropertyValue >& /*xOptions*/ ) throw (IllegalArgumentException, RuntimeException)
 {
-    DBG_ERROR( "ODatabaseDocument::print: not supported!" );
+    OSL_ASSERT( "ODatabaseDocument::print: not supported!" );
 }
 
 void ODatabaseDocument::impl_reparent_nothrow( const WeakReference< XNameAccess >& _rxContainer )
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index db1f8e4..5b43830 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -216,7 +216,7 @@ sal_Bool SAL_CALL OAuthenticationContinuation::canSetRealm(  ) throw(RuntimeExce
 
 void SAL_CALL OAuthenticationContinuation::setRealm( const ::rtl::OUString& /*Realm*/ ) throw(RuntimeException)
 {
-    DBG_ERROR("OAuthenticationContinuation::setRealm: not supported!");
+    OSL_ASSERT("OAuthenticationContinuation::setRealm: not supported!");
 }
 
 sal_Bool SAL_CALL OAuthenticationContinuation::canSetUserName(  ) throw(RuntimeException)
@@ -260,7 +260,7 @@ sal_Bool SAL_CALL OAuthenticationContinuation::canSetAccount(  ) throw(RuntimeEx
 
 void SAL_CALL OAuthenticationContinuation::setAccount( const ::rtl::OUString& ) throw(RuntimeException)
 {
-    DBG_ERROR("OAuthenticationContinuation::setAccount: not supported!");
+    OSL_ASSERT("OAuthenticationContinuation::setAccount: not supported!");
 }
 
 Sequence< RememberAuthentication > SAL_CALL OAuthenticationContinuation::getRememberAccountModes( RememberAuthentication& _reDefault ) throw(RuntimeException)
@@ -698,7 +698,7 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const ::rtl::O
         }
         catch( const Exception& )
         {
-            DBG_ERROR( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" );
+            OSL_ASSERT( "ODatabaseSource::buildLowLevelConnection: got a strange exception while analyzing the error!" );
         }
         if ( !xDriver.is() || !xDriver->acceptsURL( m_pImpl->m_sConnectURL ) )
         {
@@ -859,7 +859,7 @@ sal_Bool ODatabaseSource::convertFastPropertyValue(Any & rConvertedValue, Any &
             }
             break;
             default:
-                DBG_ERROR( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" );
+                OSL_ASSERT( "ODatabaseSource::convertFastPropertyValue: unknown or readonly Property!" );
         }
     }
     return bModified;
@@ -1064,7 +1064,7 @@ void ODatabaseSource::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) con
                 rValue <<= m_pImpl->m_aLayoutInformation;
                 break;
             default:
-                DBG_ERROR("unknown Property");
+                OSL_ASSERT("unknown Property");
         }
     }
 }
@@ -1116,7 +1116,7 @@ Reference< XConnection > SAL_CALL ODatabaseSource::connectWithCompletion( const
 
     if (!_rxHandler.is())
     {
-        DBG_ERROR("ODatabaseSource::connectWithCompletion: invalid interaction handler!");
+        OSL_ASSERT("ODatabaseSource::connectWithCompletion: invalid interaction handler!");
         return getConnection(m_pImpl->m_sUser, m_pImpl->m_aPassword,_bIsolated);
     }
 
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 2da9bf4..0f8e5ad 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -558,7 +558,7 @@ void ODefinitionContainer::implAppend(const ::rtl::OUString& _rName, const Refer
     }
     catch(Exception&)
     {
-        DBG_ERROR("ODefinitionContainer::implAppend: caught something !");
+        OSL_ASSERT("ODefinitionContainer::implAppend: caught something !");
     }
 }
 
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index 5c0dc5d..d11d558 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -683,7 +683,7 @@ namespace
                 }
                 catch ( Exception& )
                 {
-                    DBG_ERROR( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" );
+                    OSL_ASSERT( "PreserveVisualAreaSize::PreserveVisualAreaSize: caught an exception!" );
                 }
             }
         }
@@ -698,7 +698,7 @@ namespace
                 }
                 catch ( Exception& )
                 {
-                    DBG_ERROR( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" );
+                    OSL_ASSERT( "PreserveVisualAreaSize::~PreserveVisualAreaSize: caught an exception!" );
                 }
             }
         }
@@ -730,7 +730,7 @@ namespace
             }
             catch( Exception& )
             {
-                DBG_ERROR( "LayoutManagerLock::LayoutManagerLock: caught an exception!" );
+                OSL_ASSERT( "LayoutManagerLock::LayoutManagerLock: caught an exception!" );
             }
         }
 
@@ -935,7 +935,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
                                 sal_Int16( nOpenMode ) ) ),
                 _rxEnvironment );
         // Unreachable
-        DBG_ERROR( "unreachable" );
+        OSL_ASSERT( "unreachable" );
       }
 
     OSL_ENSURE( m_pImpl->m_aProps.sPersistentName.getLength(),
diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx
index 87a1ba7..15df937 100644
--- a/dbaccess/source/core/misc/dsntypes.cxx
+++ b/dbaccess/source/core/misc/dsntypes.cxx
@@ -359,7 +359,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
     if (STRING_NOTFOUND == nSeparator)
     {
         // there should be at least one such separator
-        DBG_ERROR("ODsnTypeCollection::implDetermineType : missing the colon !");
+        OSL_ASSERT("ODsnTypeCollection::implDetermineType : missing the colon !");
         return DST_UNKNOWN;
     }
     // find first :
@@ -382,7 +382,7 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const String& _rDsn) const
     if (STRING_NOTFOUND == nSeparator)
     {
         // at the moment only jdbc is allowed to have just one separator
-        DBG_ERROR("ODsnTypeCollection::implDetermineType : missing the second colon !");
+        OSL_ASSERT("ODsnTypeCollection::implDetermineType : missing the second colon !");
         return DST_UNKNOWN;
     }
 
diff --git a/dbaccess/source/filter/xml/xmlStyleImport.cxx b/dbaccess/source/filter/xml/xmlStyleImport.cxx
index 6941694..aa65ebd 100644
--- a/dbaccess/source/filter/xml/xmlStyleImport.cxx
+++ b/dbaccess/source/filter/xml/xmlStyleImport.cxx
@@ -120,7 +120,7 @@ void OTableStyleContext::FillPropertySet(
                         pStyle = PTR_CAST(SvXMLNumFormatContext,pMyStyles->
                             FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_True));
                     else {
-                        DBG_ERROR("not possible to get style");
+                        OSL_ASSERT("not possible to get style");
                     }
                 }
                 if ( pStyle )
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index b4e8c5a..6e45ac9 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -277,7 +277,7 @@ sal_Int32 ReadThroughComponent(
         aError += ',';
         aError += ByteString::CreateFromInt32( r.ColumnNumber );
 
-        DBG_ERROR( aError.GetBuffer() );
+        OSL_ASSERT( aError.GetBuffer() );
         return 1;
     }
 #else
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 7cd8989..a4ed47d 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&)
     {
-        DBG_ERROR("OApplicationController::Construct : the construction of UnoDataBrowserView failed !");
+        OSL_ASSERT("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 )
     {
-        DBG_ERROR("OApplicationController::executeDrop: what the hell did queryDrop do?");
+        OSL_ASSERT("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() )
     {
-        DBG_ERROR( "OApplicationController::attachModel: invalid model!" );
+        OSL_ASSERT( "OApplicationController::attachModel: invalid model!" );
         return sal_False;
     }
 
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 77e08e0..83020e1 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)
                 {
-                    DBG_ERROR("OApplicationController::paste: invalid descriptor!");
+                    OSL_ASSERT("OApplicationController::paste: invalid descriptor!");
                     return sal_False;
                 }
 
@@ -637,7 +637,7 @@ sal_Bool OApplicationController::paste( ElementType _eType,const ::svx::ODataAcc
 
                     if (!bSuccess)
                     {
-                        DBG_ERROR("OApplicationController::paste: could not extract the source query object!");
+                        OSL_ASSERT("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())
                 {
-                    DBG_ERROR("OApplicationController::paste: invalid destination query container!");
+                    OSL_ASSERT("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 5220eb3..f12593d 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&) { DBG_ERROR(message); } ;
+#define DO_SAFE( action, message ) try { action; } catch(Exception&) { OSL_ASSERT(message); } ;
 
 //..................................................................
 namespace dbaui
@@ -851,7 +851,7 @@ sal_Bool SbaXDataBrowserController::Construct(Window* pParent)
     }
     catch(Exception&)
     {
-        DBG_ERROR("SbaXDataBrowserController::Construct : the construction of UnoDataBrowserView failed !");
+        OSL_ASSERT("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
-        DBG_ERROR("SbaXDataBrowserController::approveParameter : invalid event source !");
+        OSL_ASSERT("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())
         {
-            DBG_ERROR("SbaXDataBrowserController::approveParameter: the InteractionHandler returned nonsense!");
+            OSL_ASSERT("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&)
                 {
-                    DBG_ERROR("SbaXDataBrowserController::approveParameter: setting one of the properties failed!");
+                    OSL_ASSERT("SbaXDataBrowserController::approveParameter: setting one of the properties failed!");
                 }
             }
         }
@@ -2356,7 +2356,7 @@ sal_Bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor)
     }
     catch(Exception&)
     {
-        DBG_ERROR("SbaXDataBrowserController::SaveModified : could not save the current record !");
+        OSL_ASSERT("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);
-    DBG_ERROR("LoadFormHelper::unloaded : shouldn't be called !");
+    OSL_ASSERT("LoadFormHelper::unloaded : shouldn't be called !");
     implDispose();
 }
 
diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx
index f2960c2..4e9e544 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 {
-        DBG_ERROR("SbaTableQueryBrowser::select: invalid entry!");
+        OSL_ASSERT("SbaTableQueryBrowser::select: invalid entry!");
     }
 }
 
@@ -145,7 +145,7 @@ sal_Bool SbaTableQueryBrowser::isSelected(SvLBoxEntry* _pEntry) const
     if (pTextItem)
         return static_cast<OBoldListboxString*>(pTextItem)->isEmphasized();
     else {
-        DBG_ERROR("SbaTableQueryBrowser::isSelected: invalid entry!");
+        OSL_ASSERT("SbaTableQueryBrowser::isSelected: invalid entry!");
     }
     return sal_False;
 }
diff --git a/dbaccess/source/ui/browser/dsbrowserDnD.cxx b/dbaccess/source/ui/browser/dsbrowserDnD.cxx
index 6c92c71..c0bd897 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))
         {
-            DBG_ERROR("SbaTableQueryBrowser::executeDrop: what the hell did queryDrop do?");
+            OSL_ASSERT("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 d5d5c0d..caad93b 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 )
 {
-    DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroupControl : not supported !");
+    OSL_ASSERT("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 )
 {
-    DBG_ERROR("SAL_CALL SbaXFormAdapter::setGroup : not supported !");
+    OSL_ASSERT("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 )
 {
-    DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroup : not supported !");
+    OSL_ASSERT("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 )
 {
-    DBG_ERROR("SAL_CALL SbaXFormAdapter::getGroupByName : not supported !");
+    OSL_ASSERT("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 4854931..fffda81 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&)
     {
-        DBG_ERROR("OGenericUnoController::Construct: could not create (or start listening at) the database context!");
+        OSL_ASSERT("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 95ba53b..b73b5bb 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&)
     {
-        DBG_ERROR("SbaGridControl::DoColumnDrag : something went wrong while getting the column");
+        OSL_ASSERT("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&)
     {
-        DBG_ERROR("SbaGridControl::DoFieldDrag : could not retrieve the cell's contents !");
+        OSL_ASSERT("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 e1afd4d..8cb263e 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&)
     {
-        DBG_ERROR("SbaTableQueryBrowser::Construct: could not create (or start listening at) the database context!");
+        OSL_ASSERT("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&)
     {
-        DBG_ERROR("SbaTableQueryBrowser::InitializeForm : something went wrong !");
+        OSL_ASSERT("SbaTableQueryBrowser::InitializeForm : something went wrong !");
         return sal_False;
     }
 
@@ -1144,7 +1144,7 @@ SvLBoxEntry* SbaTableQueryBrowser::getObjectEntry(const ::rtl::OUString& _rDataS
                             }
                             catch(Exception&)
                             {
-                                DBG_ERROR("SbaTableQueryBrowser::populateTree: could not fill the tree");
+                                OSL_ASSERT("SbaTableQueryBrowser::populateTree: could not fill the tree");
                             }
                         }
                     }
@@ -1338,7 +1338,7 @@ void SbaTableQueryBrowser::implRemoveStatusListeners()
             }
             catch (Exception&)
             {
-                DBG_ERROR("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!");
+                OSL_ASSERT("SbaTableQueryBrowser::implRemoveStatusListeners: could not remove a status listener!");
             }
         }
     }
@@ -1900,7 +1900,7 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue
                     }
                     catch(Exception&)
                     {
-                        DBG_ERROR("SbaTableQueryBrowser::Execute(ID_BROWSER_?): could not clone the cursor!");
+                        OSL_ASSERT("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&)
     {
-        DBG_ERROR("SbaTableQueryBrowser::populateTree: could not fill the tree");
+        OSL_ASSERT("SbaTableQueryBrowser::populateTree: could not fill the tree");
     }
 }
 
@@ -2253,7 +2253,7 @@ sal_Bool SbaTableQueryBrowser::ensureEntryObject( SvLBoxEntry* _pEntry )
                             bSuccess = pEntryData->xContainer.is();
                         }
                         else {
-                            DBG_ERROR("SbaTableQueryBrowser::ensureEntryObject: no XQueryDefinitionsSupplier interface!");
+                            OSL_ASSERT("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
-        DBG_ERROR("SbaTableQueryBrowser::elementReplaced: no support for replaced data sources!");
+        OSL_ASSERT("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 2213611..8919a6b 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())
         {
-            DBG_ERROR( "CharSetListBox::SelectEntryByIanaName: unknown charset falling back to system language!" );
+            OSL_ASSERT( "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.
-                DBG_ERROR( "CharSetListBox::SelectEntryByIanaName: invalid character set!" );
+                OSL_ASSERT( "CharSetListBox::SelectEntryByIanaName: invalid character set!" );
                 sDisplayName = String();
             }
 
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 5f7bad9..250295e 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:
-                    DBG_ERROR( "DBTreeListBox::CreateContextMenu: unexpected return value of the interceptor call!" );
+                    OSL_ASSERT( "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 59c33f0..440d1ae 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&)
     {
-        DBG_ERROR("OTableTreeListBox::UpdateTableList : caught an RuntimeException!");
+        OSL_ASSERT("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 d3e8f40..332ddd5 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -650,7 +650,7 @@ DBG_NAME(OConnectionHelper)
             }
             catch(Exception&)
             {
-                DBG_ERROR("OConnectionHelper::getInstalledAdabasDBDirs: could not enumerate the adabas config files!");
+                OSL_ASSERT("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 fd7512a..c3ede7e 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("!");
-            DBG_ERROR(sMessage.getStr());
+            OSL_ASSERT(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("!");
-                DBG_ERROR(aMessage.getStr());
+                OSL_ASSERT(aMessage.getStr());
 #endif
             }
             // transfer it into an item
@@ -949,7 +949,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem*
     }
     else
     {
-        DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!");
+        OSL_ASSERT("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported item type!");
         return aValue;
     }
 
@@ -997,7 +997,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
                 _rSet.Put(SfxStringItem(_nId, sValue.getStr()));
             }
             else {
-                DBG_ERROR(
+                OSL_ASSERT(
                     (	::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
                     +=	::rtl::OString( translatePropertyId( _nId ) )
                     +=	::rtl::OString( " should be no string)!" )
@@ -1027,7 +1027,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
                 _rSet.Put( aItem );
             }
             else {
-                DBG_ERROR(
+                OSL_ASSERT(
                     (	::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
                     +=	::rtl::OString( translatePropertyId( _nId ) )
                     +=	::rtl::OString( " should be no boolean)!" )
@@ -1044,7 +1044,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
                 _rSet.Put( SfxInt32Item( _nId, nValue ) );
             }
             else {
-                DBG_ERROR(
+                OSL_ASSERT(
                     (	::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
                     +=	::rtl::OString( translatePropertyId( _nId ) )
                     +=	::rtl::OString( " should be no int)!" )
@@ -1073,7 +1073,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
                     }
                     break;
                     default:
-                        DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
+                        OSL_ASSERT("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
                 }
             }
             else {
diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx
index b42aa48..4e07c7a 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
-                DBG_ERROR( "SpecialSettingsPage::implInitControls: unknown boolean item type!" );
+                OSL_ASSERT( "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 034c7cd..20f2f56 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -388,7 +388,7 @@ void ODbTypeWizDialogSetup::activateDatabasePath()
     }
     break;
     default:
-        DBG_ERROR( "ODbTypeWizDialogSetup::activateDatabasePath: unknown creation mode!" );
+        OSL_ASSERT( "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*/)
 {
-    DBG_ERROR( "ODbTypeWizDialogSetup::setTitle: not implemented!" );
+    OSL_ASSERT( "ODbTypeWizDialogSetup::setTitle: not implemented!" );
         // why?
 }
 
diff --git a/dbaccess/source/ui/dlg/dlgattr.cxx b/dbaccess/source/ui/dlg/dlgattr.cxx
index 2700b38..0f6c586 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 )
     {
-        DBG_ERROR( "found flag TP_ATTR_CHAR" );
+        OSL_ASSERT( "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 7dc9fbe..a66f9c8 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))
         {
-            DBG_ERROR("DbaIndexDialog::OnNewIndex: no free index name found!");
+            OSL_ASSERT("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 f1c115a..88752ca 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 {
-            DBG_ERROR("OParameterDialog::OParameterDialog: need a service factory!");
+            OSL_ASSERT("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 7014396..a58ff78 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 {
-        DBG_ERROR( "DlgFilterCrit::getMatchingColumn: invalid event source!" );
+        OSL_ASSERT( "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 be67af8..c2ed021 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:
-            DBG_ERROR( "OSQLMessageBox::impl_initImage: unsupported image type!" );
+            OSL_ASSERT( "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 7d19c58..22ba517 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -174,7 +174,7 @@ DBG_NAME(OTableSubscriptionPage)
         }
         catch(SQLException&)
         {
-            DBG_ERROR("OTableSubscriptionPage::implCheckTables : could not retrieve the current connection's meta data!");
+            OSL_ASSERT("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 94bb3f1..ed35f27 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 )
     {
-        DBG_ERROR( "OTableCopyHelper::insertTable: invalid call (no supported format found)!" );
+        OSL_ASSERT( "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 efd1911..3929c33 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1985,7 +1985,7 @@ namespace
             Reference< XConnection> xConnection = rController.getConnection();
             if ( !xConnection.is() )
             {
-                DBG_ERROR( "InitFromParseNodeImpl: no connection? no connection!" );
+                OSL_ASSERT( "InitFromParseNodeImpl: no connection? no connection!" );
                 break;
             }
 
@@ -2297,7 +2297,7 @@ namespace
                     break;
                 }
 
-                DBG_ERROR( "InstallFields: don't know how to interpret this parse node!" );
+                OSL_ASSERT( "InstallFields: don't know how to interpret this parse node!" );
 
                 } while ( false );
             }
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 67cb2cf..0658bdb 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()))
     {
-        DBG_ERROR("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
+        OSL_ASSERT("OSelectionBrowseBox::ExecuteDrop: this should never have passed AcceptDrop!");
         return DND_ACTION_NONE;
     }
 
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index d7e1397..32c3a5f 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -129,7 +129,7 @@ void OControlStyleContext::FillPropertySet(const Reference< XPropertySet > & rPr
                         pStyle = PTR_CAST(SvXMLNumFormatContext,pMyStyles->
                             FindStyleChildContext(XML_STYLE_FAMILY_DATA_STYLE, m_sDataStyleName, sal_True));
                     else {
-                        DBG_ERROR("not possible to get style");
+                        OSL_ASSERT("not possible to get style");
                     }
                 }
                 if ( pStyle )
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 093f229..77a343e 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -196,7 +196,7 @@ r
         aError += ',';
         aError += ByteString::CreateFromInt32( r.ColumnNumber );
 
-        DBG_ERROR( aError.GetBuffer() );
+        OSL_ASSERT( aError.GetBuffer() );
 #endif
         return 1;
     }
diff --git a/reportdesign/source/ui/inspection/GeometryHandler.cxx b/reportdesign/source/ui/inspection/GeometryHandler.cxx
index a3d574f..b9ca263 100644
--- a/reportdesign/source/ui/inspection/GeometryHandler.cxx
+++ b/reportdesign/source/ui/inspection/GeometryHandler.cxx
@@ -2077,7 +2077,7 @@ void GeometryHandler::impl_initFieldList_nothrow( uno::Sequence< ::rtl::OUString
     }
     catch (uno::Exception&)
     {
-        DBG_ERROR( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
+        OSL_ASSERT( "GeometryHandler::impl_initFieldList_nothrow: caught an exception!" );
     }
 }
 // -----------------------------------------------------------------------------
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index b1535d6..797cf47 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -194,7 +194,7 @@ xub_StrLen FunctionDescription::getSuppressedArgumentCount() const
     }
     catch(const uno::Exception&)
     {
-        DBG_ERROR("Exception caught!");
+        OSL_ASSERT("Exception caught!");
     }
     return sFormula;
 }
diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx
index d549b4a..f0d22d5 100644
--- a/reportdesign/source/ui/report/propbrw.cxx
+++ b/reportdesign/source/ui/report/propbrw.cxx
@@ -126,7 +126,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >&	_xORB,Window* pParent,
     }
     catch (Exception&)
     {
-        DBG_ERROR("PropBrw::PropBrw: could not create/initialize my frame!");
+        OSL_ASSERT("PropBrw::PropBrw: could not create/initialize my frame!");
         m_xMeAsFrame.clear();
     }
 
@@ -179,7 +179,7 @@ PropBrw::PropBrw(const Reference< XMultiServiceFactory >&	_xORB,Window* pParent,
         }
         catch (Exception&)
         {
-            DBG_ERROR("PropBrw::PropBrw: could not create/initialize the browser controller!");
+            OSL_ASSERT("PropBrw::PropBrw: could not create/initialize the browser controller!");
             try
             {
                 ::comphelper::disposeComponent(m_xBrowserController);
@@ -562,7 +562,7 @@ void PropBrw::Update( OSectionView* pNewView )
     }
     catch ( Exception& )
     {
-        DBG_ERROR( "PropBrw::Update: Exception occurred!" );
+        OSL_ASSERT( "PropBrw::Update: Exception occurred!" );
     }
 }
 //----------------------------------------------------------------------------
@@ -584,7 +584,7 @@ void PropBrw::Update( const uno::Reference< uno::XInterface>& _xReportComponent)
         }
         catch ( Exception& )
         {
-            DBG_ERROR( "PropBrw::Update: Exception occurred!" );
+            OSL_ASSERT( "PropBrw::Update: Exception occurred!" );
         }
     }
 }
commit 5f923eaba6743180a10685029694b3e5869605ed
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Thu Feb 24 18:22:15 2011 +0100

    Move DBG_ASSERT -> OSL_ENSURE

diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx
index 67ef250..44a2ef8 100644
--- a/reportdesign/source/core/sdr/UndoEnv.cxx
+++ b/reportdesign/source/core/sdr/UndoEnv.cxx
@@ -245,7 +245,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
     {
         AllProperties aNewEntry;
         aSetPos = m_pImpl->m_aPropertySetCache.insert(PropertySetInfoCache::value_type(xSet,aNewEntry)).first;
-        DBG_ASSERT(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
+        OSL_ENSURE(aSetPos != m_pImpl->m_aPropertySetCache.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
     }
     if ( aSetPos == m_pImpl->m_aPropertySetCache.end() )
         return;
@@ -262,7 +262,7 @@ void SAL_CALL OXUndoEnvironment::propertyChange( const PropertyChangeEvent& _rEv
 
         // insert the new entry
         aPropertyPos = rPropInfos.insert( AllProperties::value_type( _rEvent.PropertyName, bTransReadOnly ) ).first;
-        DBG_ASSERT(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
+        OSL_ENSURE(aPropertyPos != rPropInfos.end(), "OXUndoEnvironment::propertyChange : just inserted it ... why it's not there ?");
     }
 
     implSetModified();
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index 8586401..d7e1397 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -44,7 +44,7 @@
 #include <tools/debug.hxx>
 #include "xmlfilter.hxx"
 #include "xmlHelper.hxx"
-#include <tools/debug.hxx>
+#include <osl/diagnose.h>
 
 #define XML_LINE_LEFT 0
 #define XML_LINE_RIGHT 1
@@ -151,7 +151,7 @@ void OControlStyleContext::SetDefaults()
 void OControlStyleContext::AddProperty(const sal_Int16 nContextID, const uno::Any& rValue)
 {
     sal_Int32 nIndex(static_cast<OReportStylesContext *>(pStyles)->GetIndex(nContextID));
-    DBG_ASSERT(nIndex != -1, "Property not found in Map");
+    OSL_ENSURE(nIndex != -1, "Property not found in Map");
     XMLPropertyState aPropState(nIndex, rValue);
     GetProperties().push_back(aPropState); // has to be insertes in a sort order later
 }
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index 721e025..093f229 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -138,9 +138,9 @@ sal_Int32 ReadThroughComponent(
     const uno::Reference< XDocumentHandler >& _xFilter,
     sal_Bool /*bEncrypted*/ )
 {
-    DBG_ASSERT(xInputStream.is(), "input stream missing");
-    DBG_ASSERT(xModelComponent.is(), "document missing");
-    DBG_ASSERT(rFactory.is(), "factory missing");
+    OSL_ENSURE(xInputStream.is(), "input stream missing");
+    OSL_ENSURE(xModelComponent.is(), "document missing");
+    OSL_ENSURE(rFactory.is(), "factory missing");
 
     RTL_LOGFILE_CONTEXT_AUTHOR( aLog, "rptxml", "oj", "ReadThroughComponent" );
 
@@ -153,13 +153,13 @@ sal_Int32 ReadThroughComponent(
         rFactory->createInstance(
             ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.sax.Parser"))),
         UNO_QUERY );
-    DBG_ASSERT( xParser.is(), "Can't create parser" );
+    OSL_ENSURE( xParser.is(), "Can't create parser" );
     if( !xParser.is() )
         return 1;
     RTL_LOGFILE_CONTEXT_TRACE( aLog, "parser created" );
 
     // get filter
-    DBG_ASSERT( _xFilter.is(), "Can't instantiate filter component." );
+    OSL_ENSURE( _xFilter.is(), "Can't instantiate filter component." );
     if( !_xFilter.is() )
         return 1;
 
@@ -233,8 +233,8 @@ sal_Int32 ReadThroughComponent(
     const ::rtl::OUString& _sFilterName
     ,const uno::Reference<beans::XPropertySet>& _xProp)
 {
-    DBG_ASSERT( xStorage.is(), "Need storage!");
-    DBG_ASSERT(NULL != pStreamName, "Please, please, give me a name!");
+    OSL_ENSURE( xStorage.is(), "Need storage!");
+    OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
 
     if ( xStorage.is() )
     {
@@ -1054,7 +1054,7 @@ void SAL_CALL ORptFilter::startDocument( void )
 void ORptFilter::endDocument( void )
     throw( xml::sax::SAXException, uno::RuntimeException )
 {
-    DBG_ASSERT( GetModel().is(), "model missing; maybe startDocument wasn't called?" );
+    OSL_ENSURE( GetModel().is(), "model missing; maybe startDocument wasn't called?" );
     if( !GetModel().is() )
         return;
 
diff --git a/reportdesign/source/ui/dlg/dlgpage.cxx b/reportdesign/source/ui/dlg/dlgpage.cxx
index 928d442..0217b4f 100644
--- a/reportdesign/source/ui/dlg/dlgpage.cxx
+++ b/reportdesign/source/ui/dlg/dlgpage.cxx
@@ -53,7 +53,7 @@ SfxTabDialog ( pParent, ModuleRes( _nPageId ), pAttr ),
         rOutAttrs			( *pAttr )
 {	
     SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create(); 
-    DBG_ASSERT(pFact, "Dialogdiet fail!");
+    OSL_ENSURE(pFact, "Dialogdiet fail!");
     switch( _nPageId )
     {
         case RID_PAGEDIALOG_BACKGROUND:


More information about the Libreoffice-commits mailing list