diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2014-04-07 11:44:43 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-12 11:32:38 +0200 |
commit | 70e744b2157ebe48f3a5c839560fedf6521d0464 (patch) | |
tree | 4e29618cc5a36f25557bd130226abdfe96e46848 /dbaccess | |
parent | d1516d488c081ec3a5d730d2b1626a0c8dc39a73 (diff) |
fdo#43157 Remove OSL_POSTCOND, prefer SAL_WARN_IF
Change-Id: Ia89a2dce799c7ba90bcd19919195bfd2c7a4a180
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/resultset.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/core/recovery/subcomponentrecovery.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/xmlExport.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dsselect.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/uno/copytablewizard.cxx | 4 |
6 files changed, 8 insertions, 8 deletions
diff --git a/dbaccess/source/core/api/resultset.cxx b/dbaccess/source/core/api/resultset.cxx index 8f9e48a88fe9..ed356f915079 100644 --- a/dbaccess/source/core/api/resultset.cxx +++ b/dbaccess/source/core/api/resultset.cxx @@ -382,7 +382,7 @@ Reference< ::com::sun::star::container::XNameAccess > OResultSet::getColumns(voi { const Reference< XNameAccess > xColNames( static_cast< XNameAccess* >( m_pColumns ), UNO_SET_THROW ); const Sequence< OUString > aNames( xColNames->getElementNames() ); - OSL_POSTCOND( aNames.getLength() == nColCount, + SAL_WARN_IF( aNames.getLength() != nColCount, "dbaccess", "OResultSet::getColumns: invalid column count!" ); for ( const OUString* pName = aNames.getConstArray(); pName != aNames.getConstArray() + aNames.getLength(); @@ -392,7 +392,7 @@ Reference< ::com::sun::star::container::XNameAccess > OResultSet::getColumns(voi Reference< XPropertySet > xColProps( xColNames->getByName( *pName ), UNO_QUERY_THROW ); OUString sName; OSL_VERIFY( xColProps->getPropertyValue( PROPERTY_NAME ) >>= sName ); - OSL_POSTCOND( sName == *pName, "OResultSet::getColumns: invalid column name!" ); + SAL_WARN_IF( sName != *pName, "dbaccess", "OResultSet::getColumns: invalid column name!" ); } } diff --git a/dbaccess/source/core/recovery/subcomponentrecovery.cxx b/dbaccess/source/core/recovery/subcomponentrecovery.cxx index 7055ec1be0cc..c5b977e66d75 100644 --- a/dbaccess/source/core/recovery/subcomponentrecovery.cxx +++ b/dbaccess/source/core/recovery/subcomponentrecovery.cxx @@ -481,7 +481,7 @@ namespace dbaccess break; } - OSL_POSTCOND( m_eType != UNKNOWN, + SAL_WARN_IF( m_eType == UNKNOWN, "dbaccess", "SubComponentRecovery::impl_identifyComponent_throw: couldn't classify the component!" ); } diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 7d8030f5adac..2169f9b2db4f 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -979,7 +979,7 @@ void ODBExport::exportFilter(XPropertySet* _xProp AddAttribute(XML_NAMESPACE_DB, XML_COMMAND,sCommand); SvXMLElementExport aComponents(*this,XML_NAMESPACE_DB, _eStatementType, true, true); } - OSL_POSTCOND(!GetAttrList().getLength(),"Invalid attribute length!"); + SAL_WARN_IF(GetAttrList().getLength(), "dbaccess", "Invalid attribute length!"); } void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup) diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index 6342466c4320..5583bfc5abb1 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -110,7 +110,7 @@ IMPL_LINK_NOARG(ODatasourceSelectDialog, ManageClickHdl) m_pCancel->Disable(); m_pManageDatasources->Disable(); - OSL_POSTCOND( m_pODBCManagement->isRunning(), "ODatasourceSelectDialog::ManageClickHdl: success, but not running - you were *fast*!" ); + SAL_WARN_IF( !m_pODBCManagement->isRunning(), "dbaccess.ui", "ODatasourceSelectDialog::ManageClickHdl: success, but not running - you were *fast*!" ); return 0L; } diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx index 8d59cd076a75..e7608d57f4de 100644 --- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx +++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx @@ -263,7 +263,7 @@ namespace dbaui // (take the indirection through XDataSource to ensure we have a correct object ....) m_pImpl->m_aDataSource = xDS; } - OSL_POSTCOND( m_pImpl->m_aDataSource.is(), "DBSubComponentController::initializeConnection: unable to obtain the data source object!" ); + SAL_WARN_IF( !m_pImpl->m_aDataSource.is(), "dbaccess.ui", "DBSubComponentController::initializeConnection: unable to obtain the data source object!" ); if ( m_pImpl->m_bNotAttached ) { diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index e11ba9580613..073f4e43f34e 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -847,7 +847,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< if ( xConnection.is() ) { xInteractionHandler = lcl_getInteractionHandler_throw( xConnection.getTyped(), m_xInteractionHandler ); - OSL_POSTCOND( xInteractionHandler.is(), "CopyTableWizard::impl_extractConnection_throw: lcl_getInteractionHandler_throw returned nonsense!" ); + SAL_WARN_IF( !xInteractionHandler.is(), "dbaccess.ui", "CopyTableWizard::impl_extractConnection_throw: lcl_getInteractionHandler_throw returned nonsense!" ); break; } @@ -870,7 +870,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference< { // first, try connecting with completion xInteractionHandler = lcl_getInteractionHandler_throw( xDataSource, m_xInteractionHandler ); - OSL_POSTCOND( xInteractionHandler.is(), "CopyTableWizard::impl_extractConnection_throw: lcl_getInteractionHandler_throw returned nonsense!" ); + SAL_WARN_IF( !xInteractionHandler.is(), "dbaccess.ui", "CopyTableWizard::impl_extractConnection_throw: lcl_getInteractionHandler_throw returned nonsense!" ); if ( xInteractionHandler.is() ) { Reference< XCompletedConnection > xInteractiveConnection( xDataSource, UNO_QUERY ); |