User: hr Date: 06/06/19 18:02:57 Modified: /dba/connectivity/source/commontools/ DateConversion.cxx
Log: INTEGRATION: CWS warnings01 (1.13.14); FILE MERGED 2005/12/22 11:44:02 fs 1.13.14.3: #i57457# warning-free code 2005/11/07 19:03:51 pl 1.13.14.2: RESYNC: (1.13-1.14); FILE MERGED 2005/11/07 14:42:58 fs 1.13.14.1: #i57457# warning-free code File Changes: Directory: /dba/connectivity/source/commontools/ ================================================ File [changed]: DateConversion.cxx Url: http://dba.openoffice.org/source/browse/dba/connectivity/source/commontools/DateConversion.cxx?r1=1.14&r2=1.15 Delta lines: +22 -20 --------------------- --- DateConversion.cxx 24 Oct 2005 08:20:24 -0000 1.14 +++ DateConversion.cxx 20 Jun 2006 01:02:55 -0000 1.15 @@ -68,6 +68,9 @@ #ifndef CONNECTIVITY_CONNECTION_HXX #include "TConnection.hxx" #endif +#ifndef CONNECTIVITY_DIAGNOSE_EX_H +#include "diagnose_ex.h" +#endif #ifndef _COMPHELPER_NUMBERS_HXX_ #include <comphelper/numbers.hxx> #endif @@ -158,8 +161,7 @@ case DataType::DATE: { Date aDate; - sal_Bool bRet = _rVal >>= aDate; - OSL_ENSURE(bRet,"DBTypeConversion::toSQLString: _rVal is not date!"); + OSL_VERIFY_RES( _rVal >>= aDate, "DBTypeConversion::toSQLString: _rVal is not date!"); if (bQuote) aRet += ::rtl::OUString::createFromAscii("{D '"); aRet += DBTypeConversion::toDateString(aDate);; if (bQuote) aRet += ::rtl::OUString::createFromAscii("'}"); @@ -167,8 +169,7 @@ case DataType::TIME: { Time aTime; - sal_Bool bRet = _rVal >>= aTime; - OSL_ENSURE(bRet,"DBTypeConversion::toSQLString: _rVal is not time!"); + OSL_VERIFY_RES( _rVal >>= aTime,"DBTypeConversion::toSQLString: _rVal is not time!"); if (bQuote) aRet += ::rtl::OUString::createFromAscii("{T '"); aRet += DBTypeConversion::toTimeString(aTime); if (bQuote) aRet += ::rtl::OUString::createFromAscii("'}"); @@ -382,13 +383,14 @@ if (!_xColumn.is() || !_xFormatter.is()) return ::rtl::OUString(); - sal_Int32 nKey; + sal_Int32 nKey(0); try { _xColumn->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FORMATKEY)) >>= nKey; } catch (const Exception& ) { + OSL_ENSURE(false, "DBTypeConversion::getValue: caught an exception while asking for the format key!"); } if (!nKey) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
