Kaydet (Commit) 5c7b9549 authored tarafından Noel Grandin's avatar Noel Grandin

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/49180Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 68d9583d
...@@ -299,10 +299,10 @@ void OTableHelper::refreshColumns() ...@@ -299,10 +299,10 @@ void OTableHelper::refreshColumns()
); );
} }
if(m_pColumns) if(m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = createColumns(aVector); m_xColumns = createColumns(aVector);
} }
const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const const ColumnDesc* OTableHelper::getColumnDescription(const OUString& _sName) const
...@@ -424,10 +424,10 @@ void OTableHelper::refreshKeys() ...@@ -424,10 +424,10 @@ void OTableHelper::refreshKeys()
{ {
refreshPrimaryKeys(aNames); refreshPrimaryKeys(aNames);
refreshForeignKeys(aNames); refreshForeignKeys(aNames);
m_pKeys = createKeys(aNames); m_xKeys = createKeys(aNames);
} // if(!isNew()) } // if(!isNew())
else if (!m_pKeys ) else if (!m_xKeys )
m_pKeys = createKeys(aNames); m_xKeys = createKeys(aNames);
/*if(m_pKeys) /*if(m_pKeys)
m_pKeys->reFill(aVector); m_pKeys->reFill(aVector);
else*/ else*/
...@@ -469,10 +469,10 @@ void OTableHelper::refreshIndexes() ...@@ -469,10 +469,10 @@ void OTableHelper::refreshIndexes()
} }
} }
if(m_pIndexes) if(m_xIndexes)
m_pIndexes->reFill(aVector); m_xIndexes->reFill(aVector);
else else
m_pIndexes = createIndexes(aVector); m_xIndexes = createIndexes(aVector);
} }
OUString OTableHelper::getRenameStart() const OUString OTableHelper::getRenameStart() const
...@@ -549,7 +549,7 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference ...@@ -549,7 +549,7 @@ void SAL_CALL OTableHelper::alterColumnByIndex( sal_Int32 index, const Reference
); );
Reference< XPropertySet > xOld( Reference< XPropertySet > xOld(
m_pColumns->getByIndex(index), css::uno::UNO_QUERY); m_xColumns->getByIndex(index), css::uno::UNO_QUERY);
if(xOld.is()) if(xOld.is())
alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor); alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor);
} }
......
...@@ -84,10 +84,10 @@ void OAdoTable::refreshColumns() ...@@ -84,10 +84,10 @@ void OAdoTable::refreshColumns()
aColumns.fillElementNames(aVector); aColumns.fillElementNames(aVector);
} }
if(m_pColumns) if(m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection()); m_xColumns = new OColumns(*this,m_aMutex,aVector,aColumns,isCaseSensitive(),m_pCatalog->getConnection());
} }
void OAdoTable::refreshKeys() void OAdoTable::refreshKeys()
...@@ -101,10 +101,10 @@ void OAdoTable::refreshKeys() ...@@ -101,10 +101,10 @@ void OAdoTable::refreshKeys()
aKeys.fillElementNames(aVector); aKeys.fillElementNames(aVector);
} }
if(m_pKeys) if(m_xKeys)
m_pKeys->reFill(aVector); m_xKeys->reFill(aVector);
else else
m_pKeys = new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection()); m_xKeys = new OKeys(*this,m_aMutex,aVector,aKeys,isCaseSensitive(),m_pCatalog->getConnection());
} }
void OAdoTable::refreshIndexes() void OAdoTable::refreshIndexes()
...@@ -118,10 +118,10 @@ void OAdoTable::refreshIndexes() ...@@ -118,10 +118,10 @@ void OAdoTable::refreshIndexes()
aIndexes.fillElementNames(aVector); aIndexes.fillElementNames(aVector);
} }
if(m_pIndexes) if(m_xIndexes)
m_pIndexes->reFill(aVector); m_xIndexes->reFill(aVector);
else else
m_pIndexes = new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection()); m_xIndexes = new OIndexes(*this,m_aMutex,aVector,aIndexes,isCaseSensitive(),m_pCatalog->getConnection());
} }
Sequence< sal_Int8 > OAdoTable::getUnoTunnelImplementationId() Sequence< sal_Int8 > OAdoTable::getUnoTunnelImplementationId()
...@@ -174,7 +174,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer ...@@ -174,7 +174,7 @@ void SAL_CALL OAdoTable::alterColumnByName( const OUString& colName, const Refer
if(bError) if(bError)
ADOS::ThrowException(*(m_pCatalog->getConnection()->getConnection()),*this); ADOS::ThrowException(*(m_pCatalog->getConnection()->getConnection()),*this);
m_pColumns->refresh(); m_xColumns->refresh();
refreshColumns(); refreshColumns();
} }
...@@ -184,7 +184,7 @@ void SAL_CALL OAdoTable::alterColumnByIndex( sal_Int32 index, const Reference< X ...@@ -184,7 +184,7 @@ void SAL_CALL OAdoTable::alterColumnByIndex( sal_Int32 index, const Reference< X
checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed); checkDisposed(OTableDescriptor_BASE_TYPEDEF::rBHelper.bDisposed);
Reference< XPropertySet > xOld; Reference< XPropertySet > xOld;
m_pColumns->getByIndex(index) >>= xOld; m_xColumns->getByIndex(index) >>= xOld;
if(xOld.is()) if(xOld.is())
alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor); alterColumnByName(getString(xOld->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))),descriptor);
} }
......
...@@ -90,10 +90,10 @@ void OComponentTable::refreshColumns() ...@@ -90,10 +90,10 @@ void OComponentTable::refreshColumns()
for(OSQLColumns::Vector::const_iterator aIter = m_aColumns->get().begin();aIter != aEnd;++aIter) for(OSQLColumns::Vector::const_iterator aIter = m_aColumns->get().begin();aIter != aEnd;++aIter)
aVector.push_back(Reference< XNamed>(*aIter,UNO_QUERY)->getName()); aVector.push_back(Reference< XNamed>(*aIter,UNO_QUERY)->getName());
if(m_pColumns) if(m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new component::OComponentColumns(this,m_aMutex,aVector); m_xColumns = new component::OComponentColumns(this,m_aMutex,aVector);
} }
void OComponentTable::refreshIndexes() void OComponentTable::refreshIndexes()
......
...@@ -645,16 +645,16 @@ void ODbaseTable::refreshColumns() ...@@ -645,16 +645,16 @@ void ODbaseTable::refreshColumns()
for (auto const& column : m_aColumns->get()) for (auto const& column : m_aColumns->get())
aVector.push_back(Reference< XNamed>(column,UNO_QUERY)->getName()); aVector.push_back(Reference< XNamed>(column,UNO_QUERY)->getName());
if(m_pColumns) if(m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new ODbaseColumns(this,m_aMutex,aVector); m_xColumns = new ODbaseColumns(this,m_aMutex,aVector);
} }
void ODbaseTable::refreshIndexes() void ODbaseTable::refreshIndexes()
{ {
::std::vector< OUString> aVector; ::std::vector< OUString> aVector;
if(m_pFileStream && (!m_pIndexes || m_pIndexes->getCount() == 0)) if(m_pFileStream && (!m_xIndexes || m_xIndexes->getCount() == 0))
{ {
INetURLObject aURL; INetURLObject aURL;
aURL.SetURL(getEntry(m_pConnection,m_Name)); aURL.SetURL(getEntry(m_pConnection,m_Name));
...@@ -688,10 +688,10 @@ void ODbaseTable::refreshIndexes() ...@@ -688,10 +688,10 @@ void ODbaseTable::refreshIndexes()
} }
} }
} }
if(m_pIndexes) if(m_xIndexes)
m_pIndexes->reFill(aVector); m_xIndexes->reFill(aVector);
else else
m_pIndexes = new ODbaseIndexes(this,m_aMutex,aVector); m_xIndexes = new ODbaseIndexes(this,m_aMutex,aVector);
} }
...@@ -1182,7 +1182,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo) ...@@ -1182,7 +1182,7 @@ bool ODbaseTable::CreateFile(const INetURLObject& aFile, bool& bCreateMemo)
(*m_pFileStream).WriteUChar( aDate.GetMonth() ); (*m_pFileStream).WriteUChar( aDate.GetMonth() );
(*m_pFileStream).WriteUChar( aDate.GetDay() ); (*m_pFileStream).WriteUChar( aDate.GetDay() );
(*m_pFileStream).WriteUInt32( 0 ); // number of data records (*m_pFileStream).WriteUInt32( 0 ); // number of data records
(*m_pFileStream).WriteUInt16( (m_pColumns->getCount()+1) * 32 + 1 ); // header information, (*m_pFileStream).WriteUInt16( (m_xColumns->getCount()+1) * 32 + 1 ); // header information,
// pColumns contains always an additional column // pColumns contains always an additional column
(*m_pFileStream).WriteUInt16( 0 ); // record length will be determined later (*m_pFileStream).WriteUInt16( 0 ); // record length will be determined later
m_pFileStream->WriteBytes(aBuffer, 20); m_pFileStream->WriteBytes(aBuffer, 20);
...@@ -1440,15 +1440,15 @@ bool ODbaseTable::DropImpl() ...@@ -1440,15 +1440,15 @@ bool ODbaseTable::DropImpl()
{ {
FileClose(); FileClose();
if(!m_pIndexes) if(!m_xIndexes)
refreshIndexes(); // look for indexes which must be deleted as well refreshIndexes(); // look for indexes which must be deleted as well
bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_pIndexes); bool bDropped = Drop_Static(getEntry(m_pConnection,m_Name),HasMemoFields(),m_xIndexes.get());
if(!bDropped) if(!bDropped)
{// we couldn't drop the table so we have to reopen it {// we couldn't drop the table so we have to reopen it
construct(); construct();
if(m_pColumns) if(m_xColumns)
m_pColumns->refresh(); m_xColumns->refresh();
} }
return bDropped; return bDropped;
} }
...@@ -1556,12 +1556,12 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) ...@@ -1556,12 +1556,12 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
Reference<XPropertySet> xCol; Reference<XPropertySet> xCol;
OUString aColName; OUString aColName;
::comphelper::UStringMixEqual aCase(isCaseSensitive()); ::comphelper::UStringMixEqual aCase(isCaseSensitive());
for (sal_Int32 i = 0; i < m_pColumns->getCount(); i++) for (sal_Int32 i = 0; i < m_xColumns->getCount(); i++)
{ {
Reference<XPropertySet> xIndex = isUniqueByColumnName(i); Reference<XPropertySet> xIndex = isUniqueByColumnName(i);
if (xIndex.is()) if (xIndex.is())
{ {
xCol.set(m_pColumns->getByIndex(i), css::uno::UNO_QUERY); xCol.set(m_xColumns->getByIndex(i), css::uno::UNO_QUERY);
OSL_ENSURE(xCol.is(),"ODbaseTable::DeleteRow column is null!"); OSL_ENSURE(xCol.is(),"ODbaseTable::DeleteRow column is null!");
if(xCol.is()) if(xCol.is())
{ {
...@@ -1595,20 +1595,20 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols) ...@@ -1595,20 +1595,20 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos) Reference<XPropertySet> ODbaseTable::isUniqueByColumnName(sal_Int32 _nColumnPos)
{ {
if(!m_pIndexes) if(!m_xIndexes)
refreshIndexes(); refreshIndexes();
if(m_pIndexes->hasElements()) if(m_xIndexes->hasElements())
{ {
Reference<XPropertySet> xCol; Reference<XPropertySet> xCol;
m_pColumns->getByIndex(_nColumnPos) >>= xCol; m_xColumns->getByIndex(_nColumnPos) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::isUniqueByColumnName column is null!"); OSL_ENSURE(xCol.is(),"ODbaseTable::isUniqueByColumnName column is null!");
OUString sColName; OUString sColName;
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sColName;
Reference<XPropertySet> xIndex; Reference<XPropertySet> xIndex;
for(sal_Int32 i=0;i<m_pIndexes->getCount();++i) for(sal_Int32 i=0;i<m_xIndexes->getCount();++i)
{ {
xIndex.set(m_pIndexes->getByIndex(i), css::uno::UNO_QUERY); xIndex.set(m_xIndexes->getByIndex(i), css::uno::UNO_QUERY);
if(xIndex.is() && getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE)))) if(xIndex.is() && getBOOL(xIndex->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISUNIQUE))))
{ {
Reference<XNameAccess> xCols(Reference<XColumnsSupplier>(xIndex,UNO_QUERY)->getColumns()); Reference<XNameAccess> xCols(Reference<XColumnsSupplier>(xIndex,UNO_QUERY)->getColumns());
...@@ -1638,19 +1638,19 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1638,19 +1638,19 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
Reference<XPropertySet> xCol; Reference<XPropertySet> xCol;
Reference<XPropertySet> xIndex; Reference<XPropertySet> xIndex;
OUString aColName; OUString aColName;
const sal_Int32 nColumnCount = m_pColumns->getCount(); const sal_Int32 nColumnCount = m_xColumns->getCount();
std::vector< Reference<XPropertySet> > aIndexedCols(nColumnCount); std::vector< Reference<XPropertySet> > aIndexedCols(nColumnCount);
::comphelper::UStringMixEqual aCase(isCaseSensitive()); ::comphelper::UStringMixEqual aCase(isCaseSensitive());
Reference<XIndexAccess> xColumns = m_pColumns; Reference<XIndexAccess> xColumns = m_xColumns.get();
// first search a key that exist already in the table // first search a key that exist already in the table
for (sal_Int32 i = 0; i < nColumnCount; ++i) for (sal_Int32 i = 0; i < nColumnCount; ++i)
{ {
sal_Int32 nPos = i; sal_Int32 nPos = i;
if(_xCols != xColumns) if(_xCols != xColumns)
{ {
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!"); OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!");
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
...@@ -1686,7 +1686,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1686,7 +1686,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
// There is no unique value // There is no unique value
if ( aColName.isEmpty() ) if ( aColName.isEmpty() )
{ {
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!"); OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!");
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
xCol.clear(); xCol.clear();
...@@ -1719,7 +1719,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1719,7 +1719,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
} }
else else
{ {
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
if ( xCol.is() ) if ( xCol.is() )
{ {
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)) >>= nLen;
...@@ -1753,7 +1753,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1753,7 +1753,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
sal_Int32 nPos = i; sal_Int32 nPos = i;
if(_xCols != xColumns) if(_xCols != xColumns)
{ {
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!"); OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!");
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
for(nPos = 0;nPos<_xCols->getCount();++nPos) for(nPos = 0;nPos<_xCols->getCount();++nPos)
...@@ -1849,7 +1849,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1849,7 +1849,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
case DataType::DOUBLE: case DataType::DOUBLE:
{ {
const double d = thisColVal; const double d = thisColVal;
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is treated separately if (getBOOL(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)))) // Currency is treated separately
{ {
...@@ -1889,7 +1889,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1889,7 +1889,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
} }
else else
{ {
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!"); OSL_ENSURE(xCol.is(),"ODbaseTable::UpdateBuffer column is null!");
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
std::vector< std::pair<const sal_Char* , OUString > > aStringToSubstitutes; std::vector< std::pair<const sal_Char* , OUString > > aStringToSubstitutes;
...@@ -1952,7 +1952,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo ...@@ -1952,7 +1952,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
} }
catch ( const Exception& ) catch ( const Exception& )
{ {
m_pColumns->getByIndex(i) >>= xCol; m_xColumns->getByIndex(i) >>= xCol;
OSL_ENSURE( xCol.is(), "ODbaseTable::UpdateBuffer column is null!" ); OSL_ENSURE( xCol.is(), "ODbaseTable::UpdateBuffer column is null!" );
if ( xCol.is() ) if ( xCol.is() )
xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName; xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
...@@ -2113,11 +2113,11 @@ void SAL_CALL ODbaseTable::alterColumnByName( const OUString& colName, const Ref ...@@ -2113,11 +2113,11 @@ void SAL_CALL ODbaseTable::alterColumnByName( const OUString& colName, const Ref
Reference<XDataDescriptorFactory> xOldColumn; Reference<XDataDescriptorFactory> xOldColumn;
m_pColumns->getByName(colName) >>= xOldColumn; m_xColumns->getByName(colName) >>= xOldColumn;
try try
{ {
alterColumn(m_pColumns->findColumn(colName)-1,descriptor,xOldColumn); alterColumn(m_xColumns->findColumn(colName)-1,descriptor,xOldColumn);
} }
catch (const css::lang::IndexOutOfBoundsException&) catch (const css::lang::IndexOutOfBoundsException&)
{ {
...@@ -2130,11 +2130,11 @@ void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference< ...@@ -2130,11 +2130,11 @@ void SAL_CALL ODbaseTable::alterColumnByIndex( sal_Int32 index, const Reference<
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);
checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed); checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed);
if(index < 0 || index >= m_pColumns->getCount()) if(index < 0 || index >= m_xColumns->getCount())
throw IndexOutOfBoundsException(OUString::number(index),*this); throw IndexOutOfBoundsException(OUString::number(index),*this);
Reference<XDataDescriptorFactory> xOldColumn; Reference<XDataDescriptorFactory> xOldColumn;
m_pColumns->getByIndex(index) >>= xOldColumn; m_xColumns->getByIndex(index) >>= xOldColumn;
alterColumn(index,descriptor,xOldColumn); alterColumn(index,descriptor,xOldColumn);
} }
...@@ -2142,7 +2142,7 @@ void ODbaseTable::alterColumn(sal_Int32 index, ...@@ -2142,7 +2142,7 @@ void ODbaseTable::alterColumn(sal_Int32 index,
const Reference< XPropertySet >& descriptor , const Reference< XPropertySet >& descriptor ,
const Reference< XDataDescriptorFactory >& xOldColumn ) const Reference< XDataDescriptorFactory >& xOldColumn )
{ {
if(index < 0 || index >= m_pColumns->getCount()) if(index < 0 || index >= m_xColumns->getCount())
throw IndexOutOfBoundsException(OUString::number(index),*this); throw IndexOutOfBoundsException(OUString::number(index),*this);
ODbaseTable* pNewTable = nullptr; ODbaseTable* pNewTable = nullptr;
...@@ -2173,7 +2173,7 @@ void ODbaseTable::alterColumn(sal_Int32 index, ...@@ -2173,7 +2173,7 @@ void ODbaseTable::alterColumn(sal_Int32 index,
for(;i < index;++i) for(;i < index;++i)
{ {
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
m_pColumns->getByIndex(i) >>= xProp; m_xColumns->getByIndex(i) >>= xProp;
Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY); Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY);
Reference<XPropertySet> xCpy; Reference<XPropertySet> xCpy;
if(xColumn.is()) if(xColumn.is())
...@@ -2186,10 +2186,10 @@ void ODbaseTable::alterColumn(sal_Int32 index, ...@@ -2186,10 +2186,10 @@ void ODbaseTable::alterColumn(sal_Int32 index,
++i; // now insert our new column ++i; // now insert our new column
xAppend->appendByDescriptor(xCopyColumn); xAppend->appendByDescriptor(xCopyColumn);
for(;i < m_pColumns->getCount();++i) for(;i < m_xColumns->getCount();++i)
{ {
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
m_pColumns->getByIndex(i) >>= xProp; m_xColumns->getByIndex(i) >>= xProp;
Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY); Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY);
Reference<XPropertySet> xCpy; Reference<XPropertySet> xCpy;
if(xColumn.is()) if(xColumn.is())
...@@ -2241,8 +2241,8 @@ void ODbaseTable::alterColumn(sal_Int32 index, ...@@ -2241,8 +2241,8 @@ void ODbaseTable::alterColumn(sal_Int32 index,
} }
FileClose(); FileClose();
construct(); construct();
if(m_pColumns) if(m_xColumns)
m_pColumns->refresh(); m_xColumns->refresh();
} }
catch(const SQLException&) catch(const SQLException&)
...@@ -2274,8 +2274,8 @@ void SAL_CALL ODbaseTable::rename( const OUString& newName ) ...@@ -2274,8 +2274,8 @@ void SAL_CALL ODbaseTable::rename( const OUString& newName )
ODbaseTable_BASE::rename(newName); ODbaseTable_BASE::rename(newName);
construct(); construct();
if(m_pColumns) if(m_xColumns)
m_pColumns->refresh(); m_xColumns->refresh();
} }
namespace namespace
{ {
...@@ -2342,10 +2342,10 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) ...@@ -2342,10 +2342,10 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY); Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY);
bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
// copy the structure // copy the structure
for(sal_Int32 i=0;i < m_pColumns->getCount();++i) for(sal_Int32 i=0;i < m_xColumns->getCount();++i)
{ {
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
m_pColumns->getByIndex(i) >>= xProp; m_xColumns->getByIndex(i) >>= xProp;
Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY); Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY);
Reference<XPropertySet> xCpy; Reference<XPropertySet> xCpy;
if(xColumn.is()) if(xColumn.is())
...@@ -2375,7 +2375,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) ...@@ -2375,7 +2375,7 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
pNewTable->construct(); pNewTable->construct();
// copy the data // copy the data
copyData(pNewTable,pNewTable->m_pColumns->getCount()); copyData(pNewTable,pNewTable->m_xColumns->getCount());
// drop the old table // drop the old table
if(DropImpl()) if(DropImpl())
{ {
...@@ -2386,8 +2386,8 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn) ...@@ -2386,8 +2386,8 @@ void ODbaseTable::addColumn(const Reference< XPropertySet >& _xNewColumn)
FileClose(); FileClose();
construct(); construct();
if(m_pColumns) if(m_xColumns)
m_pColumns->refresh(); m_xColumns->refresh();
} }
void ODbaseTable::dropColumn(sal_Int32 _nPos) void ODbaseTable::dropColumn(sal_Int32 _nPos)
...@@ -2401,12 +2401,12 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos) ...@@ -2401,12 +2401,12 @@ void ODbaseTable::dropColumn(sal_Int32 _nPos)
Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY); Reference<XAppend> xAppend(pNewTable->getColumns(),UNO_QUERY);
bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(); bool bCase = getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers();
// copy the structure // copy the structure
for(sal_Int32 i=0;i < m_pColumns->getCount();++i) for(sal_Int32 i=0;i < m_xColumns->getCount();++i)
{ {
if(_nPos != i) if(_nPos != i)
{ {
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
m_pColumns->getByIndex(i) >>= xProp; m_xColumns->getByIndex(i) >>= xProp;
Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY); Reference<XDataDescriptorFactory> xColumn(xProp,UNO_QUERY);
Reference<XPropertySet> xCpy; Reference<XPropertySet> xCpy;
if(xColumn.is()) if(xColumn.is())
...@@ -2470,11 +2470,11 @@ OUString ODbaseTable::createTempFile() ...@@ -2470,11 +2470,11 @@ OUString ODbaseTable::createTempFile()
void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos)
{ {
sal_Int32 nPos = _nPos + 1; // +1 because we always have the bookmark column as well sal_Int32 nPos = _nPos + 1; // +1 because we always have the bookmark column as well
OValueRefRow aRow = new OValueRefVector(m_pColumns->getCount()); OValueRefRow aRow = new OValueRefVector(m_xColumns->getCount());
OValueRefRow aInsertRow; OValueRefRow aInsertRow;
if(_nPos) if(_nPos)
{ {
aInsertRow = new OValueRefVector(_pNewTable->m_pColumns->getCount()); aInsertRow = new OValueRefVector(_pNewTable->m_xColumns->getCount());
std::for_each(aInsertRow->get().begin(),aInsertRow->get().end(),TSetRefBound(true)); std::for_each(aInsertRow->get().begin(),aInsertRow->get().end(),TSetRefBound(true));
} }
else else
...@@ -2510,7 +2510,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos) ...@@ -2510,7 +2510,7 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos)
} }
} }
} }
bOk = _pNewTable->InsertRow(*aInsertRow,_pNewTable->m_pColumns); bOk = _pNewTable->InsertRow(*aInsertRow,_pNewTable->m_xColumns.get());
SAL_WARN_IF(!bOk, "connectivity.drivers", "Row could not be inserted!"); SAL_WARN_IF(!bOk, "connectivity.drivers", "Row could not be inserted!");
} }
else else
......
...@@ -67,10 +67,10 @@ void OEvoabTable::refreshColumns() ...@@ -67,10 +67,10 @@ void OEvoabTable::refreshColumns()
aVector.push_back(xRow->getString(4)); aVector.push_back(xRow->getString(4));
} }
} }
if (m_pColumns) if (m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new OEvoabColumns(this,m_aMutex,aVector); m_xColumns = new OEvoabColumns(this,m_aMutex,aVector);
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -89,10 +89,10 @@ void OFileTable::refreshColumns() ...@@ -89,10 +89,10 @@ void OFileTable::refreshColumns()
aVector.push_back(xRow->getString(4)); aVector.push_back(xRow->getString(4));
} }
if(m_pColumns) if(m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new OColumns(this,m_aMutex,aVector); m_xColumns = new OColumns(this,m_aMutex,aVector);
} }
void OFileTable::refreshKeys() void OFileTable::refreshKeys()
......
...@@ -116,7 +116,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, ...@@ -116,7 +116,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName,
MutexGuard aGuard(m_rMutex); MutexGuard aGuard(m_rMutex);
checkDisposed(WeakComponentImplHelperBase::rBHelper.bDisposed); checkDisposed(WeakComponentImplHelperBase::rBHelper.bDisposed);
uno::Reference< XPropertySet > xColumn(m_pColumns->getByName(rColName), UNO_QUERY); uno::Reference< XPropertySet > xColumn(m_xColumns->getByName(rColName), UNO_QUERY);
// sdbcx::Descriptor // sdbcx::Descriptor
const bool bNameChanged = xColumn->getPropertyValue("Name") != rDescriptor->getPropertyValue("Name"); const bool bNameChanged = xColumn->getPropertyValue("Name") != rDescriptor->getPropertyValue("Name");
...@@ -218,7 +218,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName, ...@@ -218,7 +218,7 @@ void SAL_CALL Table::alterColumnByName(const OUString& rColName,
} }
m_pColumns->refresh(); m_xColumns->refresh();
} }
// ----- XRename -------------------------------------------------------------- // ----- XRename --------------------------------------------------------------
......
...@@ -501,10 +501,10 @@ void OFlatTable::refreshColumns() ...@@ -501,10 +501,10 @@ void OFlatTable::refreshColumns()
for (auto const& column : m_aColumns->get()) for (auto const& column : m_aColumns->get())
aVector.push_back(Reference< XNamed>(column,UNO_QUERY)->getName()); aVector.push_back(Reference< XNamed>(column,UNO_QUERY)->getName());
if(m_pColumns) if(m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new OFlatColumns(this,m_aMutex,aVector); m_xColumns = new OFlatColumns(this,m_aMutex,aVector);
} }
......
...@@ -154,7 +154,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe ...@@ -154,7 +154,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe
#endif #endif
); );
if ( !m_pColumns || !m_pColumns->hasByName(colName) ) if ( !m_xColumns || !m_xColumns->hasByName(colName) )
throw NoSuchElementException(colName,*this); throw NoSuchElementException(colName,*this);
...@@ -162,7 +162,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe ...@@ -162,7 +162,7 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe
{ {
// first we have to check what should be altered // first we have to check what should be altered
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
m_pColumns->getByName(colName) >>= xProp; m_xColumns->getByName(colName) >>= xProp;
// first check the types // first check the types
sal_Int32 nOldType = 0,nNewType = 0,nOldPrec = 0,nNewPrec = 0,nOldScale = 0,nNewScale = 0; sal_Int32 nOldType = 0,nNewType = 0,nOldPrec = 0,nNewPrec = 0,nOldScale = 0,nNewScale = 0;
OUString sOldTypeName, sNewTypeName; OUString sOldTypeName, sNewTypeName;
...@@ -237,14 +237,14 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe ...@@ -237,14 +237,14 @@ void SAL_CALL OHSQLTable::alterColumnByName( const OUString& colName, const Refe
else if(sOldDefault.isEmpty() && !sNewDefault.isEmpty()) else if(sOldDefault.isEmpty() && !sNewDefault.isEmpty())
alterDefaultValue(sNewDefault,sNewColumnName); alterDefaultValue(sNewDefault,sNewColumnName);
m_pColumns->refresh(); m_xColumns->refresh();
} }
else else
{ {
if(m_pColumns) if(m_xColumns)
{ {
m_pColumns->dropByName(colName); m_xColumns->dropByName(colName);
m_pColumns->appendByDescriptor(descriptor); m_xColumns->appendByDescriptor(descriptor);
} }
} }
......
...@@ -76,10 +76,10 @@ void MacabTable::refreshColumns() ...@@ -76,10 +76,10 @@ void MacabTable::refreshColumns()
} }
} }
if (m_pColumns) if (m_xColumns)
m_pColumns->reFill(aVector); m_xColumns->reFill(aVector);
else else
m_pColumns = new MacabColumns(this,m_aMutex,aVector); m_xColumns = new MacabColumns(this,m_aMutex,aVector);
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -173,7 +173,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref ...@@ -173,7 +173,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
#endif #endif
); );
if ( !m_pColumns || !m_pColumns->hasByName(colName) ) if ( !m_xColumns || !m_xColumns->hasByName(colName) )
throw NoSuchElementException(colName,*this); throw NoSuchElementException(colName,*this);
...@@ -181,7 +181,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref ...@@ -181,7 +181,7 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
{ {
// first we have to check what should be altered // first we have to check what should be altered
Reference<XPropertySet> xProp; Reference<XPropertySet> xProp;
m_pColumns->getByName(colName) >>= xProp; m_xColumns->getByName(colName) >>= xProp;
// first check the types // first check the types
sal_Int32 nOldType = 0,nNewType = 0,nOldPrec = 0,nNewPrec = 0,nOldScale = 0,nNewScale = 0; sal_Int32 nOldType = 0,nNewType = 0,nOldPrec = 0,nNewPrec = 0,nOldScale = 0,nNewScale = 0;
...@@ -269,14 +269,14 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref ...@@ -269,14 +269,14 @@ void SAL_CALL OMySQLTable::alterColumnByName( const OUString& colName, const Ref
" " + OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern())); " " + OTables::adjustSQL(::dbtools::createStandardColumnPart(descriptor,getConnection(),static_cast<OTables*>(m_pTables),getTypeCreatePattern()));
executeStatement(sSql); executeStatement(sSql);
} }
m_pColumns->refresh(); m_xColumns->refresh();
} }
else else
{ {
if(m_pColumns) if(m_xColumns)
{ {
m_pColumns->dropByName(colName); m_xColumns->dropByName(colName);
m_pColumns->appendByDescriptor(descriptor); m_xColumns->appendByDescriptor(descriptor);
} }
} }
......
...@@ -68,9 +68,6 @@ OTable::OTable(OCollection* _pTables, ...@@ -68,9 +68,6 @@ OTable::OTable(OCollection* _pTables,
bool _bCase) bool _bCase)
: OTableDescriptor_BASE(m_aMutex) : OTableDescriptor_BASE(m_aMutex)
,ODescriptor(OTableDescriptor_BASE::rBHelper,_bCase,true) ,ODescriptor(OTableDescriptor_BASE::rBHelper,_bCase,true)
,m_pKeys(nullptr)
,m_pColumns(nullptr)
,m_pIndexes(nullptr)
,m_pTables(_pTables) ,m_pTables(_pTables)
{ {
} }
...@@ -85,9 +82,6 @@ OTable::OTable( OCollection* _pTables, ...@@ -85,9 +82,6 @@ OTable::OTable( OCollection* _pTables,
,m_SchemaName(SchemaName) ,m_SchemaName(SchemaName)
,m_Description(Description) ,m_Description(Description)
,m_Type(Type) ,m_Type(Type)
,m_pKeys(nullptr)
,m_pColumns(nullptr)
,m_pIndexes(nullptr)
,m_pTables(_pTables) ,m_pTables(_pTables)
{ {
m_Name = Name; m_Name = Name;
...@@ -95,9 +89,6 @@ OTable::OTable( OCollection* _pTables, ...@@ -95,9 +89,6 @@ OTable::OTable( OCollection* _pTables,
OTable::~OTable() OTable::~OTable()
{ {
delete m_pKeys;
delete m_pColumns;
delete m_pIndexes;
} }
void OTable::construct() void OTable::construct()
...@@ -151,12 +142,12 @@ void SAL_CALL OTable::disposing() ...@@ -151,12 +142,12 @@ void SAL_CALL OTable::disposing()
::osl::MutexGuard aGuard(m_aMutex); ::osl::MutexGuard aGuard(m_aMutex);
if(m_pKeys) if(m_xKeys)
m_pKeys->disposing(); m_xKeys->disposing();
if(m_pColumns) if(m_xColumns)
m_pColumns->disposing(); m_xColumns->disposing();
if(m_pIndexes) if(m_xIndexes)
m_pIndexes->disposing(); m_xIndexes->disposing();
m_pTables = nullptr; m_pTables = nullptr;
} }
...@@ -169,7 +160,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( ) ...@@ -169,7 +160,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( )
try try
{ {
if ( !m_pColumns ) if ( !m_xColumns )
refreshColumns(); refreshColumns();
} }
catch( const RuntimeException& ) catch( const RuntimeException& )
...@@ -182,7 +173,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( ) ...@@ -182,7 +173,7 @@ Reference< XNameAccess > SAL_CALL OTable::getColumns( )
// allowed // allowed
} }
return m_pColumns; return m_xColumns.get();
} }
...@@ -196,9 +187,9 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( ) ...@@ -196,9 +187,9 @@ Reference< XIndexAccess > SAL_CALL OTable::getKeys( )
try try
{ {
if ( !m_pKeys ) if ( !m_xKeys )
refreshKeys(); refreshKeys();
xKeys = m_pKeys; xKeys = m_xKeys.get();
} }
catch( const RuntimeException& ) catch( const RuntimeException& )
{ {
...@@ -241,7 +232,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( ) ...@@ -241,7 +232,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( )
try try
{ {
if ( !m_pIndexes ) if ( !m_xIndexes )
refreshIndexes(); refreshIndexes();
} }
catch( const RuntimeException& ) catch( const RuntimeException& )
...@@ -254,7 +245,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( ) ...@@ -254,7 +245,7 @@ Reference< XNameAccess > SAL_CALL OTable::getIndexes( )
// allowed // allowed
} }
return m_pIndexes; return m_xIndexes.get();
} }
// XRename // XRename
......
...@@ -103,7 +103,7 @@ OColumn* ODBTable::createColumn(const OUString& _rName) const ...@@ -103,7 +103,7 @@ OColumn* ODBTable::createColumn(const OUString& _rName) const
} }
else else
{ {
OColumns* pColumns = static_cast<OColumns*>(m_pColumns); OColumns* pColumns = static_cast<OColumns*>(m_xColumns.get());
xProp.set(pColumns->createBaseObject(_rName),UNO_QUERY); xProp.set(pColumns->createBaseObject(_rName),UNO_QUERY);
} }
...@@ -294,12 +294,12 @@ void SAL_CALL ODBTable::alterColumnByName( const OUString& _rName, const Referen ...@@ -294,12 +294,12 @@ void SAL_CALL ODBTable::alterColumnByName( const OUString& _rName, const Referen
if ( !getAlterService().is() ) if ( !getAlterService().is() )
throw SQLException(DBA_RES(RID_STR_NO_TABLE_RENAME),*this,SQLSTATE_GENERAL,1000,Any() ); 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() ); throw SQLException(DBA_RES(RID_STR_COLUMN_NOT_VALID),*this,SQLSTATE_GENERAL,1000,Any() );
Reference<XPropertySet> xTable(this); Reference<XPropertySet> xTable(this);
getAlterService()->alterColumnByName(xTable,_rName,_rxDescriptor); getAlterService()->alterColumnByName(xTable,_rName,_rxDescriptor);
m_pColumns->refresh(); m_xColumns->refresh();
} }
sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId ) sal_Int64 SAL_CALL ODBTable::getSomething( const Sequence< sal_Int8 >& rId )
......
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include <connectivity/CommonTools.hxx> #include <connectivity/CommonTools.hxx>
#include <connectivity/dbtoolsdllapi.hxx> #include <connectivity/dbtoolsdllapi.hxx>
#include <com/sun/star/sdbc/XDatabaseMetaData.hpp> #include <com/sun/star/sdbc/XDatabaseMetaData.hpp>
#include <memory>
namespace connectivity namespace connectivity
{ {
...@@ -72,9 +73,9 @@ namespace connectivity ...@@ -72,9 +73,9 @@ namespace connectivity
OUString m_Description; OUString m_Description;
OUString m_Type; OUString m_Type;
OCollection* m_pKeys; rtl::Reference<OCollection> m_xKeys;
OCollection* m_pColumns; rtl::Reference<OCollection> m_xColumns;
OCollection* m_pIndexes; rtl::Reference<OCollection> m_xIndexes;
OCollection* m_pTables; // must hold his own container to notify him when renaming OCollection* m_pTables; // must hold his own container to notify him when renaming
using OTableDescriptor_BASE::rBHelper; using OTableDescriptor_BASE::rBHelper;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment