summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-06-08 16:23:57 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-06-08 16:23:57 +0200
commitf1b0eec9d3b3511e4c9381ad1f486f51772c852c (patch)
tree5a3873f943a6fd8d07618cbc3a3018583a66d178
parent66a0a3726adc17f1f5378c4c6de00bb930a370d5 (diff)
loplugin:cstylecast: deal with remaining pointer casts
Change-Id: I8c3f4d39629bbfee91402bddfe27b4d104c524c0
-rw-r--r--connectivity/source/commontools/TSortIndex.cxx2
-rw-r--r--connectivity/source/commontools/dbexception.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NConnection.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.cxx2
-rw-r--r--connectivity/source/drivers/evoab2/NResultSet.hxx2
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx2
-rw-r--r--connectivity/source/drivers/file/FConnection.cxx2
-rw-r--r--connectivity/source/drivers/firebird/Connection.cxx2
-rw-r--r--connectivity/source/drivers/firebird/ResultSet.hxx2
-rw-r--r--connectivity/source/drivers/jdbc/JBigDecimal.cxx4
-rw-r--r--connectivity/source/drivers/jdbc/JConnection.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/JStatement.cxx2
-rw-r--r--connectivity/source/drivers/jdbc/Timestamp.cxx6
-rw-r--r--connectivity/source/drivers/jdbc/tools.cxx2
-rw-r--r--connectivity/source/drivers/kab/KResultSet.hxx2
-rw-r--r--connectivity/source/drivers/macab/MacabConnection.cxx2
-rw-r--r--connectivity/source/drivers/macab/MacabResultSet.hxx2
-rw-r--r--connectivity/source/drivers/mork/MConnection.cxx2
-rw-r--r--connectivity/source/drivers/mork/MResultSet.hxx2
-rw-r--r--connectivity/source/drivers/mork/MStatement.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx10
-rw-r--r--connectivity/source/drivers/odbc/OResultSetMetaData.cxx4
-rw-r--r--connectivity/source/drivers/odbc/OTools.cxx8
-rw-r--r--connectivity/source/inc/file/FResultSet.hxx2
-rw-r--r--connectivity/source/inc/file/FStatement.hxx2
-rw-r--r--connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx2
-rw-r--r--connectivity/source/inc/odbc/OResultSet.hxx2
-rw-r--r--connectivity/source/inc/odbc/OStatement.hxx2
29 files changed, 40 insertions, 40 deletions
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 454cf06e5630..a48ccc69af74 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -108,7 +108,7 @@ void OSortIndex::AddKeyValue(OKeyValue * pKeyValue)
assert(pKeyValue && "Can not be null here!");
if(m_bFrozen)
{
- m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),(OKeyValue *)NULL));
+ m_aKeyValues.push_back(TIntValuePairVector::value_type(pKeyValue->getValue(),nullptr));
delete pKeyValue;
}
else
diff --git a/connectivity/source/commontools/dbexception.cxx b/connectivity/source/commontools/dbexception.cxx
index fa69855f95fc..391f15374033 100644
--- a/connectivity/source/commontools/dbexception.cxx
+++ b/connectivity/source/commontools/dbexception.cxx
@@ -264,7 +264,7 @@ SQLExceptionIteratorHelper::SQLExceptionIteratorHelper( const SQLExceptionInfo&
{
if ( _rChainStart.isValid() )
{
- m_pCurrent = (const SQLException*)_rChainStart;
+ m_pCurrent = static_cast<const SQLException*>(_rChainStart);
m_eCurrentType = _rChainStart.getType();
}
}
diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index 17ea5c65f729..c0a593a591aa 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -41,7 +41,7 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::lang;
OEvoabConnection::OEvoabConnection(OEvoabDriver& _rDriver)
- : OSubComponent<OEvoabConnection, OConnection_BASE>( (::cppu::OWeakObject*)(&_rDriver), this )
+ : OSubComponent<OEvoabConnection, OConnection_BASE>( static_cast<cppu::OWeakObject*>(&_rDriver), this )
, m_rDriver(_rDriver)
, m_eSDBCAddressType(SDBCAddress::EVO_LOCAL)
, m_xCatalog(NULL)
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx
index 27729d9fa462..45fb438a5b26 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.cxx
@@ -1038,7 +1038,7 @@ Reference< XInterface > SAL_CALL OEvoabResultSet::getStatement( ) throw(SQLExce
{
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
-::com::sun::star::uno::WeakReferenceHelper aStatement((OWeakObject*)m_pStatement);
+::com::sun::star::uno::WeakReferenceHelper aStatement(static_cast<OWeakObject*>(m_pStatement));
return aStatement.get();
}
diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx
index 6c761eedb360..080f909683be 100644
--- a/connectivity/source/drivers/evoab2/NResultSet.hxx
+++ b/connectivity/source/drivers/evoab2/NResultSet.hxx
@@ -123,7 +123,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this));
}
// ::cppu::OComponentHelper
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index 637d166fad03..94b3c8151a89 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -71,7 +71,7 @@ EBookQuery * createTest( const OUString &aColumnName,
OCommonStatement::OCommonStatement(OEvoabConnection* _pConnection)
: OCommonStatement_IBase(m_aMutex)
, ::comphelper::OPropertyContainer(OCommonStatement_IBase::rBHelper)
- , OStatement_CBase( (::cppu::OWeakObject*)_pConnection, this )
+ , OStatement_CBase( static_cast<cppu::OWeakObject*>(_pConnection), this )
, m_xResultSet(NULL)
, m_pConnection(_pConnection)
, m_aParser(_pConnection->getDriver().getComponentContext())
diff --git a/connectivity/source/drivers/file/FConnection.cxx b/connectivity/source/drivers/file/FConnection.cxx
index 1d5fdfb3054d..8f126573d822 100644
--- a/connectivity/source/drivers/file/FConnection.cxx
+++ b/connectivity/source/drivers/file/FConnection.cxx
@@ -56,7 +56,7 @@ using namespace ::ucbhelper;
typedef connectivity::OMetaConnection OConnection_BASE;
OConnection::OConnection(OFileDriver* _pDriver)
- : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this)
+ : OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
, m_pDriver(_pDriver)
, m_bClosed(false)
, m_bAutoCommit(false)
diff --git a/connectivity/source/drivers/firebird/Connection.cxx b/connectivity/source/drivers/firebird/Connection.cxx
index 11042c6fbd7b..6ba3b1c644d5 100644
--- a/connectivity/source/drivers/firebird/Connection.cxx
+++ b/connectivity/source/drivers/firebird/Connection.cxx
@@ -79,7 +79,7 @@ const OUString Connection::our_sDBLocation( "firebird.fdb" );
Connection::Connection(FirebirdDriver* _pDriver)
: Connection_BASE(m_aMutex)
- , OSubComponent<Connection, Connection_BASE>((::cppu::OWeakObject*)_pDriver, this)
+ , OSubComponent<Connection, Connection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
, m_xDriver(_pDriver)
, m_sConnectionURL()
, m_sFirebirdURL()
diff --git a/connectivity/source/drivers/firebird/ResultSet.hxx b/connectivity/source/drivers/firebird/ResultSet.hxx
index e1f2c689452a..be3d9ad2bc40 100644
--- a/connectivity/source/drivers/firebird/ResultSet.hxx
+++ b/connectivity/source/drivers/firebird/ResultSet.hxx
@@ -130,7 +130,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this));
}
// XInterface
diff --git a/connectivity/source/drivers/jdbc/JBigDecimal.cxx b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
index b65da39836af..58fd79335f8c 100644
--- a/connectivity/source/drivers/jdbc/JBigDecimal.cxx
+++ b/connectivity/source/drivers/jdbc/JBigDecimal.cxx
@@ -38,7 +38,7 @@ jclass java_math_BigDecimal::getMyClass() const
return theClass;
}
-java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_Object( NULL, (jobject)NULL )
+java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_Object( NULL, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -59,7 +59,7 @@ java_math_BigDecimal::java_math_BigDecimal( const OUString& _par0 ): java_lang_O
// and cleanup
}
-java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( NULL, (jobject)NULL )
+java_math_BigDecimal::java_math_BigDecimal( const double& _par0 ): java_lang_Object( NULL, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index da9c1882b0b4..94a88e40bf25 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -259,7 +259,7 @@ jclass java_sql_Connection::theClass = 0;
java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver )
:java_lang_Object()
- ,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>((::cppu::OWeakObject*)(&_rDriver), this)
+ ,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>(static_cast<cppu::OWeakObject*>(const_cast<java_sql_Driver *>(&_rDriver)), this)
,m_xContext( _rDriver.getContext() )
,m_pDriver( &_rDriver )
,m_pDriverobject(NULL)
diff --git a/connectivity/source/drivers/jdbc/JStatement.cxx b/connectivity/source/drivers/jdbc/JStatement.cxx
index 223a47663745..568a62404f66 100644
--- a/connectivity/source/drivers/jdbc/JStatement.cxx
+++ b/connectivity/source/drivers/jdbc/JStatement.cxx
@@ -395,7 +395,7 @@ Any SAL_CALL java_sql_Statement_Base::getWarnings( ) throw(::com::sun::star::sd
java_sql_SQLWarning_BASE warn_base( t.pEnv, out );
return makeAny(
static_cast< css::sdbc::SQLException >(
- java_sql_SQLWarning(warn_base,*(::cppu::OWeakObject*)this)));
+ java_sql_SQLWarning(warn_base,*static_cast<cppu::OWeakObject*>(this))));
}
return Any();
diff --git a/connectivity/source/drivers/jdbc/Timestamp.cxx b/connectivity/source/drivers/jdbc/Timestamp.cxx
index 96484733430c..492539ef9eba 100644
--- a/connectivity/source/drivers/jdbc/Timestamp.cxx
+++ b/connectivity/source/drivers/jdbc/Timestamp.cxx
@@ -29,7 +29,7 @@ using namespace connectivity;
jclass java_sql_Date::theClass = 0;
-java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java_util_Date( NULL, (jobject)NULL )
+java_sql_Date::java_sql_Date( const ::com::sun::star::util::Date& _rOut ) : java_util_Date( NULL, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -97,7 +97,7 @@ jclass java_sql_Time::st_getMyClass()
theClass = findMyClass("java/sql/Time");
return theClass;
}
-java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( NULL, (jobject)NULL )
+java_sql_Time::java_sql_Time( const ::com::sun::star::util::Time& _rOut ): java_util_Date( NULL, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
@@ -153,7 +153,7 @@ jclass java_sql_Timestamp::st_getMyClass()
}
java_sql_Timestamp::java_sql_Timestamp(const ::com::sun::star::util::DateTime& _rOut)
- :java_util_Date( NULL, (jobject)NULL )
+ :java_util_Date( NULL, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
diff --git a/connectivity/source/drivers/jdbc/tools.cxx b/connectivity/source/drivers/jdbc/tools.cxx
index 54fa59c5215b..a528e1128b7d 100644
--- a/connectivity/source/drivers/jdbc/tools.cxx
+++ b/connectivity/source/drivers/jdbc/tools.cxx
@@ -75,7 +75,7 @@ jclass java_util_Properties::getMyClass() const
}
-java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, (jobject)NULL )
+java_util_Properties::java_util_Properties( ): java_lang_Object( NULL, nullptr )
{
SDBThreadAttach t;
if( !t.pEnv )
diff --git a/connectivity/source/drivers/kab/KResultSet.hxx b/connectivity/source/drivers/kab/KResultSet.hxx
index 75910d8bdd06..78fbffe14cc8 100644
--- a/connectivity/source/drivers/kab/KResultSet.hxx
+++ b/connectivity/source/drivers/kab/KResultSet.hxx
@@ -95,7 +95,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(KabResultSet_BASE*) this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<KabResultSet_BASE*>(this));
}
void allKabAddressees();
diff --git a/connectivity/source/drivers/macab/MacabConnection.cxx b/connectivity/source/drivers/macab/MacabConnection.cxx
index b42063c71ab4..9e408a9bdae2 100644
--- a/connectivity/source/drivers/macab/MacabConnection.cxx
+++ b/connectivity/source/drivers/macab/MacabConnection.cxx
@@ -38,7 +38,7 @@ using namespace com::sun::star::sdbcx;
IMPLEMENT_SERVICE_INFO(MacabConnection, "com.sun.star.sdbc.drivers.MacabConnection", "com.sun.star.sdbc.Connection")
MacabConnection::MacabConnection(MacabDriver* _pDriver)
- : OSubComponent<MacabConnection, MacabConnection_BASE>((::cppu::OWeakObject*)_pDriver, this),
+ : OSubComponent<MacabConnection, MacabConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this),
m_pAddressBook(NULL),
m_pDriver(_pDriver)
{
diff --git a/connectivity/source/drivers/macab/MacabResultSet.hxx b/connectivity/source/drivers/macab/MacabResultSet.hxx
index 5970d43a8a69..747b6a192e3e 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.hxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.hxx
@@ -95,7 +95,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(MacabResultSet_BASE*) this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<MacabResultSet_BASE*>(this));
}
void allMacabRecords();
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx
index 8112a16d3d20..5efb9d0f2a47 100644
--- a/connectivity/source/drivers/mork/MConnection.cxx
+++ b/connectivity/source/drivers/mork/MConnection.cxx
@@ -47,7 +47,7 @@ static const int defaultScope = 0x80;
OConnection::OConnection(MorkDriver* _pDriver)
- :OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this)
+ :OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
,m_pDriver(_pDriver)
,m_aColumnAlias( _pDriver->getFactory() )
{
diff --git a/connectivity/source/drivers/mork/MResultSet.hxx b/connectivity/source/drivers/mork/MResultSet.hxx
index e35fa7927837..7a18d3aa3f7f 100644
--- a/connectivity/source/drivers/mork/MResultSet.hxx
+++ b/connectivity/source/drivers/mork/MResultSet.hxx
@@ -121,7 +121,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this));
}
// ::cppu::OComponentHelper
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 8645c38cd99f..fbfd54d3642a 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -77,7 +77,7 @@ OStatement::OStatement( OConnection* _pConnection) : OCommonStatement( _pConnect
OCommonStatement::OCommonStatement(OConnection* _pConnection )
:OCommonStatement_IBASE(m_aMutex)
,OPropertySetHelper(OCommonStatement_IBASE::rBHelper)
- ,OCommonStatement_SBASE((::cppu::OWeakObject*)_pConnection, this)
+ ,OCommonStatement_SBASE(static_cast<cppu::OWeakObject*>(_pConnection), this)
,m_pTable(NULL)
,m_pConnection(_pConnection)
,m_aParser( comphelper::getComponentContext(_pConnection->getDriver()->getFactory()) )
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index 458819ee4a0c..39c855bcbd8e 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -46,7 +46,7 @@ using namespace com::sun::star::beans;
using namespace com::sun::star::sdbc;
OConnection::OConnection(const SQLHANDLE _pDriverHandle,ODBCDriver* _pDriver)
- : OSubComponent<OConnection, OConnection_BASE>((::cppu::OWeakObject*)_pDriver, this)
+ : OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this)
,m_pDriver(_pDriver)
,m_aConnectionHandle(NULL)
,m_pDriverHandleCopy(_pDriverHandle)
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index c2fd559511b2..a62686b99272 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -1033,7 +1033,7 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex ) throw(SQLException
m_aBindVector.push_back(allocBindColumn(DataType::CHAR,columnIndex));
void* pData = reinterpret_cast<void*>(m_aBindVector.rbegin()->first);
- OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_CHAR,0,(sal_Int8*)NULL,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding,m_pStatement->getOwnConnection()->useOldDateFormat());
+ OTools::bindValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,SQL_CHAR,0,nullptr,pData,&m_aLengthVector[columnIndex],**this,m_nTextEncoding,m_pStatement->getOwnConnection()->useOldDateFormat());
}
@@ -1081,7 +1081,7 @@ void SAL_CALL OResultSet::updateString( sal_Int32 columnIndex, const OUString& x
m_aRow[columnIndex] = x;
m_aRow[columnIndex].setTypeKind(nType); // OJ: otherwise longvarchar will be recognized by fillNeededData
m_aRow[columnIndex].setBound(true);
- updateValue(columnIndex,nOdbcType,(void*)&x);
+ updateValue(columnIndex,nOdbcType,const_cast<OUString *>(&x));
}
void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sal_Int8 >& x ) throw(SQLException, RuntimeException, std::exception)
@@ -1091,7 +1091,7 @@ void SAL_CALL OResultSet::updateBytes( sal_Int32 columnIndex, const Sequence< sa
m_aRow[columnIndex] = x;
m_aRow[columnIndex].setTypeKind(nType); // OJ: otherwise longvarbinary will be recognized by fillNeededData
m_aRow[columnIndex].setBound(true);
- updateValue(columnIndex,nOdbcType,(void*)&x);
+ updateValue(columnIndex,nOdbcType,const_cast<css::uno::Sequence<sal_Int8> *>(&x));
}
void SAL_CALL OResultSet::updateDate( sal_Int32 columnIndex, const Date& x ) throw(SQLException, RuntimeException, std::exception)
@@ -1810,7 +1810,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
{
OUString sRet;
sRet = m_aRow[nColumnIndex].getString();
- nRet = N3SQLPutData (m_aStatementHandle, (SQLPOINTER)sRet.getStr(), sizeof(sal_Unicode)*sRet.getLength());
+ nRet = N3SQLPutData (m_aStatementHandle, static_cast<SQLPOINTER>(const_cast<sal_Unicode *>(sRet.getStr())), sizeof(sal_Unicode)*sRet.getLength());
break;
}
case DataType::LONGVARCHAR:
@@ -1819,7 +1819,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
OUString sRet;
sRet = m_aRow[nColumnIndex].getString();
OString aString(OUStringToOString(sRet,m_nTextEncoding));
- nRet = N3SQLPutData (m_aStatementHandle, (SQLPOINTER)aString.getStr(), aString.getLength());
+ nRet = N3SQLPutData (m_aStatementHandle, static_cast<SQLPOINTER>(const_cast<char *>(aString.getStr())), aString.getLength());
break;
}
default:
diff --git a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
index 73d1e0920d27..85c62006962a 100644
--- a/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
+++ b/connectivity/source/drivers/odbc/OResultSetMetaData.cxx
@@ -42,7 +42,7 @@ OUString OResultSetMetaData::getCharColAttrib(sal_Int32 _column,sal_Int32 ident)
SQLRETURN nRet = N3SQLColAttribute(m_aStatementHandle,
(SQLUSMALLINT)column,
(SQLUSMALLINT)ident,
- (SQLPOINTER)pName,
+ static_cast<SQLPOINTER>(pName),
BUFFER_LEN,
&nRealLen,
NULL
@@ -62,7 +62,7 @@ OUString OResultSetMetaData::getCharColAttrib(sal_Int32 _column,sal_Int32 ident)
nRet = N3SQLColAttribute(m_aStatementHandle,
(SQLUSMALLINT)column,
(SQLUSMALLINT)ident,
- (SQLPOINTER)pName,
+ static_cast<SQLPOINTER>(pName),
nRealLen,
&nRealLen,
NULL
diff --git a/connectivity/source/drivers/odbc/OTools.cxx b/connectivity/source/drivers/odbc/OTools.cxx
index db5eb179c4d0..f92f3df1b79d 100644
--- a/connectivity/source/drivers/odbc/OTools.cxx
+++ b/connectivity/source/drivers/odbc/OTools.cxx
@@ -198,7 +198,7 @@ void OTools::bindValue( OConnection* _pConnection,
_nMaxLen = (SQLSMALLINT)aString.getLength();
// Pointer on Char*
- _pData = (void*)aString.getStr();
+ _pData = const_cast<char *>(aString.getStr());
} break;
case SQL_BIGINT:
*static_cast<sal_Int64*>(_pData) = *static_cast<sal_Int64 const *>(_pValue);
@@ -212,7 +212,7 @@ void OTools::bindValue( OConnection* _pConnection,
*pLen = _nMaxLen;
*static_cast<OString*>(_pData) = aString;
// Pointer on Char*
- _pData = (void*)static_cast<OString*>(_pData)->getStr();
+ _pData = const_cast<char *>(static_cast<OString*>(_pData)->getStr());
} break;
case SQL_BIT:
case SQL_TINYINT:
@@ -240,7 +240,7 @@ void OTools::bindValue( OConnection* _pConnection,
case SQL_BINARY:
case SQL_VARBINARY:
{
- _pData = (void*)static_cast<const ::com::sun::star::uno::Sequence< sal_Int8 > *>(_pValue)->getConstArray();
+ _pData = const_cast<sal_Int8 *>(static_cast<const ::com::sun::star::uno::Sequence< sal_Int8 > *>(_pValue)->getConstArray());
*pLen = static_cast<const ::com::sun::star::uno::Sequence< sal_Int8 > *>(_pValue)->getLength();
} break;
case SQL_LONGVARBINARY:
@@ -371,7 +371,7 @@ Sequence<sal_Int8> OTools::getBytesValue(const OConnection* _pConnection,
_aStatementHandle,
(SQLUSMALLINT)columnIndex,
_fSqlType,
- (SQLPOINTER)aCharArray,
+ static_cast<SQLPOINTER>(aCharArray),
nMaxLen,
&pcbValue),
_aStatementHandle,SQL_HANDLE_STMT,_xInterface);
diff --git a/connectivity/source/inc/file/FResultSet.hxx b/connectivity/source/inc/file/FResultSet.hxx
index d89d9700f176..405a70d4c5a3 100644
--- a/connectivity/source/inc/file/FResultSet.hxx
+++ b/connectivity/source/inc/file/FResultSet.hxx
@@ -174,7 +174,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this));
}
// ::cppu::OComponentHelper
diff --git a/connectivity/source/inc/file/FStatement.hxx b/connectivity/source/inc/file/FStatement.hxx
index b7747c8b6c63..1ee2f09cb3bb 100644
--- a/connectivity/source/inc/file/FStatement.hxx
+++ b/connectivity/source/inc/file/FStatement.hxx
@@ -173,7 +173,7 @@ namespace connectivity
friend class connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>;
public:
OStatement_BASE2(OConnection* _pConnection ) : OStatement_Base(_pConnection ),
- connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this){}
+ connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>(static_cast<cppu::OWeakObject*>(_pConnection), this){}
// OComponentHelper
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XInterface
diff --git a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
index fee8093b4a7f..c572c3ac869f 100644
--- a/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
+++ b/connectivity/source/inc/odbc/ODatabaseMetaDataResultSet.hxx
@@ -138,7 +138,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(ODatabaseMetaDataResultSet_BASE*)this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<ODatabaseMetaDataResultSet_BASE*>(this));
}
// XResultSet
virtual sal_Bool SAL_CALL next( ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
diff --git a/connectivity/source/inc/odbc/OResultSet.hxx b/connectivity/source/inc/odbc/OResultSet.hxx
index d1779d6ddfe4..a501a70f936f 100644
--- a/connectivity/source/inc/odbc/OResultSet.hxx
+++ b/connectivity/source/inc/odbc/OResultSet.hxx
@@ -228,7 +228,7 @@ namespace connectivity
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > operator *()
{
- return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*(OResultSet_BASE*)this);
+ return ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(*static_cast<OResultSet_BASE*>(this));
}
inline void setMetaData(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData>& _xMetaData) { m_xMetaData = _xMetaData;}
diff --git a/connectivity/source/inc/odbc/OStatement.hxx b/connectivity/source/inc/odbc/OStatement.hxx
index 975eb0b5f60a..3f40d2bdc9f4 100644
--- a/connectivity/source/inc/odbc/OStatement.hxx
+++ b/connectivity/source/inc/odbc/OStatement.hxx
@@ -210,7 +210,7 @@ namespace connectivity
friend class OSubComponent<OStatement_BASE2, OStatement_BASE>;
public:
OStatement_BASE2(OConnection* _pConnection ) : OStatement_Base(_pConnection ),
- ::connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>((::cppu::OWeakObject*)_pConnection, this){}
+ ::connectivity::OSubComponent<OStatement_BASE2, OStatement_BASE>(static_cast<cppu::OWeakObject*>(_pConnection), this){}
// OComponentHelper
virtual void SAL_CALL disposing() SAL_OVERRIDE;
// XInterface