diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-04 10:13:10 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-04 10:13:10 +0100 |
commit | d48668ecdb5e7523ee25a09afb76ca46b22a4fea (patch) | |
tree | 395b4bfd4921cac769b20cc7a1b5cbf65a3055f5 /connectivity | |
parent | d7e5ee16069106df4e8f11d7dac598fff33425b8 (diff) |
connectivity (Linux): loplugin:cstylecast
Change-Id: If2a3306360ea3db4476b09774e4f93c2c0dc4027
Diffstat (limited to 'connectivity')
5 files changed, 9 insertions, 13 deletions
diff --git a/connectivity/source/drivers/evoab2/NResultSet.cxx b/connectivity/source/drivers/evoab2/NResultSet.cxx index bbf643c78a7e..4cacbb173b92 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.cxx +++ b/connectivity/source/drivers/evoab2/NResultSet.cxx @@ -614,7 +614,6 @@ OEvoabResultSet::OEvoabResultSet( OCommonStatement* pStmt, OEvoabConnection *pCo ,::comphelper::OPropertyContainer( OResultSet_BASE::rBHelper ) ,m_pStatement(pStmt) ,m_pConnection(pConnection) - ,m_xMetaData(NULL) ,m_bWasNull(true) ,m_nFetchSize(0) ,m_nResultSetType(ResultSetType::SCROLL_INSENSITIVE) @@ -702,10 +701,9 @@ void OEvoabResultSet::construct( const QueryData& _rData ) m_nIndex = -1; // create our meta data (need the EBookQuery for this) - OEvoabResultSetMetaData* pMeta = new OEvoabResultSetMetaData( _rData.sTable ); - m_xMetaData = pMeta; + m_xMetaData = new OEvoabResultSetMetaData( _rData.sTable ); - pMeta->setEvoabFields( _rData.xSelectColumns ); + m_xMetaData->setEvoabFields( _rData.xSelectColumns ); } @@ -753,8 +751,7 @@ OUString SAL_CALL OEvoabResultSet::getString( sal_Int32 nColumnNum ) throw(SQLEx OUString aResult; if ( m_xMetaData.is()) { - OEvoabResultSetMetaData *pMeta = (OEvoabResultSetMetaData *) m_xMetaData.get(); - sal_Int32 nFieldNumber = pMeta->fieldAtColumn(nColumnNum); + sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(nColumnNum); GValue aValue = { 0, { { 0 } } }; if ( getValue( getCur(), nFieldNumber, G_TYPE_STRING, &aValue, m_bWasNull ) ) aResult = valueToOUString( aValue ); @@ -770,8 +767,7 @@ sal_Bool SAL_CALL OEvoabResultSet::getBoolean( sal_Int32 nColumnNum ) throw(SQLE if ( m_xMetaData.is()) { - OEvoabResultSetMetaData *pMeta = (OEvoabResultSetMetaData *) m_xMetaData.get(); - sal_Int32 nFieldNumber = pMeta->fieldAtColumn(nColumnNum); + sal_Int32 nFieldNumber = m_xMetaData->fieldAtColumn(nColumnNum); GValue aValue = { 0, { { 0 } } }; if ( getValue( getCur(), nFieldNumber, G_TYPE_BOOLEAN, &aValue, m_bWasNull ) ) bResult = valueToBool( aValue ); @@ -891,7 +887,7 @@ Reference< XResultSetMetaData > SAL_CALL OEvoabResultSet::getMetaData( ) throw( // the meta data should have been created at construction time ENSURE_OR_THROW( m_xMetaData.is(), "internal error: no meta data" ); - return m_xMetaData; + return m_xMetaData.get(); } // XResultSetMetaDataSupplier Interface Ends diff --git a/connectivity/source/drivers/evoab2/NResultSet.hxx b/connectivity/source/drivers/evoab2/NResultSet.hxx index e1bf253e514b..760f9d7db576 100644 --- a/connectivity/source/drivers/evoab2/NResultSet.hxx +++ b/connectivity/source/drivers/evoab2/NResultSet.hxx @@ -87,7 +87,7 @@ namespace connectivity OCommonStatement* m_pStatement; OEvoabConnection* m_pConnection; ::com::sun::star::uno::WeakReferenceHelper m_aStatement; - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; + rtl::Reference<OEvoabResultSetMetaData> m_xMetaData; ::dbtools::WarningsContainer m_aWarnings; bool m_bWasNull; diff --git a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx index c8bda379e966..47df22cf550d 100644 --- a/connectivity/source/drivers/kab/KDatabaseMetaData.cxx +++ b/connectivity/source/drivers/kab/KDatabaseMetaData.cxx @@ -770,7 +770,7 @@ sal_Bool SAL_CALL KabDatabaseMetaData::supportsBatchUpdates( ) throw(SQLExcepti Reference< XConnection > SAL_CALL KabDatabaseMetaData::getConnection( ) throw(SQLException, RuntimeException, std::exception) { - return (Reference< XConnection >) m_xConnection.get(); + return m_xConnection.get(); } Reference< XResultSet > SAL_CALL KabDatabaseMetaData::getTableTypes( ) throw(SQLException, RuntimeException, std::exception) diff --git a/connectivity/source/drivers/kab/KPreparedStatement.cxx b/connectivity/source/drivers/kab/KPreparedStatement.cxx index 6b1c9d741d2c..b085b0543c3a 100644 --- a/connectivity/source/drivers/kab/KPreparedStatement.cxx +++ b/connectivity/source/drivers/kab/KPreparedStatement.cxx @@ -164,7 +164,7 @@ Reference< XConnection > SAL_CALL KabPreparedStatement::getConnection() throw(SQ ::osl::MutexGuard aGuard( m_aMutex ); checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); - return (Reference< XConnection >) m_pConnection; + return m_pConnection; } Reference< XResultSet > SAL_CALL KabPreparedStatement::executeQuery() throw(SQLException, RuntimeException, std::exception) diff --git a/connectivity/source/drivers/kab/KStatement.cxx b/connectivity/source/drivers/kab/KStatement.cxx index 2721a7da0b95..1c35390dbd8a 100644 --- a/connectivity/source/drivers/kab/KStatement.cxx +++ b/connectivity/source/drivers/kab/KStatement.cxx @@ -445,7 +445,7 @@ Reference< XConnection > SAL_CALL KabCommonStatement::getConnection( ) throw(SQ checkDisposed(KabCommonStatement_BASE::rBHelper.bDisposed); // just return our connection here - return (Reference< XConnection >) m_pConnection; + return m_pConnection; } sal_Int32 SAL_CALL KabCommonStatement::executeUpdate( const OUString& ) throw(SQLException, RuntimeException, std::exception) |