User: rt Date: 2007-07-24 11:49:43+0000 Modified: dba/connectivity/source/commontools/dbexception.cxx
Log: INTEGRATION: CWS dba23b (1.19.66); FILE MERGED 2007/07/08 19:36:50 fs 1.19.66.1: corrected implDetermineType to also recognize derived exception types File Changes: Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: dbexception.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/dbexception.cxx?r1=1.19&r2=1.20 Delta lines: +8 -3 ------------------- --- dbexception.cxx 2006-12-01 16:50:11+0000 1.19 +++ dbexception.cxx 2007-07-24 11:49:40+0000 1.20 @@ -178,11 +178,16 @@ void SQLExceptionInfo::implDetermineType() { staruno::Type aContentType = m_aContent.getValueType(); - if (isA(aContentType, static_cast< ::com::sun::star::sdb::SQLContext*>(NULL))) + + const Type& aSQLExceptionType = ::getCppuType( reinterpret_cast< SQLException* >( NULL ) ); + const Type& aSQLWarningType = ::getCppuType( reinterpret_cast< SQLWarning* >( NULL ) ); + const Type& aSQLContextType = ::getCppuType( reinterpret_cast< SQLContext* >( NULL ) ); + + if ( isAssignableFrom( aSQLContextType, m_aContent.getValueType() ) ) m_eType = SQL_CONTEXT; - else if (isA(aContentType, static_cast< ::com::sun::star::sdbc::SQLWarning*>(NULL))) + else if ( isAssignableFrom( aSQLWarningType, m_aContent.getValueType() ) ) m_eType = SQL_WARNING; - else if (isA(aContentType, static_cast< ::com::sun::star::sdbc::SQLException*>(NULL))) + else if ( isAssignableFrom( aSQLExceptionType, m_aContent.getValueType() ) ) m_eType = SQL_EXCEPTION; else { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
