From 5c7b954935369cbbd22a6f43be63ac7c0ddbbfdc Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 29 Jan 2018 13:28:44 +0200 Subject: loplugin:useuniqueptr in OTable use rtl::Reference here since these are reference counted data structures, and we hand out references to me via our API Change-Id: I8f69dde2db08519cb3d9de20b4ad54462e3ecc98 Reviewed-on: https://gerrit.libreoffice.org/49180 Tested-by: Jenkins Reviewed-by: Noel Grandin --- dbaccess/source/core/api/table.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'dbaccess') diff --git a/dbaccess/source/core/api/table.cxx b/dbaccess/source/core/api/table.cxx index 5ea0353b7e06..c2f13dcf9bdc 100644 --- a/dbaccess/source/core/api/table.cxx +++ b/dbaccess/source/core/api/table.cxx @@ -103,7 +103,7 @@ OColumn* ODBTable::createColumn(const OUString& _rName) const } else { - OColumns* pColumns = static_cast(m_pColumns); + OColumns* pColumns = static_cast(m_xColumns.get()); xProp.set(pColumns->createBaseObject(_rName),UNO_QUERY); } @@ -294,12 +294,12 @@ void SAL_CALL ODBTable::alterColumnByName( const OUString& _rName, const Referen if ( !getAlterService().is() ) throw SQLException(DBA_RES(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); - if ( !m_pColumns->hasByName(_rName) ) + if ( !m_xColumns->hasByName(_rName) ) throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,Any() ); Reference xTable(this); getAlterService()->alterColumnByName(xTable,_rName,_rxDescriptor); - m_pColumns->refresh(); + m_xColumns->refresh(); } sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) -- cgit