summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/odbcbase/OTools.cxx
diff options
context:
space:
mode:
authorRadu Ioan <ioan.radu.g@gmail.com>2013-06-15 01:56:13 +0300
committerNoel Power <noel.power@suse.com>2013-06-17 15:55:21 +0000
commitdd3f8fbaff3eb2eee9f6cdf9e6a79cd6dd14115d (patch)
treee29942ac6275f7421cbe4aeb15dd998e7d5975d0 /connectivity/source/drivers/odbcbase/OTools.cxx
parent4086aec2f945e312d18b76a21683cbc0393a3e57 (diff)
fdo#63690 - replace RTL_CONTEXT_ macros with SAL_INFO
- replaced RTL_CONTEXT_ with SAL_INFO - replace OSL_* with SAL_* Change-Id: If89af70767c3fdc4b1d0cb5e51033ca98583bc5d Reviewed-on: https://gerrit.libreoffice.org/4286 Reviewed-by: Noel Power <noel.power@suse.com> Tested-by: Noel Power <noel.power@suse.com>
Diffstat (limited to 'connectivity/source/drivers/odbcbase/OTools.cxx')
-rw-r--r--connectivity/source/drivers/odbcbase/OTools.cxx25
1 files changed, 12 insertions, 13 deletions
diff --git a/connectivity/source/drivers/odbcbase/OTools.cxx b/connectivity/source/drivers/odbcbase/OTools.cxx
index 4f85184060b6..365f9205bbcb 100644
--- a/connectivity/source/drivers/odbcbase/OTools.cxx
+++ b/connectivity/source/drivers/odbcbase/OTools.cxx
@@ -23,7 +23,6 @@
#include <osl/diagnose.h>
#include "odbc/OConnection.hxx"
#include "diagnose_ex.h"
-#include <rtl/logfile.hxx>
#include <rtl/ustrbuf.hxx>
#include <boost/static_assert.hpp>
@@ -121,16 +120,16 @@ void OTools::getValue( OConnection* _pConnection,
void* _pValue,
SQLLEN _nSize) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::getValue" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::getValue" );
const size_t properSize = sqlTypeLen(_nType);
if ( properSize == static_cast<size_t>(-1) )
- OSL_FAIL("connectivity::odbc::OTools::getValue: unknown SQL type - cannot check buffer size");
+ SAL_WARN( "connectivity.drivers", "connectivity::odbc::OTools::getValue: unknown SQL type - cannot check buffer size");
else
{
OSL_ENSURE(static_cast<size_t>(_nSize) == properSize, "connectivity::odbc::OTools::getValue got wrongly sized memory region to write result to");
if ( static_cast<size_t>(_nSize) > properSize )
{
- OSL_FAIL("memory region is too big - trying to fudge it");
+ SAL_WARN( "connectivity.drivers", "memory region is too big - trying to fudge it");
memset(_pValue, 0, _nSize);
#ifdef OSL_BIGENDIAN
// This is skewed in favour of integer types
@@ -163,7 +162,7 @@ void OTools::bindValue( OConnection* _pConnection,
rtl_TextEncoding _nTextEncoding,
sal_Bool _bUseOldTimeDate) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::bindValue" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::bindValue" );
SQLRETURN nRetcode;
SQLSMALLINT fSqlType;
SQLSMALLINT fCType;
@@ -313,13 +312,13 @@ void OTools::ThrowException(const OConnection* _pConnection,
case SQL_ERROR: break;
- case SQL_INVALID_HANDLE: OSL_FAIL("SdbODBC3_SetStatus: SQL_INVALID_HANDLE");
+ case SQL_INVALID_HANDLE: SAL_WARN( "connectivity.drivers", "SdbODBC3_SetStatus: SQL_INVALID_HANDLE");
throw SQLException();
}
// Additional Information on the latest ODBC-functioncall available
// SQLError provides this Information.
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::ThrowException" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::ThrowException" );
SDB_ODBC_CHAR szSqlState[5];
SQLINTEGER pfNativeError;
@@ -358,7 +357,7 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection,
sal_Bool &_bWasNull,
const Reference< XInterface >& _xInterface) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::getBytesValue" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::getBytesValue" );
sal_Int8 aCharArray[2048];
// First try to fetch the data with the little Buffer:
const SQLLEN nMaxLen = sizeof aCharArray;
@@ -412,7 +411,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
const Reference< XInterface >& _xInterface,
rtl_TextEncoding _nTextEncoding) throw(SQLException, RuntimeException)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::getStringValue" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::getStringValue" );
OUStringBuffer aData;
switch(_fSqlType)
{
@@ -456,7 +455,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
nReadChars = nMaxLen-1;
if ( waCharArray[nReadChars] != 0)
{
- OSL_FAIL("Buggy ODBC driver? Did not null-terminate (variable length) data!");
+ SAL_WARN( "connectivity.drivers", "Buggy ODBC driver? Did not null-terminate (variable length) data!");
++nReadChars;
}
}
@@ -499,7 +498,7 @@ OUString OTools::getStringValue(OConnection* _pConnection,
nReadChars = nMaxLen-1;
if ( aCharArray[nReadChars] != 0)
{
- OSL_FAIL("Buggy ODBC driver? Did not null-terminate (variable length) data!");
+ SAL_WARN( "connectivity.drivers", "Buggy ODBC driver? Did not null-terminate (variable length) data!");
++nReadChars;
}
}
@@ -665,7 +664,7 @@ sal_Int32 OTools::MapOdbcType2Jdbc(SQLSMALLINT _nType)
//--------------------------------------------------------------------
SQLSMALLINT OTools::jdbcTypeToOdbc(sal_Int32 jdbcType)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::jdbcTypeToOdbc" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::jdbcTypeToOdbc" );
// For the most part, JDBC types match ODBC types. We'll
// just convert the ones that we know are different
@@ -701,7 +700,7 @@ void OTools::getBindTypes(sal_Bool _bUseWChar,
SQLSMALLINT& fSqlType
)
{
- RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "odbc", "Ocke.Janssen@sun.com", "OTools::getBindTypes" );
+ SAL_INFO( "connectivity.drivers", "odbc Ocke.Janssen@sun.com OTools::getBindTypes" );
switch(_nOdbcType)
{
case SQL_CHAR: if(_bUseWChar)