[Libreoffice-commits] core.git: connectivity/source dbaccess/source include/connectivity vcl/inc vcl/osx vcl/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Wed Mar 18 08:50:14 UTC 2020
connectivity/source/commontools/TSortIndex.cxx | 4
connectivity/source/commontools/dbtools.cxx | 12
connectivity/source/drivers/calc/CTable.cxx | 18 -
connectivity/source/drivers/component/CColumns.cxx | 4
connectivity/source/drivers/component/CResultSet.cxx | 2
connectivity/source/drivers/component/CTable.cxx | 2
connectivity/source/drivers/dbase/DColumns.cxx | 4
connectivity/source/drivers/dbase/DIndex.cxx | 2
connectivity/source/drivers/dbase/DIndexColumns.cxx | 4
connectivity/source/drivers/dbase/DResultSet.cxx | 4
connectivity/source/drivers/dbase/DTable.cxx | 86 +++---
connectivity/source/drivers/evoab2/NResultSetMetaData.cxx | 2
connectivity/source/drivers/file/FNoException.cxx | 6
connectivity/source/drivers/file/FPreparedStatement.cxx | 58 ++--
connectivity/source/drivers/file/FResultSet.cxx | 156 +++++------
connectivity/source/drivers/file/FResultSetMetaData.cxx | 24 -
connectivity/source/drivers/file/FStatement.cxx | 44 +--
connectivity/source/drivers/file/fanalyzer.cxx | 2
connectivity/source/drivers/file/fcode.cxx | 12
connectivity/source/drivers/flat/EColumns.cxx | 4
connectivity/source/drivers/flat/EResultSet.cxx | 2
connectivity/source/drivers/flat/ETable.cxx | 44 +--
connectivity/source/drivers/macab/MacabPreparedStatement.cxx | 14
connectivity/source/drivers/macab/MacabResultSetMetaData.cxx | 2
connectivity/source/drivers/mork/MPreparedStatement.cxx | 14
connectivity/source/drivers/mork/MResultSet.cxx | 86 +++---
connectivity/source/drivers/mork/MResultSetMetaData.cxx | 20 -
connectivity/source/drivers/mork/MStatement.cxx | 6
connectivity/source/drivers/writer/WTable.cxx | 22 -
connectivity/source/inc/file/FResultSet.hxx | 6
connectivity/source/parse/PColumn.cxx | 4
connectivity/source/parse/sqliterator.cxx | 62 ++--
dbaccess/source/core/api/BookmarkSet.cxx | 12
dbaccess/source/core/api/CRowSetDataColumn.cxx | 4
dbaccess/source/core/api/CacheSet.cxx | 22 -
dbaccess/source/core/api/HelperCollections.cxx | 12
dbaccess/source/core/api/KeySet.cxx | 90 +++---
dbaccess/source/core/api/OptimisticSet.cxx | 20 -
dbaccess/source/core/api/RowSet.cxx | 58 ++--
dbaccess/source/core/api/RowSetBase.cxx | 10
dbaccess/source/core/api/RowSetCache.cxx | 42 +-
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 38 +-
dbaccess/source/core/api/StaticSet.cxx | 12
dbaccess/source/core/api/WrappedResultSet.cxx | 12
include/connectivity/CommonTools.hxx | 27 -
include/connectivity/FValue.hxx | 4
vcl/inc/osx/salframe.h | 2
vcl/inc/salframe.hxx | 4
vcl/osx/salframe.cxx | 9
vcl/source/window/dialog.cxx | 3
50 files changed, 561 insertions(+), 552 deletions(-)
New commits:
commit e5230535877e30c3b874495e8794faa3a42d8017
Author: Noel Grandin <noelgrandin at gmail.com>
AuthorDate: Tue Mar 17 21:34:21 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Wed Mar 18 09:49:50 2020 +0100
simplify ORefVector code
by making it extend std::vector - it wants to be a ref-counted vector,
so let it be, and we can simplify the usage sites
Change-Id: I93ff6ee1522da965e16223dca171401d36fd67b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90664
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/connectivity/source/commontools/TSortIndex.cxx b/connectivity/source/commontools/TSortIndex.cxx
index 76bbafaeb13a..6b94216a3719 100644
--- a/connectivity/source/commontools/TSortIndex.cxx
+++ b/connectivity/source/commontools/TSortIndex.cxx
@@ -85,10 +85,10 @@ struct TKeyValueFunc
Freeze();
::rtl::Reference<OKeySet> pKeySet = new OKeySet();
- pKeySet->get().reserve(m_aKeyValues.size());
+ pKeySet->reserve(m_aKeyValues.size());
std::transform(m_aKeyValues.begin()
,m_aKeyValues.end()
- ,std::back_inserter(pKeySet->get())
+ ,std::back_inserter(*pKeySet)
,::o3tl::select1st<TIntValuePairVector::value_type>());
pKeySet->setFrozen();
return pKeySet;
diff --git a/connectivity/source/commontools/dbtools.cxx b/connectivity/source/commontools/dbtools.cxx
index 9398a50a7bc0..c0b88f1c7ba1 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1965,8 +1965,8 @@ void checkDisposed(bool _bThrow)
}
-OSQLColumns::Vector::const_iterator find(const OSQLColumns::Vector::const_iterator& first,
- const OSQLColumns::Vector::const_iterator& last,
+OSQLColumns::const_iterator find(const OSQLColumns::const_iterator& first,
+ const OSQLColumns::const_iterator& last,
const OUString& _rVal,
const ::comphelper::UStringMixEqual& _rCase)
{
@@ -1974,8 +1974,8 @@ OSQLColumns::Vector::const_iterator find(const OSQLColumns::Vector::const_iterat
return find(first,last,sName,_rVal,_rCase);
}
-OSQLColumns::Vector::const_iterator findRealName(const OSQLColumns::Vector::const_iterator& first,
- const OSQLColumns::Vector::const_iterator& last,
+OSQLColumns::const_iterator findRealName(const OSQLColumns::const_iterator& first,
+ const OSQLColumns::const_iterator& last,
const OUString& _rVal,
const ::comphelper::UStringMixEqual& _rCase)
{
@@ -1983,8 +1983,8 @@ OSQLColumns::Vector::const_iterator findRealName(const OSQLColumns::Vector::cons
return find(first,last,sRealName,_rVal,_rCase);
}
-OSQLColumns::Vector::const_iterator find(OSQLColumns::Vector::const_iterator first,
- const OSQLColumns::Vector::const_iterator& last,
+OSQLColumns::const_iterator find(OSQLColumns::const_iterator first,
+ const OSQLColumns::const_iterator& last,
const OUString& _rProp,
const OUString& _rVal,
const ::comphelper::UStringMixEqual& _rCase)
diff --git a/connectivity/source/drivers/calc/CTable.cxx b/connectivity/source/drivers/calc/CTable.cxx
index f22db852d77d..1d905aa73ea8 100644
--- a/connectivity/source/drivers/calc/CTable.cxx
+++ b/connectivity/source/drivers/calc/CTable.cxx
@@ -478,12 +478,12 @@ void OCalcTable::fillColumns()
// check if the column name already exists
OUString aAlias = aColumnName;
- OSQLColumns::Vector::const_iterator aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
+ OSQLColumns::const_iterator aFind = connectivity::find(m_aColumns->begin(),m_aColumns->end(),aAlias,aCase);
sal_Int32 nExprCnt = 0;
- while(aFind != m_aColumns->get().end())
+ while(aFind != m_aColumns->end())
{
aAlias = aColumnName + OUString::number(++nExprCnt);
- aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
+ aFind = connectivity::find(m_aColumns->begin(),m_aColumns->end(),aAlias,aCase);
}
sdbcx::OColumn* pColumn = new sdbcx::OColumn( aAlias, aTypeName, OUString(),OUString(),
@@ -492,7 +492,7 @@ void OCalcTable::fillColumns()
bStoresMixedCaseQuotedIdentifiers,
m_CatalogName, getSchema(), getName());
Reference< XPropertySet> xCol = pColumn;
- m_aColumns->get().push_back(xCol);
+ m_aColumns->push_back(xCol);
m_aTypes.push_back(eType);
}
}
@@ -633,21 +633,21 @@ bool OCalcTable::fetchRow( OValueRefRow& _rRow, const OSQLColumns & _rCols,
// read the bookmark
_rRow->setDeleted(false);
- *(_rRow->get())[0] = m_nFilePos;
+ *(*_rRow)[0] = m_nFilePos;
if (!bRetrieveData)
return true;
// fields
- const OValueRefVector::Vector::size_type nCount = std::min(_rRow->get().size(), _rCols.get().size() + 1);
- for (OValueRefVector::Vector::size_type i = 1; i < nCount; i++)
+ const OValueRefVector::size_type nCount = std::min(_rRow->size(), _rCols.size() + 1);
+ for (OValueRefVector::size_type i = 1; i < nCount; i++)
{
- if ( (_rRow->get())[i]->isBound() )
+ if ( (*_rRow)[i]->isBound() )
{
sal_Int32 nType = m_aTypes[i-1];
- lcl_SetValue( (_rRow->get())[i]->get(), m_xSheet, m_nStartCol, m_nStartRow, m_bHasHeaders,
+ lcl_SetValue( (*_rRow)[i]->get(), m_xSheet, m_nStartCol, m_nStartRow, m_bHasHeaders,
m_aNullDate, m_nFilePos, i, nType );
}
}
diff --git a/connectivity/source/drivers/component/CColumns.cxx b/connectivity/source/drivers/component/CColumns.cxx
index 244b6623d460..9f802b6e4c57 100644
--- a/connectivity/source/drivers/component/CColumns.cxx
+++ b/connectivity/source/drivers/component/CColumns.cxx
@@ -33,9 +33,9 @@ sdbcx::ObjectType OComponentColumns::createObject(const OUString& _rName)
{
::rtl::Reference<OSQLColumns> aCols = m_pTable->getTableColumns();
- OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
+ OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
sdbcx::ObjectType xRet;
- if(aIter != aCols->get().end())
+ if(aIter != aCols->end())
xRet = sdbcx::ObjectType(*aIter,UNO_QUERY);
return xRet;
}
diff --git a/connectivity/source/drivers/component/CResultSet.cxx b/connectivity/source/drivers/component/CResultSet.cxx
index 9ff212a8911e..050b4034da45 100644
--- a/connectivity/source/drivers/component/CResultSet.cxx
+++ b/connectivity/source/drivers/component/CResultSet.cxx
@@ -77,7 +77,7 @@ Any SAL_CALL OComponentResultSet::getBookmark( )
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return makeAny(static_cast<sal_Int32>((m_aRow->get())[0]->getValue()));
+ return makeAny(static_cast<sal_Int32>((*m_aRow)[0]->getValue()));
}
sal_Bool SAL_CALL OComponentResultSet::moveToBookmark( const Any& bookmark )
diff --git a/connectivity/source/drivers/component/CTable.cxx b/connectivity/source/drivers/component/CTable.cxx
index 14b167347d09..9b5354d266d1 100644
--- a/connectivity/source/drivers/component/CTable.cxx
+++ b/connectivity/source/drivers/component/CTable.cxx
@@ -57,7 +57,7 @@ void OComponentTable::refreshColumns()
::std::vector< OUString> aVector;
- for(const auto& rxColumn : m_aColumns->get())
+ for(const auto& rxColumn : *m_aColumns)
aVector.push_back(Reference< XNamed>(rxColumn,UNO_QUERY_THROW)->getName());
if(m_xColumns)
diff --git a/connectivity/source/drivers/dbase/DColumns.cxx b/connectivity/source/drivers/dbase/DColumns.cxx
index 6f884dca8572..b997ec8d9087 100644
--- a/connectivity/source/drivers/dbase/DColumns.cxx
+++ b/connectivity/source/drivers/dbase/DColumns.cxx
@@ -35,10 +35,10 @@ sdbcx::ObjectType ODbaseColumns::createObject(const OUString& _rName)
ODbaseTable* pTable = static_cast<ODbaseTable*>(m_pTable);
const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns();
- OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
+ OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
sdbcx::ObjectType xRet;
- if(aIter != aCols->get().end())
+ if(aIter != aCols->end())
xRet = sdbcx::ObjectType(*aIter,UNO_QUERY);
return xRet;
}
diff --git a/connectivity/source/drivers/dbase/DIndex.cxx b/connectivity/source/drivers/dbase/DIndex.cxx
index 0dae008f981f..fdb782174412 100644
--- a/connectivity/source/drivers/dbase/DIndex.cxx
+++ b/connectivity/source/drivers/dbase/DIndex.cxx
@@ -533,7 +533,7 @@ void ODbaseIndex::CreateImpl()
memset(&m_aHeader,0,sizeof(m_aHeader));
sal_Int32 nType = 0;
::rtl::Reference<OSQLColumns> aCols = m_pTable->getTableColumns();
- const Reference< XPropertySet > xTableCol(*find(aCols->get().begin(),aCols->get().end(),aName,::comphelper::UStringMixEqual(isCaseSensitive())));
+ const Reference< XPropertySet > xTableCol(*find(aCols->begin(),aCols->end(),aName,::comphelper::UStringMixEqual(isCaseSensitive())));
xTableCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)) >>= nType;
diff --git a/connectivity/source/drivers/dbase/DIndexColumns.cxx b/connectivity/source/drivers/dbase/DIndexColumns.cxx
index 12f0fc2e0e49..886c7273db31 100644
--- a/connectivity/source/drivers/dbase/DIndexColumns.cxx
+++ b/connectivity/source/drivers/dbase/DIndexColumns.cxx
@@ -38,10 +38,10 @@ sdbcx::ObjectType ODbaseIndexColumns::createObject(const OUString& _rName)
const ODbaseTable* pTable = m_pIndex->getTable();
const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns();
- OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
+ OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
Reference< XPropertySet > xCol;
- if(aIter != aCols->get().end())
+ if(aIter != aCols->end())
xCol = *aIter;
if(!xCol.is())
diff --git a/connectivity/source/drivers/dbase/DResultSet.cxx b/connectivity/source/drivers/dbase/DResultSet.cxx
index 2ca942fecdc8..f9395a359465 100644
--- a/connectivity/source/drivers/dbase/DResultSet.cxx
+++ b/connectivity/source/drivers/dbase/DResultSet.cxx
@@ -81,7 +81,7 @@ Any SAL_CALL ODbaseResultSet::getBookmark( )
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
OSL_ENSURE((m_bShowDeleted || !m_aRow->isDeleted()),"getBookmark called for deleted row");
- return makeAny(static_cast<sal_Int32>((m_aRow->get())[0]->getValue()));
+ return makeAny(static_cast<sal_Int32>((*m_aRow)[0]->getValue()));
}
sal_Bool SAL_CALL ODbaseResultSet::moveToBookmark( const Any& bookmark )
@@ -165,7 +165,7 @@ bool ODbaseResultSet::fillIndexValues(const Reference< XColumnsSupplier> &_xInde
sal_uInt32 nRec = pIter->First();
while (nRec != NODE_NOTFOUND)
{
- m_pFileSet->get().push_back(nRec);
+ m_pFileSet->push_back(nRec);
nRec = pIter->Next();
}
m_pFileSet->setFrozen();
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 6566e165a9cc..bf2036b2ca19 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -277,7 +277,7 @@ void ODbaseTable::fillColumns()
if(!m_aColumns.is())
m_aColumns = new OSQLColumns();
else
- m_aColumns->get().clear();
+ m_aColumns->clear();
m_aTypes.clear();
m_aPrecisions.clear();
@@ -287,7 +287,7 @@ void ODbaseTable::fillColumns()
const sal_Int32 nFieldCount = (m_aHeader.headerLength - 1) / 32 - 1;
OSL_ENSURE(nFieldCount,"No columns in table!");
- m_aColumns->get().reserve(nFieldCount);
+ m_aColumns->reserve(nFieldCount);
m_aTypes.reserve(nFieldCount);
m_aPrecisions.reserve(nFieldCount);
m_aScales.reserve(nFieldCount);
@@ -426,7 +426,7 @@ void ODbaseTable::fillColumns()
bIsCurrency,
bCase,
m_CatalogName, getSchema(), getName());
- m_aColumns->get().push_back(xCol);
+ m_aColumns->push_back(xCol);
} // for (; i < nFieldCount; i++)
OSL_ENSURE(i,"No columns in table!");
}
@@ -636,9 +636,9 @@ void ODbaseTable::refreshColumns()
::osl::MutexGuard aGuard( m_aMutex );
::std::vector< OUString> aVector;
- aVector.reserve(m_aColumns->get().size());
+ aVector.reserve(m_aColumns->size());
- for (auto const& column : m_aColumns->get())
+ for (auto const& column : *m_aColumns)
aVector.push_back(Reference< XNamed>(column,UNO_QUERY_THROW)->getName());
if(m_xColumns)
@@ -758,16 +758,16 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
// Mark record as deleted
_rRow->setDeleted(bIsCurRecordDeleted);
- *(_rRow->get())[0] = m_nFilePos;
+ *(*_rRow)[0] = m_nFilePos;
if (!bRetrieveData)
return true;
std::size_t nByteOffset = 1;
// Fields:
- OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
- OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
- const std::size_t nCount = _rRow->get().size();
+ OSQLColumns::const_iterator aIter = _rCols.begin();
+ OSQLColumns::const_iterator aEnd = _rCols.end();
+ const std::size_t nCount = _rRow->size();
for (std::size_t i = 1; aIter != aEnd && nByteOffset <= m_nBufferSize && i < nCount;++aIter, i++)
{
// Lengths depending on data type:
@@ -798,7 +798,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
}
// Is the variable bound?
- if ( !(_rRow->get())[i]->isBound() )
+ if ( !(*_rRow)[i]->isBound() )
{
// No - next field.
nByteOffset += nLen;
@@ -822,12 +822,12 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
if (nLastPos < 0)
{
// Empty string. Skip it.
- (_rRow->get())[i]->setNull();
+ (*_rRow)[i]->setNull();
}
else
{
// Commit the string. Use intern() to ref-count it.
- *(_rRow->get())[i] = OUString::intern(pData, static_cast<sal_Int32>(nLastPos+1), m_eEncoding);
+ *(*_rRow)[i] = OUString::intern(pData, static_cast<sal_Int32>(nLastPos+1), m_eEncoding);
}
} // if (nType == DataType::CHAR || nType == DataType::VARCHAR)
else if ( DataType::TIMESTAMP == nType )
@@ -837,13 +837,13 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
memcpy(&nTime, pData+ 4, 4);
if ( !nDate && !nTime )
{
- (_rRow->get())[i]->setNull();
+ (*_rRow)[i]->setNull();
}
else
{
css::util::DateTime aDateTime;
lcl_CalDate(nDate,nTime,aDateTime);
- *(_rRow->get())[i] = aDateTime;
+ *(*_rRow)[i] = aDateTime;
}
}
else if ( DataType::INTEGER == nType )
@@ -852,7 +852,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
if (o3tl::make_unsigned(nLen) > sizeof(nValue))
return false;
memcpy(&nValue, pData, nLen);
- *(_rRow->get())[i] = nValue;
+ *(*_rRow)[i] = nValue;
}
else if ( DataType::DOUBLE == nType )
{
@@ -876,7 +876,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
memcpy(&d, pData, nLen);
}
- *(_rRow->get())[i] = d;
+ *(*_rRow)[i] = d;
}
else
{
@@ -902,7 +902,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
{
// Empty string. Skip it.
nByteOffset += nLen;
- (_rRow->get())[i]->setNull(); // no values -> done
+ (*_rRow)[i]->setNull(); // no values -> done
continue;
}
@@ -914,7 +914,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
{
if (aStr.getLength() != nLen)
{
- (_rRow->get())[i]->setNull();
+ (*_rRow)[i]->setNull();
break;
}
const sal_uInt16 nYear = static_cast<sal_uInt16>(aStr.copy( 0, 4 ).toInt32());
@@ -922,11 +922,11 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
const sal_uInt16 nDay = static_cast<sal_uInt16>(aStr.copy( 6, 2 ).toInt32());
const css::util::Date aDate(nDay,nMonth,nYear);
- *(_rRow->get())[i] = aDate;
+ *(*_rRow)[i] = aDate;
}
break;
case DataType::DECIMAL:
- *(_rRow->get())[i] = ORowSetValue(aStr);
+ *(*_rRow)[i] = ORowSetValue(aStr);
break;
case DataType::BIT:
{
@@ -938,7 +938,7 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
case 'J': b = true; break;
default: b = false; break;
}
- *(_rRow->get())[i] = b;
+ *(*_rRow)[i] = b;
}
break;
case DataType::LONGVARBINARY:
@@ -948,16 +948,16 @@ bool ODbaseTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
const long nBlockNo = aStr.toInt32(); // read blocknumber
if (nBlockNo > 0 && m_pMemoStream) // Read data from memo-file, only if
{
- if ( !ReadMemo(nBlockNo, (_rRow->get())[i]->get()) )
+ if ( !ReadMemo(nBlockNo, (*_rRow)[i]->get()) )
break;
}
else
- (_rRow->get())[i]->setNull();
+ (*_rRow)[i]->setNull();
} break;
default:
SAL_WARN( "connectivity.drivers","Wrong type");
}
- (_rRow->get())[i]->setTypeKind(nType);
+ (*_rRow)[i]->setTypeKind(nType);
}
nByteOffset += nLen;
@@ -1494,7 +1494,7 @@ bool ODbaseTable::InsertRow(OValueRefVector& rRow, const Reference<XIndexAccess>
// raise number if successfully
m_aHeader.nbRecords++;
- *rRow.get()[0] = m_nFilePos; // set bookmark
+ *rRow[0] = m_nFilePos; // set bookmark
m_nFilePos = nTempPos;
}
}
@@ -1542,7 +1542,7 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
std::size_t nFilePos = m_aHeader.headerLength + static_cast<long>(m_nFilePos-1) * m_aHeader.recordLength;
m_pFileStream->Seek(nFilePos);
- OValueRefRow aRow = new OValueRefVector(_rCols.get().size());
+ OValueRefRow aRow = new OValueRefVector(_rCols.size());
if (!fetchRow(aRow,_rCols,true))
return false;
@@ -1566,14 +1566,14 @@ bool ODbaseTable::DeleteRow(const OSQLColumns& _rCols)
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
OSL_ENSURE(pIndex,"ODbaseTable::DeleteRow: No Index returned!");
- OSQLColumns::Vector::const_iterator aIter = std::find_if(_rCols.get().begin(), _rCols.get().end(),
- [&aCase, &aColName](const OSQLColumns::Vector::value_type& rxCol) {
+ OSQLColumns::const_iterator aIter = std::find_if(_rCols.begin(), _rCols.end(),
+ [&aCase, &aColName](const OSQLColumns::value_type& rxCol) {
return aCase(getString(rxCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME))), aColName); });
- if (aIter == _rCols.get().end())
+ if (aIter == _rCols.end())
continue;
- auto nPos = static_cast<sal_Int32>(std::distance(_rCols.get().begin(), aIter)) + 1;
- pIndex->Delete(m_nFilePos,*(aRow->get())[nPos]);
+ auto nPos = static_cast<sal_Int32>(std::distance(_rCols.begin(), aIter)) + 1;
+ pIndex->Delete(m_nFilePos,*(*aRow)[nPos]);
}
}
}
@@ -1663,7 +1663,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
if (xIndex.is())
{
// first check if the value is different to the old one and when if it conform to the index
- if(pOrgRow.is() && (rRow.get()[nPos]->getValue().isNull() || rRow.get()[nPos] == (pOrgRow->get())[nPos]))
+ if(pOrgRow.is() && (rRow[nPos]->getValue().isNull() || rRow[nPos] == (*pOrgRow)[nPos]))
continue;
else
{
@@ -1672,7 +1672,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
ODbaseIndex* pIndex = reinterpret_cast< ODbaseIndex* >( xTunnel->getSomething(ODbaseIndex::getUnoTunnelId()) );
OSL_ENSURE(pIndex,"ODbaseTable::UpdateBuffer: No Index returned!");
- if (pIndex->Find(0,*rRow.get()[nPos]))
+ if (pIndex->Find(0,*rRow[nPos]))
{
// There is no unique value
if ( aColName.isEmpty() )
@@ -1763,7 +1763,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
++nPos; // the row values start at 1
- const ORowSetValue &thisColVal = rRow.get()[nPos]->get();
+ const ORowSetValue &thisColVal = rRow[nPos]->get();
const bool thisColIsBound = thisColVal.isBound();
const bool thisColIsNull = !thisColIsBound || thisColVal.isNull();
// don't overwrite non-bound columns
@@ -1781,7 +1781,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
OSL_ENSURE(pIndex,"ODbaseTable::UpdateBuffer: No Index returned!");
// Update !!
if (pOrgRow.is() && !thisColIsNull)
- pIndex->Update(m_nFilePos, *(pOrgRow->get())[nPos], thisColVal);
+ pIndex->Update(m_nFilePos, *(*pOrgRow)[nPos], thisColVal);
else
pIndex->Insert(m_nFilePos, thisColVal);
}
@@ -1877,7 +1877,7 @@ bool ODbaseTable::UpdateBuffer(OValueRefVector& rRow, const OValueRefRow& pOrgRo
// Write value right-justified, padded with blanks to the left.
memcpy(pData+nLen-nValueLen,aDefaultValue.getStr(),nValueLen);
// write the resulting double back
- *rRow.get()[nPos] = toDouble(aDefaultValue);
+ *rRow[nPos] = toDouble(aDefaultValue);
}
else
{
@@ -2464,19 +2464,19 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos)
if(_nPos)
{
aInsertRow = new OValueRefVector(_pNewTable->m_xColumns->getCount());
- std::for_each(aInsertRow->get().begin(),aInsertRow->get().end(),TSetRefBound(true));
+ std::for_each(aInsertRow->begin(),aInsertRow->end(),TSetRefBound(true));
}
else
aInsertRow = aRow;
// we only have to bind the values which we need to copy into the new table
- std::for_each(aRow->get().begin(),aRow->get().end(),TSetRefBound(true));
- if(_nPos && (_nPos < static_cast<sal_Int32>(aRow->get().size())))
- (aRow->get())[nPos]->setBound(false);
+ std::for_each(aRow->begin(),aRow->end(),TSetRefBound(true));
+ if(_nPos && (_nPos < static_cast<sal_Int32>(aRow->size())))
+ (*aRow)[nPos]->setBound(false);
sal_Int32 nCurPos;
- OValueRefVector::Vector::const_iterator aIter;
+ OValueRefVector::const_iterator aIter;
for(sal_uInt32 nRowPos = 0; nRowPos < m_aHeader.nbRecords;++nRowPos)
{
bool bOk = seekRow( IResultSetHelper::BOOKMARK, nRowPos+1, nCurPos );
@@ -2488,9 +2488,9 @@ void ODbaseTable::copyData(ODbaseTable* _pNewTable,sal_Int32 _nPos)
// special handling when pos == 0 then we don't have to distinguish between the two rows
if(_nPos)
{
- aIter = aRow->get().begin()+1;
+ aIter = aRow->begin()+1;
sal_Int32 nCount = 1;
- for(OValueRefVector::Vector::iterator aInsertIter = aInsertRow->get().begin()+1; aIter != aRow->get().end() && aInsertIter != aInsertRow->get().end();++aIter,++nCount)
+ for(OValueRefVector::iterator aInsertIter = aInsertRow->begin()+1; aIter != aRow->end() && aInsertIter != aInsertRow->end();++aIter,++nCount)
{
if(nPos != nCount)
{
diff --git a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
index 9bbff49ccc7b..4982cc455665 100644
--- a/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
+++ b/connectivity/source/drivers/evoab2/NResultSetMetaData.cxx
@@ -42,7 +42,7 @@ void OEvoabResultSetMetaData::setEvoabFields(const ::rtl::Reference<connectivity
{
static const char aName[] = "Name";
- for (const auto& rxColumn : xColumns->get())
+ for (const auto& rxColumn : *xColumns)
{
OUString aFieldName;
diff --git a/connectivity/source/drivers/file/FNoException.cxx b/connectivity/source/drivers/file/FNoException.cxx
index bd17c4fc85ba..7c26081da12e 100644
--- a/connectivity/source/drivers/file/FNoException.cxx
+++ b/connectivity/source/drivers/file/FNoException.cxx
@@ -85,14 +85,14 @@ void OPreparedStatement::scanParameter(OSQLParseNode* pParseNode,std::vector< OS
std::unique_ptr<OKeyValue> OResultSet::GetOrderbyKeyValue(OValueRefRow const & _rRow)
{
- sal_uInt32 nBookmarkValue = std::abs(static_cast<sal_Int32>((_rRow->get())[0]->getValue()));
+ sal_uInt32 nBookmarkValue = std::abs(static_cast<sal_Int32>((*_rRow)[0]->getValue()));
std::unique_ptr<OKeyValue> pKeyValue = OKeyValue::createKeyValue(nBookmarkValue);
for (auto const& elem : m_aOrderbyColumnNumber)
{
- OSL_ENSURE(elem < static_cast<sal_Int32>(_rRow->get().size()),"Invalid index for orderkey values!");
- pKeyValue->pushKey(new ORowSetValueDecorator((_rRow->get())[elem]->getValue()));
+ OSL_ENSURE(elem < static_cast<sal_Int32>(_rRow->size()),"Invalid index for orderkey values!");
+ pKeyValue->pushKey(new ORowSetValueDecorator((*_rRow)[elem]->getValue()));
}
return pKeyValue;
diff --git a/connectivity/source/drivers/file/FPreparedStatement.cxx b/connectivity/source/drivers/file/FPreparedStatement.cxx
index 9cf70d452c10..6d74583935ca 100644
--- a/connectivity/source/drivers/file/FPreparedStatement.cxx
+++ b/connectivity/source/drivers/file/FPreparedStatement.cxx
@@ -68,7 +68,7 @@ void OPreparedStatement::disposing()
m_xMetaData.clear();
if(m_aParameterRow.is())
{
- m_aParameterRow->get().clear();
+ m_aParameterRow->clear();
m_aParameterRow = nullptr;
}
}
@@ -78,7 +78,7 @@ void OPreparedStatement::construct(const OUString& sql)
OStatement_Base::construct(sql);
m_aParameterRow = new OValueRefVector();
- m_aParameterRow->get().push_back(new ORowSetValueDecorator(sal_Int32(0)) );
+ m_aParameterRow->push_back(new ORowSetValueDecorator(sal_Int32(0)) );
Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY);
@@ -260,9 +260,9 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /
checkAndResizeParameters(parameterIndex);
if ( m_aAssignValues.is() )
- (m_aAssignValues->get())[m_aParameterIndexes[parameterIndex]]->setNull();
+ (*m_aAssignValues)[m_aParameterIndexes[parameterIndex]]->setNull();
else
- (m_aParameterRow->get())[parameterIndex]->setNull();
+ (*m_aParameterRow)[parameterIndex]->setNull();
}
@@ -359,8 +359,8 @@ void SAL_CALL OPreparedStatement::clearParameters( )
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OStatement_BASE::rBHelper.bDisposed);
- m_aParameterRow->get().clear();
- m_aParameterRow->get().push_back(new ORowSetValueDecorator(sal_Int32(0)) );
+ m_aParameterRow->clear();
+ m_aParameterRow->push_back(new ORowSetValueDecorator(sal_Int32(0)) );
}
OResultSet* OPreparedStatement::createResultSet()
@@ -371,8 +371,8 @@ OResultSet* OPreparedStatement::createResultSet()
void OPreparedStatement::initResultSet(OResultSet *pResultSet)
{
// check if we got enough parameters
- if ( (m_aParameterRow.is() && ( m_aParameterRow->get().size() -1 ) < m_xParamColumns->get().size()) ||
- (m_xParamColumns.is() && !m_aParameterRow.is() && !m_aParameterRow->get().empty()) )
+ if ( (m_aParameterRow.is() && ( m_aParameterRow->size() -1 ) < m_xParamColumns->size()) ||
+ (m_xParamColumns.is() && !m_aParameterRow.is() && !m_aParameterRow->empty()) )
m_pConnection->throwGenericSQLException(STR_INVALID_PARA_COUNT,*this);
pResultSet->OpenImpl();
@@ -394,14 +394,14 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex)
::connectivity::checkDisposed(OStatement_BASE::rBHelper.bDisposed);
if ( m_aAssignValues.is() && (parameterIndex < 1 || parameterIndex >= static_cast<sal_Int32>(m_aParameterIndexes.size())) )
throwInvalidIndexException(*this);
- else if ( static_cast<sal_Int32>(m_aParameterRow->get().size()) <= parameterIndex )
+ else if ( static_cast<sal_Int32>(m_aParameterRow->size()) <= parameterIndex )
{
- sal_Int32 i = m_aParameterRow->get().size();
- m_aParameterRow->get().resize(parameterIndex+1);
+ sal_Int32 i = m_aParameterRow->size();
+ m_aParameterRow->resize(parameterIndex+1);
for ( ; i <= parameterIndex; ++i)
{
- if ( !(m_aParameterRow->get())[i].is() )
- (m_aParameterRow->get())[i] = new ORowSetValueDecorator;
+ if ( !(*m_aParameterRow)[i].is() )
+ (*m_aParameterRow)[i] = new ORowSetValueDecorator;
}
}
}
@@ -412,9 +412,9 @@ void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const ORowSetVal
checkAndResizeParameters(parameterIndex);
if(m_aAssignValues.is())
- *(m_aAssignValues->get())[m_aParameterIndexes[parameterIndex]] = x;
+ *(*m_aAssignValues)[m_aParameterIndexes[parameterIndex]] = x;
else
- *((m_aParameterRow->get())[parameterIndex]) = x;
+ *((*m_aParameterRow)[parameterIndex]) = x;
}
sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode const * pParameter, const Reference<XPropertySet>& _xCol)
@@ -455,8 +455,8 @@ sal_uInt32 OPreparedStatement::AddParameter(OSQLParseNode const * pParameter, co
,OUString()
,OUString()
,OUString());
- m_xParamColumns->get().push_back(xParaColumn);
- return m_xParamColumns->get().size();
+ m_xParamColumns->push_back(xParaColumn);
+ return m_xParamColumns->size();
}
void OPreparedStatement::describeColumn(OSQLParseNode const * _pParameter, OSQLParseNode const * _pNode,const OSQLTable& _xTable)
@@ -501,13 +501,13 @@ void OPreparedStatement::initializeResultSet(OResultSet* pRS)
OStatement_Base::initializeResultSet(pRS);
// Substitute parameter (AssignValues and criteria):
- if (!m_xParamColumns->get().empty())
+ if (!m_xParamColumns->empty())
{
// begin with AssignValues
sal_uInt16 nParaCount=0; // gives the current number of previously set Parameters
// search for parameters to be substituted:
- size_t nCount = m_aAssignValues.is() ? m_aAssignValues->get().size() : 1; // 1 is important for the Criteria
+ size_t nCount = m_aAssignValues.is() ? m_aAssignValues->size() : 1; // 1 is important for the Criteria
for (size_t j = 1; j < nCount; j++)
{
sal_uInt32 nParameter = (*m_aAssignValues).getParameterIndex(j);
@@ -517,18 +517,18 @@ void OPreparedStatement::initializeResultSet(OResultSet* pRS)
++nParaCount; // now the Parameter is valid
}
- if (m_aParameterRow.is() && (m_xParamColumns->get().size()+1) != m_aParameterRow->get().size() )
+ if (m_aParameterRow.is() && (m_xParamColumns->size()+1) != m_aParameterRow->size() )
{
- sal_Int32 i = m_aParameterRow->get().size();
- sal_Int32 nParamColumns = m_xParamColumns->get().size()+1;
- m_aParameterRow->get().resize(nParamColumns);
+ sal_Int32 i = m_aParameterRow->size();
+ sal_Int32 nParamColumns = m_xParamColumns->size()+1;
+ m_aParameterRow->resize(nParamColumns);
for ( ;i < nParamColumns; ++i )
{
- if ( !(m_aParameterRow->get())[i].is() )
- (m_aParameterRow->get())[i] = new ORowSetValueDecorator;
+ if ( !(*m_aParameterRow)[i].is() )
+ (*m_aParameterRow)[i] = new ORowSetValueDecorator;
}
}
- if (m_aParameterRow.is() && nParaCount < m_aParameterRow->get().size() )
+ if (m_aParameterRow.is() && nParaCount < m_aParameterRow->size() )
m_pSQLAnalyzer->bindParameterRow(m_aParameterRow);
}
}
@@ -540,9 +540,9 @@ void OPreparedStatement::parseParamterElem(const OUString& _sColumnName, OSQLPar
sal_Int32 nParameter = -1;
if(m_xParamColumns.is())
{
- OSQLColumns::Vector::const_iterator aIter = find(m_xParamColumns->get().begin(),m_xParamColumns->get().end(),_sColumnName,::comphelper::UStringMixEqual(m_pTable->isCaseSensitive()));
- if(aIter != m_xParamColumns->get().end())
- nParameter = m_xParamColumns->get().size() - (m_xParamColumns->get().end() - aIter) + 1;// +1 because the rows start at 1
+ OSQLColumns::const_iterator aIter = find(m_xParamColumns->begin(),m_xParamColumns->end(),_sColumnName,::comphelper::UStringMixEqual(m_pTable->isCaseSensitive()));
+ if(aIter != m_xParamColumns->end())
+ nParameter = m_xParamColumns->size() - (m_xParamColumns->end() - aIter) + 1;// +1 because the rows start at 1
}
if(nParameter == -1)
nParameter = AddParameter(pRow_Value_Constructor_Elem,xCol);
diff --git a/connectivity/source/drivers/file/FResultSet.cxx b/connectivity/source/drivers/file/FResultSet.cxx
index adcbb0897197..3b8f69d6ab6e 100644
--- a/connectivity/source/drivers/file/FResultSet.cxx
+++ b/connectivity/source/drivers/file/FResultSet.cxx
@@ -141,7 +141,7 @@ void OResultSet::disposing()
m_pSortIndex.reset();
if(m_aInsertRow.is())
- m_aInsertRow->get().clear();
+ m_aInsertRow->clear();
m_aSkipDeletedSet.clear();
}
@@ -193,8 +193,8 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 columnIndex)
checkIndex(columnIndex );
- m_bWasNull = (m_aSelectRow->get())[columnIndex]->getValue().isNull();
- return *(m_aSelectRow->get())[columnIndex];
+ m_bWasNull = (*m_aSelectRow)[columnIndex]->getValue().isNull();
+ return *(*m_aSelectRow)[columnIndex];
}
void OResultSet::checkIndex(sal_Int32 columnIndex )
@@ -264,7 +264,7 @@ sal_Int32 SAL_CALL OResultSet::getRow( )
OSL_ENSURE((m_bShowDeleted || !m_aRow->isDeleted()),"getRow called for deleted row");
- return m_aSkipDeletedSet.getMappedPosition((m_aRow->get())[0]->getValue());
+ return m_aSkipDeletedSet.getMappedPosition((*m_aRow)[0]->getValue());
}
@@ -341,7 +341,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast( )
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_nRowPos == sal_Int32(m_pFileSet->get().size());
+ return m_nRowPos == sal_Int32(m_pFileSet->size());
}
sal_Bool SAL_CALL OResultSet::isFirst( )
@@ -359,7 +359,7 @@ sal_Bool SAL_CALL OResultSet::isLast( )
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return m_nRowPos == sal_Int32(m_pFileSet->get().size() - 1);
+ return m_nRowPos == sal_Int32(m_pFileSet->size() - 1);
}
void SAL_CALL OResultSet::beforeFirst( )
@@ -518,12 +518,12 @@ void SAL_CALL OResultSet::insertRow( )
m_bRowInserted = m_pTable->InsertRow(*m_aInsertRow, m_xColsIdx);
if(m_bRowInserted && m_pFileSet.is())
{
- sal_Int32 nPos = (m_aInsertRow->get())[0]->getValue();
- m_pFileSet->get().push_back(nPos);
- *(m_aInsertRow->get())[0] = sal_Int32(m_pFileSet->get().size());
+ sal_Int32 nPos = (*m_aInsertRow)[0]->getValue();
+ m_pFileSet->push_back(nPos);
+ *(*m_aInsertRow)[0] = sal_Int32(m_pFileSet->size());
clearInsertRow();
- m_aSkipDeletedSet.insertNewPosition((m_aRow->get())[0]->getValue());
+ m_aSkipDeletedSet.insertNewPosition((*m_aRow)[0]->getValue());
}
}
@@ -536,7 +536,7 @@ void SAL_CALL OResultSet::updateRow( )
lcl_throwError(STR_TABLE_READONLY,*this);
m_bRowUpdated = m_pTable->UpdateRow(*m_aInsertRow, m_aRow,m_xColsIdx);
- *(m_aInsertRow->get())[0] = static_cast<sal_Int32>((m_aRow->get())[0]->getValue());
+ *(*m_aInsertRow)[0] = static_cast<sal_Int32>((*m_aRow)[0]->getValue());
clearInsertRow();
}
@@ -553,7 +553,7 @@ void SAL_CALL OResultSet::deleteRow()
if(m_aRow->isDeleted())
lcl_throwError(STR_ROW_ALREADY_DELETED,*this);
- sal_Int32 nPos = static_cast<sal_Int32>((m_aRow->get())[0]->getValue());
+ sal_Int32 nPos = static_cast<sal_Int32>((*m_aRow)[0]->getValue());
m_bRowDeleted = m_pTable->DeleteRow(*m_xColumns);
if(m_bRowDeleted && m_pFileSet.is())
{
@@ -576,8 +576,8 @@ void SAL_CALL OResultSet::cancelRowUpdates( )
if(m_aInsertRow.is())
{
- OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin()+1;
- for(;aIter != m_aInsertRow->get().end();++aIter)
+ OValueRefVector::iterator aIter = m_aInsertRow->begin()+1;
+ for(;aIter != m_aInsertRow->end();++aIter)
{
(*aIter)->setBound(false);
(*aIter)->setNull();
@@ -596,8 +596,8 @@ void SAL_CALL OResultSet::moveToInsertRow( )
m_bInserted = true;
- OValueRefVector::Vector::iterator aIter = m_aInsertRow->get().begin()+1;
- for(;aIter != m_aInsertRow->get().end();++aIter)
+ OValueRefVector::iterator aIter = m_aInsertRow->begin()+1;
+ for(;aIter != m_aInsertRow->end();++aIter)
{
(*aIter)->setBound(false);
(*aIter)->setNull();
@@ -617,8 +617,8 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x)
checkIndex(columnIndex );
columnIndex = mapColumn(columnIndex);
- (m_aInsertRow->get())[columnIndex]->setBound(true);
- *(m_aInsertRow->get())[columnIndex] = x;
+ (*m_aInsertRow)[columnIndex]->setBound(true);
+ *(*m_aInsertRow)[columnIndex] = x;
}
@@ -837,8 +837,8 @@ again:
}
else if (m_pFileSet.is())
{
- sal_uInt32 nBookmarkValue = std::abs(static_cast<sal_Int32>((m_aEvaluateRow->get())[0]->getValue()));
- m_pFileSet->get().push_back(nBookmarkValue);
+ sal_uInt32 nBookmarkValue = std::abs(static_cast<sal_Int32>((*m_aEvaluateRow)[0]->getValue()));
+ m_pFileSet->push_back(nBookmarkValue);
}
}
else if (m_aSQLIterator.getStatementType() == OSQLStatementType::Update)
@@ -887,7 +887,7 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
ExecuteRow(eCursorPosition,nOffset,false,bRetrieveData);
// now set the bookmark for outside this is the logical pos and not the file pos
- *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1);
+ *(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1);
}
else
{
@@ -904,7 +904,7 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
m_nRowPos = 0;
break;
case IResultSetHelper::LAST:
- m_nRowPos = m_pFileSet->get().size() - 1;
+ m_nRowPos = m_pFileSet->size() - 1;
break;
case IResultSetHelper::RELATIVE1:
m_nRowPos += nOffset;
@@ -921,21 +921,21 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
// The FileCursor is outside of the valid range, if:
// a.) m_nRowPos < 1
// b.) a KeySet exists and m_nRowPos > m_pFileSet->size()
- if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= static_cast<sal_Int32>(m_pFileSet->get().size()) )) // && m_pFileSet->IsFrozen()
+ if (m_nRowPos < 0 || (m_pFileSet->isFrozen() && eCursorPosition != IResultSetHelper::BOOKMARK && m_nRowPos >= static_cast<sal_Int32>(m_pFileSet->size()) )) // && m_pFileSet->IsFrozen()
{
goto Error;
}
else
{
- if (m_nRowPos < static_cast<sal_Int32>(m_pFileSet->get().size()))
+ if (m_nRowPos < static_cast<sal_Int32>(m_pFileSet->size()))
{
// Fetch via Index
- bool bOK = ExecuteRow(IResultSetHelper::BOOKMARK,(m_pFileSet->get())[m_nRowPos],false,bRetrieveData);
+ bool bOK = ExecuteRow(IResultSetHelper::BOOKMARK,(*m_pFileSet)[m_nRowPos],false,bRetrieveData);
if (!bOK)
goto Error;
// now set the bookmark for outside
- *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1);
+ *(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1);
if ( (bRetrieveData || m_pSQLAnalyzer->hasRestriction()) && m_pSQLAnalyzer->hasFunctions() )
{
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
@@ -944,18 +944,18 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
else // Index must be further constructed
{
// set first on the last known row
- if (m_pFileSet->get().empty())
+ if (m_pFileSet->empty())
{
m_pTable->seekRow(IResultSetHelper::ABSOLUTE1, 0, m_nFilePos);
}
else
{
- m_aFileSetIter = m_pFileSet->get().end()-1;
+ m_aFileSetIter = m_pFileSet->end()-1;
m_pTable->seekRow(IResultSetHelper::BOOKMARK, *m_aFileSetIter, m_nFilePos);
}
bool bOK = true;
// Determine the number of further Fetches
- while (bOK && m_nRowPos >= static_cast<sal_Int32>(m_pFileSet->get().size()))
+ while (bOK && m_nRowPos >= static_cast<sal_Int32>(m_pFileSet->size()))
{
bOK = ExecuteRow(IResultSetHelper::NEXT,1,true, false);//bRetrieveData);
}
@@ -966,7 +966,7 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
m_pTable->fetchRow(m_aRow, *(m_pTable->getTableColumns()), bRetrieveData);
// now set the bookmark for outside
- *(*m_aRow->get().begin()) = sal_Int32(m_nRowPos + 1);
+ *(*m_aRow->begin()) = sal_Int32(m_nRowPos + 1);
if ( (bRetrieveData || m_pSQLAnalyzer->hasRestriction()) && m_pSQLAnalyzer->hasFunctions() )
{
@@ -1014,12 +1014,12 @@ bool OResultSet::Move(IResultSetHelper::Movement eCursorPosition, sal_Int32 nOff
{
// put COUNT(*) in result-row
// (must be the first and only variable in the row)
- if (m_aRow->get().size() >= 2)
+ if (m_aRow->size() >= 2)
{
- *(m_aRow->get())[1] = m_nRowCountResult;
- *(m_aRow->get())[0] = sal_Int32(1);
- (m_aRow->get())[1]->setBound(true);
- (m_aSelectRow->get())[1] = (m_aRow->get())[1];
+ *(*m_aRow)[1] = m_nRowCountResult;
+ *(*m_aRow)[0] = sal_Int32(1);
+ (*m_aRow)[1]->setBound(true);
+ (*m_aSelectRow)[1] = (*m_aRow)[1];
}
}
else
@@ -1052,7 +1052,7 @@ Error:
case IResultSetHelper::ABSOLUTE1:
case IResultSetHelper::RELATIVE1:
if (nOffset > 0)
- m_nRowPos = m_pFileSet.is() ? static_cast<sal_Int32>(m_pFileSet->get().size()) : -1;
+ m_nRowPos = m_pFileSet.is() ? static_cast<sal_Int32>(m_pFileSet->size()) : -1;
else if (nOffset < 0)
m_nRowPos = -1;
break;
@@ -1102,8 +1102,8 @@ void OResultSet::sortRows()
size_t i = 0;
for (auto const& elem : m_aOrderbyColumnNumber)
{
- OSL_ENSURE(static_cast<sal_Int32>(m_aSelectRow->get().size()) > elem,"Invalid Index");
- switch ((*(m_aSelectRow->get().begin()+elem))->getValue().getTypeKind())
+ OSL_ENSURE(static_cast<sal_Int32>(m_aSelectRow->size()) > elem,"Invalid Index");
+ switch ((*(m_aSelectRow->begin()+elem))->getValue().getTypeKind())
{
case DataType::CHAR:
case DataType::VARCHAR:
@@ -1132,7 +1132,7 @@ void OResultSet::sortRows()
SAL_WARN( "connectivity.drivers","OFILECursor::Execute: Data type not implemented");
break;
}
- (m_aSelectRow->get())[elem]->setBound(true);
+ (*m_aSelectRow)[elem]->setBound(true);
++i;
}
@@ -1140,10 +1140,10 @@ void OResultSet::sortRows()
while ( ExecuteRow( IResultSetHelper::NEXT, 1, false ) )
{
- m_aSelectRow->get()[0]->setValue( m_aRow->get()[0]->getValue() );
+ (*m_aSelectRow)[0]->setValue( (*m_aRow)[0]->getValue() );
if ( m_pSQLAnalyzer->hasFunctions() )
m_pSQLAnalyzer->setSelectionEvaluationResult( m_aSelectRow, m_aColMapping );
- const sal_Int32 nBookmark = (*m_aRow->get().begin())->getValue();
+ const sal_Int32 nBookmark = (*m_aRow->begin())->getValue();
ExecuteRow( IResultSetHelper::BOOKMARK, nBookmark, true, false );
}
@@ -1206,7 +1206,7 @@ void OResultSet::OpenImpl()
{
if(isCount())
{
- if(m_xColumns->get().size() > 1)
+ if(m_xColumns->size() > 1)
lcl_throwError(STR_QUERY_COMPLEX_COUNT,*this);
m_nRowCountResult = 0;
@@ -1271,24 +1271,24 @@ void OResultSet::OpenImpl()
// But be careful: It is assumed, that the FilePositions will be stored as sequence 1..n
{
if ( m_nLastVisitedPos > 0)
- m_pFileSet->get().reserve( m_nLastVisitedPos );
+ m_pFileSet->reserve( m_nLastVisitedPos );
for (sal_Int32 i = 0; i < m_nLastVisitedPos; i++)
- m_pFileSet->get().push_back(i + 1);
+ m_pFileSet->push_back(i + 1);
}
}
OSL_ENSURE(m_pFileSet.is(),"No KeySet existing! :-(");
if(bDistinct && m_pFileSet.is())
{
- OValueRow aSearchRow = new OValueVector(m_aRow->get().size());
- OValueRefVector::Vector::iterator aRowIter = m_aRow->get().begin();
- OValueVector::Vector::iterator aSearchIter = aSearchRow->get().begin();
+ OValueRow aSearchRow = new OValueVector(m_aRow->size());
+ OValueRefVector::iterator aRowIter = m_aRow->begin();
+ OValueVector::iterator aSearchIter = aSearchRow->begin();
for ( ++aRowIter,++aSearchIter; // the first column is the bookmark column
- aRowIter != m_aRow->get().end();
+ aRowIter != m_aRow->end();
++aRowIter,++aSearchIter)
aSearchIter->setBound((*aRowIter)->isBound());
- size_t nMaxRow = m_pFileSet->get().size();
+ size_t nMaxRow = m_pFileSet->size();
if (nMaxRow)
{
@@ -1300,37 +1300,37 @@ void OResultSet::OpenImpl()
for( size_t j = nMaxRow-1; j > 0; --j)
{
- nPos = (m_pFileSet->get())[j];
+ nPos = (*m_pFileSet)[j];
ExecuteRow(IResultSetHelper::BOOKMARK,nPos,false);
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
- { // copy row values
- OValueRefVector::Vector::iterator copyFrom = m_aSelectRow->get().begin();
- OValueVector::Vector::iterator copyTo = aSearchRow->get().begin();
+ { // cop*y row values
+ OValueRefVector::iterator copyFrom = m_aSelectRow->begin();
+ OValueVector::iterator copyTo = aSearchRow->begin();
for ( ++copyFrom,++copyTo; // the first column is the bookmark column
- copyFrom != m_aSelectRow->get().end();
+ copyFrom != m_aSelectRow->end();
++copyFrom,++copyTo)
*copyTo = *(*copyFrom);
}
// compare with next row
- nKey = (m_pFileSet->get())[j-1];
+ nKey = (*m_pFileSet)[j-1];
ExecuteRow(IResultSetHelper::BOOKMARK,nKey,false);
m_pSQLAnalyzer->setSelectionEvaluationResult(m_aSelectRow,m_aColMapping);
- auto rowsMismatchIters = std::mismatch(std::next(m_aSelectRow->get().begin()), m_aSelectRow->get().end(),
- std::next(aSearchRow->get().begin()), // the first column is the bookmark column
- [](const OValueRefVector::Vector::value_type& a, const OValueVector::Vector::value_type& b) {
+ auto rowsMismatchIters = std::mismatch(std::next(m_aSelectRow->begin()), m_aSelectRow->end(),
+ std::next(aSearchRow->begin()), // the first column is the bookmark column
+ [](const OValueRefVector::value_type& a, const OValueVector::value_type& b) {
return !a->isBound() || (*a == b); });
- if(rowsMismatchIters.first == m_aSelectRow->get().end())
- (m_pFileSet->get())[j] = 0; // Rows match -- Mark for deletion by setting key to 0
+ if(rowsMismatchIters.first == m_aSelectRow->end())
+ (*m_pFileSet)[j] = 0; // Rows match -- Mark for deletion by setting key to 0
#if OSL_DEBUG_LEVEL > 1
else
nFound++;
#endif
}
- m_pFileSet->get().erase(std::remove(m_pFileSet->get().begin(),m_pFileSet->get().end(),0)
- ,m_pFileSet->get().end());
+ m_pFileSet->erase(std::remove(m_pFileSet->begin(),m_pFileSet->end(),0)
+ ,m_pFileSet->end());
}
}
}
@@ -1413,10 +1413,10 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
const OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME);
const OUString sType = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE);
- std::map<OSQLColumns::Vector::iterator,bool> aSelectIters;
- OValueRefVector::Vector::const_iterator aRowIter = _rRow->get().begin()+1;
+ std::map<OSQLColumns::iterator,bool> aSelectIters;
+ OValueRefVector::const_iterator aRowIter = _rRow->begin()+1;
for (sal_Int32 i=0; // the first column is the bookmark column
- aRowIter != _rRow->get().end();
+ aRowIter != _rRow->end();
++i, ++aRowIter
)
{
@@ -1433,8 +1433,8 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
// look if we have such a select column
// TODO: would like to have a O(log n) search here ...
- for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin();
- aIter != _rxColumns->get().end();
+ for ( OSQLColumns::iterator aIter = _rxColumns->begin();
+ aIter != _rxColumns->end();
++aIter
)
{
@@ -1448,12 +1448,12 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
aSelectIters.emplace(aIter,true);
if(_bSetColumnMapping)
{
- sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1;
+ sal_Int32 nSelectColumnPos = aIter - _rxColumns->begin() + 1;
// the getXXX methods are 1-based ...
sal_Int32 nTableColumnPos = i + 1;
// get first table column is the bookmark column ...
_rColMapping[nSelectColumnPos] = nTableColumnPos;
- (_rSelectRow->get())[nSelectColumnPos] = *aRowIter;
+ (*_rSelectRow)[nSelectColumnPos] = *aRowIter;
}
(*aRowIter)->setBound(true);
@@ -1477,8 +1477,8 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
Reference<XNameAccess> xNameAccess(_xNames,UNO_QUERY);
Sequence< OUString > aSelectColumns = xNameAccess->getElementNames();
- for ( OSQLColumns::Vector::iterator aIter = _rxColumns->get().begin();
- aIter != _rxColumns->get().end();
+ for ( OSQLColumns::iterator aIter = _rxColumns->begin();
+ aIter != _rxColumns->end();
++aIter
)
{
@@ -1492,7 +1492,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
if ( xNameAccess->hasByName( sSelectColumnRealName ) )
{
aSelectIters.emplace(aIter,true);
- sal_Int32 nSelectColumnPos = aIter - _rxColumns->get().begin() + 1;
+ sal_Int32 nSelectColumnPos = aIter - _rxColumns->begin() + 1;
const OUString* pBegin = aSelectColumns.getConstArray();
const OUString* pEnd = pBegin + aSelectColumns.getLength();
for(sal_Int32 i=0;pBegin != pEnd;++pBegin,++i)
@@ -1503,7 +1503,7 @@ void OResultSet::setBoundedColumns(const OValueRefRow& _rRow,
sal_Int32 nTableColumnPos = i + 1;
// get first table column is the bookmark column ...
_rColMapping[nSelectColumnPos] = nTableColumnPos;
- (_rSelectRow->get())[nSelectColumnPos] = (_rRow->get())[nTableColumnPos];
+ (*_rSelectRow)[nSelectColumnPos] = (*_rRow)[nTableColumnPos];
break;
}
}
@@ -1539,11 +1539,11 @@ void OResultSet::clearInsertRow()
{
m_aRow->setDeleted(false); // set to false here because this is the new row
sal_Int32 nPos = 0;
- for(ORowSetValueDecoratorRef& rValue : m_aInsertRow->get())
+ for(ORowSetValueDecoratorRef& rValue : *m_aInsertRow)
{
if ( rValue->isBound() )
{
- (m_aRow->get())[nPos]->setValue( rValue->getValue() );
+ (*m_aRow)[nPos]->setValue( rValue->getValue() );
}
rValue->setBound(nPos == 0);
rValue->setModified(false);
@@ -1557,8 +1557,8 @@ void OResultSet::initializeRow(OValueRefRow& _rRow,sal_Int32 _nColumnCount)
if(!_rRow.is())
{
_rRow = new OValueRefVector(_nColumnCount);
- (_rRow->get())[0]->setBound(true);
- std::for_each(_rRow->get().begin()+1,_rRow->get().end(),TSetRefBound(false));
+ (*_rRow)[0]->setBound(true);
+ std::for_each(_rRow->begin()+1,_rRow->end(),TSetRefBound(false));
}
}
@@ -1574,7 +1574,7 @@ bool OResultSet::move(IResultSetHelper::Movement _eCursorPosition, sal_Int32 _nO
sal_Int32 OResultSet::getDriverPos() const
{
- return (m_aRow->get())[0]->getValue();
+ return (*m_aRow)[0]->getValue();
}
bool OResultSet::isRowDeleted() const
diff --git a/connectivity/source/drivers/file/FResultSetMetaData.cxx b/connectivity/source/drivers/file/FResultSetMetaData.cxx
index e9adbc0930ec..f68a06532bb7 100644
--- a/connectivity/source/drivers/file/FResultSetMetaData.cxx
+++ b/connectivity/source/drivers/file/FResultSetMetaData.cxx
@@ -51,7 +51,7 @@ OResultSetMetaData::~OResultSetMetaData()
void OResultSetMetaData::checkColumnIndex(sal_Int32 column)
{
- if(column <= 0 || column > static_cast<sal_Int32>(m_xColumns->get().size()))
+ if(column <= 0 || column > static_cast<sal_Int32>(m_xColumns->size()))
throwInvalidIndexException(*this);
}
@@ -64,13 +64,13 @@ sal_Int32 SAL_CALL OResultSetMetaData::getColumnDisplaySize( sal_Int32 column )
sal_Int32 SAL_CALL OResultSetMetaData::getColumnType( sal_Int32 column )
{
checkColumnIndex(column);
- return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)));
+ return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE)));
}
sal_Int32 SAL_CALL OResultSetMetaData::getColumnCount( )
{
- return m_xColumns->get().size();
+ return m_xColumns->size();
}
@@ -90,8 +90,8 @@ OUString SAL_CALL OResultSetMetaData::getColumnName( sal_Int32 column )
{
checkColumnIndex(column);
- Any aName((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)));
- return aName.hasValue() ? getString(aName) : getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)));
+ Any aName((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)));
+ return aName.hasValue() ? getString(aName) : getString((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)));
}
OUString SAL_CALL OResultSetMetaData::getTableName( sal_Int32 /*column*/ )
@@ -107,7 +107,7 @@ OUString SAL_CALL OResultSetMetaData::getCatalogName( sal_Int32 /*column*/ )
OUString SAL_CALL OResultSetMetaData::getColumnTypeName( sal_Int32 column )
{
checkColumnIndex(column);
- return getString((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)));
+ return getString((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPENAME)));
}
OUString SAL_CALL OResultSetMetaData::getColumnLabel( sal_Int32 column )
@@ -124,7 +124,7 @@ OUString SAL_CALL OResultSetMetaData::getColumnServiceName( sal_Int32 /*column*/
sal_Bool SAL_CALL OResultSetMetaData::isCurrency( sal_Int32 column )
{
checkColumnIndex(column);
- return getBOOL((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)));
+ return getBOOL((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISCURRENCY)));
}
@@ -141,20 +141,20 @@ sal_Bool SAL_CALL OResultSetMetaData::isSigned( sal_Int32 /*column*/ )
sal_Int32 SAL_CALL OResultSetMetaData::getPrecision( sal_Int32 column )
{
checkColumnIndex(column);
- return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)));
+ return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_PRECISION)));
}
sal_Int32 SAL_CALL OResultSetMetaData::getScale( sal_Int32 column )
{
checkColumnIndex(column);
- return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)));
+ return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_SCALE)));
}
sal_Int32 SAL_CALL OResultSetMetaData::isNullable( sal_Int32 column )
{
checkColumnIndex(column);
- return getINT32((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)));
+ return getINT32((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_ISNULLABLE)));
}
@@ -168,8 +168,8 @@ sal_Bool SAL_CALL OResultSetMetaData::isReadOnly( sal_Int32 column )
{
checkColumnIndex(column);
return m_pTable->isReadOnly() || (
- (m_xColumns->get())[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) &&
- ::cppu::any2bool((m_xColumns->get())[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION))));
+ (*m_xColumns)[column-1]->getPropertySetInfo()->hasPropertyByName(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION)) &&
+ ::cppu::any2bool((*m_xColumns)[column-1]->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_FUNCTION))));
}
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index daacdbf7aac8..28eef44ff71e 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -109,7 +109,7 @@ void OStatement_BASE2::disposing()
if(m_aRow.is())
{
- m_aRow->get().clear();
+ m_aRow->clear();
m_aRow = nullptr;
}
@@ -285,7 +285,7 @@ void SAL_CALL OStatement_Base::disposing()
{
if(m_aEvaluateRow.is())
{
- m_aEvaluateRow->get().clear();
+ m_aEvaluateRow->clear();
m_aEvaluateRow = nullptr;
}
OStatement_BASE::disposing();
@@ -354,10 +354,10 @@ void OStatement_Base::setOrderbyColumn( OSQLParseNode const * pColumnRef,
// What number is the Column?
::rtl::Reference<OSQLColumns> aSelectColumns = m_aSQLIterator.getSelectColumns();
::comphelper::UStringMixEqual aCase;
- OSQLColumns::Vector::const_iterator aFind = ::connectivity::find(aSelectColumns->get().begin(),aSelectColumns->get().end(),aColumnName,aCase);
- if ( aFind == aSelectColumns->get().end() )
+ OSQLColumns::const_iterator aFind = ::connectivity::find(aSelectColumns->begin(),aSelectColumns->end(),aColumnName,aCase);
+ if ( aFind == aSelectColumns->end() )
throw SQLException();
- m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->get().begin()) + 1);
+ m_aOrderbyColumnNumber.push_back((aFind - aSelectColumns->begin()) + 1);
// Ascending or Descending?
m_aOrderbyAscending.push_back(SQL_ISTOKEN(pAscendingDescending,DESC) ? TAscendingOrder::DESC : TAscendingOrder::ASC);
@@ -383,7 +383,7 @@ void OStatement_Base::construct(const OUString& sql)
// more than one table -> can't operate on them -> error
m_pConnection->throwGenericSQLException(STR_QUERY_MORE_TABLES,*this);
- if ( (m_aSQLIterator.getStatementType() == OSQLStatementType::Select) && m_aSQLIterator.getSelectColumns()->get().empty() )
+ if ( (m_aSQLIterator.getStatementType() == OSQLStatementType::Select) && m_aSQLIterator.getSelectColumns()->empty() )
// SELECT statement without columns -> error
m_pConnection->throwGenericSQLException(STR_QUERY_NO_COLUMN,*this);
@@ -410,18 +410,18 @@ void OStatement_Base::construct(const OUString& sql)
Reference<XIndexAccess> xNames(m_xColNames,UNO_QUERY);
// set the binding of the resultrow
m_aRow = new OValueRefVector(xNames->getCount());
- (m_aRow->get())[0]->setBound(true);
- std::for_each(m_aRow->get().begin()+1,m_aRow->get().end(),TSetRefBound(false));
+ (*m_aRow)[0]->setBound(true);
+ std::for_each(m_aRow->begin()+1,m_aRow->end(),TSetRefBound(false));
// set the binding of the resultrow
m_aEvaluateRow = new OValueRefVector(xNames->getCount());
- (m_aEvaluateRow->get())[0]->setBound(true);
- std::for_each(m_aEvaluateRow->get().begin()+1,m_aEvaluateRow->get().end(),TSetRefBound(false));
+ (*m_aEvaluateRow)[0]->setBound(true);
+ std::for_each(m_aEvaluateRow->begin()+1,m_aEvaluateRow->end(),TSetRefBound(false));
// set the select row
- m_aSelectRow = new OValueRefVector(m_aSQLIterator.getSelectColumns()->get().size());
- std::for_each(m_aSelectRow->get().begin(),m_aSelectRow->get().end(),TSetRefBound(true));
+ m_aSelectRow = new OValueRefVector(m_aSQLIterator.getSelectColumns()->size());
+ std::for_each(m_aSelectRow->begin(),m_aSelectRow->end(),TSetRefBound(true));
// create the column mapping
createColumnMapping();
@@ -435,7 +435,7 @@ void OStatement_Base::createColumnMapping()
{
// initialize the column index map (mapping select columns to table columns)
::rtl::Reference<connectivity::OSQLColumns> xColumns = m_aSQLIterator.getSelectColumns();
- m_aColMapping.resize(xColumns->get().size() + 1);
+ m_aColMapping.resize(xColumns->size() + 1);
for (sal_Int32 i=0; i<static_cast<sal_Int32>(m_aColMapping.size()); ++i)
m_aColMapping[i] = i;
@@ -476,11 +476,11 @@ void OStatement_Base::GetAssignValues()
{
// Create Row for the values to be set (Reference through new)
if(m_aAssignValues.is())
- m_aAssignValues->get().clear();
+ m_aAssignValues->clear();
sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY_THROW)->getCount();
m_aAssignValues = new OAssignValues(nCount);
// unbound all
- std::for_each(m_aAssignValues->get().begin()+1,m_aAssignValues->get().end(),TSetRefBound(false));
+ std::for_each(m_aAssignValues->begin()+1,m_aAssignValues->end(),TSetRefBound(false));
m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER);
@@ -563,11 +563,11 @@ void OStatement_Base::GetAssignValues()
else if (SQL_ISRULE(m_pParseTree,update_statement_searched))
{
if(m_aAssignValues.is())
- m_aAssignValues->get().clear();
+ m_aAssignValues->clear();
sal_Int32 nCount = Reference<XIndexAccess>(m_xColNames,UNO_QUERY_THROW)->getCount();
m_aAssignValues = new OAssignValues(nCount);
// unbound all
- std::for_each(m_aAssignValues->get().begin()+1,m_aAssignValues->get().end(),TSetRefBound(false));
+ std::for_each(m_aAssignValues->begin()+1,m_aAssignValues->end(),TSetRefBound(false));
m_aParameterIndexes.resize(nCount+1,SQL_NO_PARAMETER);
@@ -654,7 +654,7 @@ void OStatement_Base::SetAssignValue(const OUString& aColumnName,
// Everything tested and we have the names of the Column.
// Now allocate one Value, set the value and tie the value to the Row.
if (bSetNull)
- (m_aAssignValues->get())[nId]->setNull();
+ (*m_aAssignValues)[nId]->setNull();
else
{
switch (::comphelper::getINT32(xCol->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_TYPE))))
@@ -663,15 +663,15 @@ void OStatement_Base::SetAssignValue(const OUString& aColumnName,
case DataType::CHAR:
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
- *(m_aAssignValues->get())[nId] = ORowSetValue(aValue);
+ *(*m_aAssignValues)[nId] = ORowSetValue(aValue);
//Characterset is already converted, since the entire statement was converted
break;
case DataType::BIT:
if (aValue.equalsIgnoreAsciiCase("TRUE") || aValue[0] == '1')
- *(m_aAssignValues->get())[nId] = true;
+ *(*m_aAssignValues)[nId] = true;
else if (aValue.equalsIgnoreAsciiCase("FALSE") || aValue[0] == '0')
- *(m_aAssignValues->get())[nId] = false;
+ *(*m_aAssignValues)[nId] = false;
else
throwFunctionSequenceException(*this);
break;
@@ -685,7 +685,7 @@ void OStatement_Base::SetAssignValue(const OUString& aColumnName,
case DataType::DATE:
case DataType::TIME:
case DataType::TIMESTAMP:
- *(m_aAssignValues->get())[nId] = ORowSetValue(aValue);
+ *(*m_aAssignValues)[nId] = ORowSetValue(aValue);
break;
default:
throwFunctionSequenceException(*this);
diff --git a/connectivity/source/drivers/file/fanalyzer.cxx b/connectivity/source/drivers/file/fanalyzer.cxx
index 9764b14f853d..a0d1305f6f89 100644
--- a/connectivity/source/drivers/file/fanalyzer.cxx
+++ b/connectivity/source/drivers/file/fanalyzer.cxx
@@ -177,7 +177,7 @@ void OSQLAnalyzer::setSelectionEvaluationResult(OValueRefRow const & _pRow,const
if ( nPos < static_cast< sal_Int32 >( _rColumnMapping.size() ) )
map = _rColumnMapping[nPos];
if ( map > 0 )
- selectionEval.second->startSelection( (_pRow->get())[map] );
+ selectionEval.second->startSelection( (*_pRow)[map] );
}
++nPos;
}
diff --git a/connectivity/source/drivers/file/fcode.cxx b/connectivity/source/drivers/file/fcode.cxx
index 2950b113d839..36cba4a73485 100644
--- a/connectivity/source/drivers/file/fcode.cxx
+++ b/connectivity/source/drivers/file/fcode.cxx
@@ -41,20 +41,20 @@ void OOperandRow::bindValue(const OValueRefRow& _pRow)
{
OSL_ENSURE(_pRow.is(),"NO EMPTY row allowed!");
m_pRow = _pRow;
- OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()");
- (m_pRow->get())[m_nRowPos]->setBound(true);
+ OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()");
+ (*m_pRow)[m_nRowPos]->setBound(true);
}
void OOperandRow::setValue(const ORowSetValue& _rVal)
{
- OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()");
- (*(m_pRow->get())[m_nRowPos]) = _rVal;
+ OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()");
+ (*(*m_pRow)[m_nRowPos]) = _rVal;
}
const ORowSetValue& OOperandRow::getValue() const
{
- OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->get().size(),"Invalid RowPos is >= vector.size()");
- return (m_pRow->get())[m_nRowPos]->getValue();
+ OSL_ENSURE(m_pRow.is() && m_nRowPos < m_pRow->size(),"Invalid RowPos is >= vector.size()");
+ return (*m_pRow)[m_nRowPos]->getValue();
}
diff --git a/connectivity/source/drivers/flat/EColumns.cxx b/connectivity/source/drivers/flat/EColumns.cxx
index 3aae644f2e99..a9e210321ba6 100644
--- a/connectivity/source/drivers/flat/EColumns.cxx
+++ b/connectivity/source/drivers/flat/EColumns.cxx
@@ -33,9 +33,9 @@ sdbcx::ObjectType OFlatColumns::createObject(const OUString& _rName)
{
OFlatTable* pTable = static_cast<OFlatTable*>(m_pTable);
const ::rtl::Reference<OSQLColumns>& aCols = pTable->getTableColumns();
- OSQLColumns::Vector::const_iterator aIter = find(aCols->get().begin(),aCols->get().end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
+ OSQLColumns::const_iterator aIter = find(aCols->begin(),aCols->end(),_rName,::comphelper::UStringMixEqual(isCaseSensitive()));
sdbcx::ObjectType xRet;
- if(aIter != aCols->get().end())
+ if(aIter != aCols->end())
xRet = sdbcx::ObjectType(*aIter,UNO_QUERY);
return xRet;
}
diff --git a/connectivity/source/drivers/flat/EResultSet.cxx b/connectivity/source/drivers/flat/EResultSet.cxx
index 150c7971b1c9..aca803041827 100644
--- a/connectivity/source/drivers/flat/EResultSet.cxx
+++ b/connectivity/source/drivers/flat/EResultSet.cxx
@@ -96,7 +96,7 @@ Any SAL_CALL OFlatResultSet::getBookmark( )
::osl::MutexGuard aGuard( m_aMutex );
checkDisposed(OResultSet_BASE::rBHelper.bDisposed);
- return makeAny(static_cast<sal_Int32>((m_aRow->get())[0]->getValue()));
+ return makeAny(static_cast<sal_Int32>((*m_aRow)[0]->getValue()));
}
sal_Bool SAL_CALL OFlatResultSet::moveToBookmark( const Any& bookmark )
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 6d9fc203f950..670fe46dffb0 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -107,13 +107,13 @@ void OFlatTable::fillColumns(const css::lang::Locale& _aLocale)
if(!m_aColumns.is())
m_aColumns = new OSQLColumns();
else
- m_aColumns->get().clear();
+ m_aColumns->clear();
m_aTypes.clear();
m_aPrecisions.clear();
m_aScales.clear();
// reserve some space
- m_aColumns->get().reserve(nFieldCount+1);
+ m_aColumns->reserve(nFieldCount+1);
m_aTypes.assign(nFieldCount+1,DataType::SQLNULL);
m_aPrecisions.assign(nFieldCount+1,-1);
m_aScales.assign(nFieldCount+1,-1);
@@ -168,12 +168,12 @@ void OFlatTable::fillColumns(const css::lang::Locale& _aLocale)
{
// check if the columname already exists
OUString aAlias(aColumnNames[i]);
- OSQLColumns::Vector::const_iterator aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
+ OSQLColumns::const_iterator aFind = connectivity::find(m_aColumns->begin(),m_aColumns->end(),aAlias,aCase);
sal_Int32 nExprCnt = 0;
- while(aFind != m_aColumns->get().end())
+ while(aFind != m_aColumns->end())
{
aAlias = aColumnNames[i] + OUString::number(++nExprCnt);
- aFind = connectivity::find(m_aColumns->get().begin(),m_aColumns->get().end(),aAlias,aCase);
+ aFind = connectivity::find(m_aColumns->begin(),m_aColumns->end(),aAlias,aCase);
}
sdbcx::OColumn* pColumn = new sdbcx::OColumn(aAlias,aTypeNames[i],OUString(),OUString(),
@@ -187,7 +187,7 @@ void OFlatTable::fillColumns(const css::lang::Locale& _aLocale)
bCase,
m_CatalogName, getSchema(), getName());
Reference< XPropertySet> xCol = pColumn;
- m_aColumns->get().push_back(xCol);
+ m_aColumns->push_back(xCol);
}
m_pFileStream->Seek(m_aRowPosToFilePos[0].second);
@@ -494,9 +494,9 @@ void OFlatTable::refreshColumns()
::osl::MutexGuard aGuard( m_aMutex );
::std::vector< OUString> aVector;
- aVector.reserve(m_aColumns->get().size());
+ aVector.reserve(m_aColumns->size());
- for (auto const& column : m_aColumns->get())
+ for (auto const& column : *m_aColumns)
aVector.push_back(Reference< XNamed>(column,UNO_QUERY_THROW)->getName());
if(m_xColumns)
@@ -567,7 +567,7 @@ sal_Int64 OFlatTable::getSomething( const Sequence< sal_Int8 > & rId )
bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool bRetrieveData)
{
- *(_rRow->get())[0] = m_nFilePos;
+ *(*_rRow)[0] = m_nFilePos;
if (!bRetrieveData)
return true;
@@ -591,10 +591,10 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
const sal_Unicode cThousandDelimiter = pConnection->getThousandDelimiter();
// Fields:
sal_Int32 nStartPos = 0;
- OSQLColumns::Vector::const_iterator aIter = _rCols.get().begin();
- OSQLColumns::Vector::const_iterator aEnd = _rCols.get().end();
- const OValueRefVector::Vector::size_type nCount = _rRow->get().size();
- for (OValueRefVector::Vector::size_type i = 1;
+ OSQLColumns::const_iterator aIter = _rCols.begin();
+ OSQLColumns::const_iterator aEnd = _rCols.end();
+ const OValueRefVector::size_type nCount = _rRow->size();
+ for (OValueRefVector::size_type i = 1;
aIter != aEnd && i < nCount;
++aIter, i++)
{
@@ -602,7 +602,7 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
if (aStr.isEmpty())
{
- (_rRow->get())[i]->setNull();
+ (*_rRow)[i]->setNull();
}
else
{
@@ -620,18 +620,18 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
switch(nType)
{
case DataType::DATE:
- *(_rRow->get())[i] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(nRes,m_aNullDate));
+ *(*_rRow)[i] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDate(nRes,m_aNullDate));
break;
case DataType::TIMESTAMP:
- *(_rRow->get())[i] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDateTime(nRes,m_aNullDate));
+ *(*_rRow)[i] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toDateTime(nRes,m_aNullDate));
break;
default:
- *(_rRow->get())[i] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(nRes));
+ *(*_rRow)[i] = ::dbtools::DBTypeConversion::toDouble(::dbtools::DBTypeConversion::toTime(nRes));
}
}
catch(Exception&)
{
- (_rRow->get())[i]->setNull();
+ (*_rRow)[i]->setNull();
}
} break;
case DataType::DOUBLE:
@@ -676,19 +676,19 @@ bool OFlatTable::fetchRow(OValueRefRow& _rRow, const OSQLColumns & _rCols, bool
// #99178# OJ
if ( DataType::DECIMAL == nType || DataType::NUMERIC == nType )
- *(_rRow->get())[i] = OUString(OUString::number(nVal));
+ *(*_rRow)[i] = OUString(OUString::number(nVal));
else
- *(_rRow->get())[i] = nVal;
+ *(*_rRow)[i] = nVal;
} break;
default:
{
// Copy Value as String in Row-Variable
- *(_rRow->get())[i] = ORowSetValue(aStr);
+ *(*_rRow)[i] = ORowSetValue(aStr);
}
break;
} // switch(nType)
- (_rRow->get())[i]->setTypeKind(nType);
+ (*_rRow)[i]->setTypeKind(nType);
}
}
return result;
diff --git a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
index 102dcae458c9..cbb3dc75608c 100644
--- a/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabPreparedStatement.cxx
@@ -42,8 +42,8 @@ void MacabPreparedStatement::checkAndResizeParameters(sal_Int32 nParams)
if (nParams < 1)
::dbtools::throwInvalidIndexException(*this);
- if (nParams >= static_cast<sal_Int32>(m_aParameterRow->get().size()))
- m_aParameterRow->get().resize(nParams);
+ if (nParams >= static_cast<sal_Int32>(m_aParameterRow->size()))
+ m_aParameterRow->resize(nParams);
}
void MacabPreparedStatement::setMacabFields() const
@@ -69,7 +69,7 @@ void MacabPreparedStatement::resetParameters() const
void MacabPreparedStatement::getNextParameter(OUString &rParameter) const
{
- if (m_nParameterIndex >= static_cast<sal_Int32>(m_aParameterRow->get().size()))
+ if (m_nParameterIndex >= static_cast<sal_Int32>(m_aParameterRow->size()))
{
::connectivity::SharedResources aResources;
const OUString sError( aResources.getResourceString(
@@ -78,7 +78,7 @@ void MacabPreparedStatement::getNextParameter(OUString &rParameter) const
::dbtools::throwGenericSQLException(sError,*const_cast<MacabPreparedStatement *>(this));
}
- rParameter = (m_aParameterRow->get())[m_nParameterIndex];
+ rParameter = (*m_aParameterRow)[m_nParameterIndex];
m_nParameterIndex++;
}
@@ -105,7 +105,7 @@ void MacabPreparedStatement::disposing()
if (m_aParameterRow.is())
{
- m_aParameterRow->get().clear();
+ m_aParameterRow->clear();
m_aParameterRow = nullptr;
}
}
@@ -197,7 +197,7 @@ void SAL_CALL MacabPreparedStatement::setNull(sal_Int32 parameterIndex, sal_Int3
checkAndResizeParameters(parameterIndex);
- (m_aParameterRow->get())[parameterIndex - 1].setNull();
+ (*m_aParameterRow)[parameterIndex - 1].setNull();
}
void SAL_CALL MacabPreparedStatement::setObjectNull(sal_Int32, sal_Int32, const OUString&)
@@ -247,7 +247,7 @@ void SAL_CALL MacabPreparedStatement::setString(sal_Int32 parameterIndex, const
checkAndResizeParameters(parameterIndex);
- (m_aParameterRow->get())[parameterIndex - 1] = x;
+ (*m_aParameterRow)[parameterIndex - 1] = x;
}
void SAL_CALL MacabPreparedStatement::setBytes(sal_Int32, const Sequence< sal_Int8 >&)
diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
index e5a851d69dd2..38e7dca051d4 100644
--- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
@@ -57,7 +57,7 @@ void MacabResultSetMetaData::setMacabFields(const ::rtl::Reference<connectivity:
aHeader = aRecords->getHeader();
- for (const auto& rxColumn : xColumns->get())
+ for (const auto& rxColumn : *xColumns)
{
OUString aFieldName;
sal_uInt32 nFieldNumber;
diff --git a/connectivity/source/drivers/mork/MPreparedStatement.cxx b/connectivity/source/drivers/mork/MPreparedStatement.cxx
index c9a1fafd9c28..d61a0ec96a51 100644
--- a/connectivity/source/drivers/mork/MPreparedStatement.cxx
+++ b/connectivity/source/drivers/mork/MPreparedStatement.cxx
@@ -52,7 +52,7 @@ void SAL_CALL OPreparedStatement::disposing()
m_xMetaData.clear();
if(m_aParameterRow.is())
{
- m_aParameterRow->get().clear();
+ m_aParameterRow->clear();
m_aParameterRow = nullptr;
}
m_xParamColumns = nullptr;
@@ -245,7 +245,7 @@ void SAL_CALL OPreparedStatement::setNull( sal_Int32 parameterIndex, sal_Int32 /
checkAndResizeParameters(parameterIndex);
- (m_aParameterRow->get())[parameterIndex].setNull();
+ (*m_aParameterRow)[parameterIndex].setNull();
}
@@ -343,11 +343,11 @@ void OPreparedStatement::checkAndResizeParameters(sal_Int32 parameterIndex)
if ( !m_aParameterRow.is() ) {
m_aParameterRow = new OValueVector();
- m_aParameterRow->get().push_back(sal_Int32(0));
+ m_aParameterRow->push_back(sal_Int32(0));
}
- if (static_cast<sal_Int32>(m_aParameterRow->get().size()) <= parameterIndex)
- m_aParameterRow->get().resize(parameterIndex+1);
+ if (static_cast<sal_Int32>(m_aParameterRow->size()) <= parameterIndex)
+ m_aParameterRow->resize(parameterIndex+1);
}
void OPreparedStatement::setParameter(sal_Int32 parameterIndex, const
@@ -359,7 +359,7 @@ ORowSetValue& x)
SAL_INFO(
"connectivity.mork",
"setParameter(" << parameterIndex << ", '" << x.getString() << "')");
- (m_aParameterRow->get())[parameterIndex] = x;
+ (*m_aParameterRow)[parameterIndex] = x;
}
@@ -403,7 +403,7 @@ void OPreparedStatement::AddParameter(OSQLParseNode const * pParameter, const Re
,OUString()
,OUString()
,OUString());
- m_xParamColumns->get().push_back(xParaColumn);
+ m_xParamColumns->push_back(xParaColumn);
}
void OPreparedStatement::describeColumn(OSQLParseNode const * _pParameter,
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index d5cc06559e11..ab6b11a9d490 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -272,7 +272,7 @@ sal_Int16 SAL_CALL OResultSet::getShort( sal_Int32 /*columnIndex*/ )
void OResultSet::checkIndex(sal_Int32 columnIndex )
{
- if(columnIndex <= 0 || columnIndex > static_cast<sal_Int32>(m_xColumns->get().size()))
+ if(columnIndex <= 0 || columnIndex > static_cast<sal_Int32>(m_xColumns->size()))
::dbtools::throwInvalidIndexException(*this);
}
@@ -299,7 +299,7 @@ bool OResultSet::fetchRow(sal_Int32 cardNumber,bool bForceReload)
if (!bForceReload)
{
// Check whether we've already fetched the row...
- if ( !(m_aRow->get())[0].isNull() && static_cast<sal_Int32>((m_aRow->get())[0]) == cardNumber )
+ if ( !(*m_aRow)[0].isNull() && static_cast<sal_Int32>((*m_aRow)[0]) == cardNumber )
return true;
}
// else
@@ -308,17 +308,17 @@ bool OResultSet::fetchRow(sal_Int32 cardNumber,bool bForceReload)
if ( !validRow( cardNumber ) )
return false;
- (m_aRow->get())[0] = cardNumber;
+ (*m_aRow)[0] = cardNumber;
sal_Int32 nCount = m_aColumnNames.getLength();
//m_RowStates = m_aQuery.getRowStates(cardNumber);
for( sal_Int32 i = 1; i <= nCount; i++ )
{
- if ( (m_aRow->get())[i].isBound() )
+ if ( (*m_aRow)[i].isBound() )
{
// Everything in the addressbook is a string!
- if ( !m_aQueryHelper.getRowValue( (m_aRow->get())[i], cardNumber, m_aColumnNames[i-1], DataType::VARCHAR ))
+ if ( !m_aQueryHelper.getRowValue( (*m_aRow)[i], cardNumber, m_aColumnNames[i-1], DataType::VARCHAR ))
{
m_pStatement->getOwnConnection()->throwSQLException( m_aQueryHelper.getError(), *this );
}
@@ -338,8 +338,8 @@ const ORowSetValue& OResultSet::getValue(sal_Int32 cardNumber, sal_Int32 columnI
return *ODatabaseMetaDataResultSet::getEmptyValue();
}
- m_bWasNull = (m_aRow->get())[columnIndex].isNull();
- return (m_aRow->get())[columnIndex];
+ m_bWasNull = (*m_aRow)[columnIndex].isNull();
+ return (*m_aRow)[columnIndex];
}
@@ -349,7 +349,7 @@ OUString SAL_CALL OResultSet::getString( sal_Int32 columnIndex )
ResultSetEntryGuard aGuard( *this );
OSL_ENSURE(m_xColumns.is(), "Need the Columns!!");
- OSL_ENSURE(columnIndex <= static_cast<sal_Int32>(m_xColumns->get().size()), "Trying to access invalid columns number");
+ OSL_ENSURE(columnIndex <= static_cast<sal_Int32>(m_xColumns->size()), "Trying to access invalid columns number");
checkIndex( columnIndex );
// If this query was sorted then we should have a valid KeySet, so use it
@@ -654,8 +654,8 @@ void OResultSet::parseParameter( const OSQLParseNode* pNode, OUString& rMatchStr
"Parameter name [" << m_nParamIndex << "]: " << aParameterName);
if ( m_aParameterRow.is() ) {
- OSL_ENSURE( m_nParamIndex < static_cast<sal_Int32>(m_aParameterRow->get().size()) + 1, "More parameters than values found" );
- rMatchString = (m_aParameterRow->get())[static_cast<sal_uInt16>(m_nParamIndex)];
+ OSL_ENSURE( m_nParamIndex < static_cast<sal_Int32>(m_aParameterRow->size()) + 1, "More parameters than values found" );
+ rMatchString = (*m_aParameterRow)[static_cast<sal_uInt16>(m_nParamIndex)];
SAL_INFO("connectivity.mork", "Prop Value: " << rMatchString);
}
else {
@@ -683,12 +683,12 @@ void OResultSet::analyseWhereClause( const OSQLParseNode* parseT
{
OUString aColName, aParameterValue;
sal_Int32 i = 1;
- for (auto const& column : xColumns->get())
+ for (auto const& column : *xColumns)
{
column->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= aColName;
SAL_INFO("connectivity.mork", "Prop Column Name: " << aColName);
if ( m_aParameterRow.is() ) {
- aParameterValue = (m_aParameterRow->get())[static_cast<sal_uInt16>(i)];
+ aParameterValue = (*m_aParameterRow)[static_cast<sal_uInt16>(i)];
SAL_INFO("connectivity.mork", "Prop Value: " << aParameterValue);
}
else {
@@ -949,7 +949,7 @@ void OResultSet::fillRowData()
const OUString sPropertyName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME);
OUString sName;
sal_Int32 i = 1;
- for (const auto& rxColumn : m_xColumns->get())
+ for (const auto& rxColumn : *m_xColumns)
{
rxColumn->getPropertyValue(sPropertyName) >>= sName;
SAL_INFO(
@@ -997,7 +997,7 @@ void OResultSet::fillRowData()
static bool matchRow( OValueRow const & row1, OValueRow const & row2 )
{
// the first column is the bookmark column
- return std::equal(std::next(row1->get().begin()), row1->get().end(), std::next(row2->get().begin()),
+ return std::equal(std::next(row1->begin()), row1->end(), std::next(row2->begin()),
[](const ORowSetValue& a, const ORowSetValue& b) { return !a.isBound() || a == b; });
}
@@ -1008,9 +1008,9 @@ sal_Int32 OResultSet::getRowForCardNumber(sal_Int32 nCardNum)
if ( m_pKeySet.is() )
{
sal_Int32 nPos;
- for(nPos=0;nPos < static_cast<sal_Int32>(m_pKeySet->get().size());nPos++)
+ for(nPos=0;nPos < static_cast<sal_Int32>(m_pKeySet->size());nPos++)
{
- if (nCardNum == (m_pKeySet->get())[nPos])
+ if (nCardNum == (*m_pKeySet)[nPos])
{
SAL_INFO("connectivity.mork", "return = " << nPos+1);
return nPos+1;
@@ -1072,8 +1072,8 @@ void OResultSet::executeQuery()
std::vector<sal_Int16>::size_type index = 0;
for (const auto& rColIndex : m_aOrderbyColumnNumber)
{
- OSL_ENSURE(static_cast<sal_Int32>(m_aRow->get().size()) > rColIndex,"Invalid Index");
- switch ((m_aRow->get().begin()+rColIndex)->getTypeKind())
+ OSL_ENSURE(static_cast<sal_Int32>(m_aRow->size()) > rColIndex,"Invalid Index");
+ switch ((m_aRow->begin()+rColIndex)->getTypeKind())
{
case DataType::CHAR:
case DataType::VARCHAR:
@@ -1140,12 +1140,12 @@ void OResultSet::executeQuery()
}
m_pKeySet = aSortIndex.CreateKeySet();
- m_CurrentRowCount = static_cast<sal_Int32>(m_pKeySet->get().size());
+ m_CurrentRowCount = static_cast<sal_Int32>(m_pKeySet->size());
#if OSL_DEBUG_LEVEL > 0
- for( OKeySet::Vector::size_type i = 0; i < m_pKeySet->get().size(); i++ )
+ for( OKeySet::size_type i = 0; i < m_pKeySet->size(); i++ )
SAL_INFO(
"connectivity.mork",
- "Sorted: " << i << " -> " << (m_pKeySet->get())[i]);
+ "Sorted: " << i << " -> " << (*m_pKeySet)[i]);
#endif
beforeFirst(); // Go back to start
@@ -1156,9 +1156,9 @@ void OResultSet::executeQuery()
// Handle the DISTINCT case
if ( bDistinct && m_pKeySet.is() )
{
- OValueRow aSearchRow = new OValueVector( m_aRow->get().size() );
+ OValueRow aSearchRow = new OValueVector( m_aRow->size() );
- for(sal_Int32 & i : m_pKeySet->get())
+ for(sal_Int32 & i : *m_pKeySet)
{
fetchRow( i ); // Fills m_aRow
if ( matchRow( m_aRow, aSearchRow ) )
@@ -1173,9 +1173,9 @@ void OResultSet::executeQuery()
}
}
// Now remove any keys marked with a 0
- m_pKeySet->get().erase(std::remove_if(m_pKeySet->get().begin(),m_pKeySet->get().end()
+ m_pKeySet->erase(std::remove_if(m_pKeySet->begin(),m_pKeySet->end()
,[](sal_Int32 n) { return n == 0; })
- ,m_pKeySet->get().end());
+ ,m_pKeySet->end());
}
}
@@ -1207,10 +1207,10 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow,
const OUString sRealName = OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_REALNAME);
std::vector< OUString> aColumnNames;
- aColumnNames.reserve(_rxColumns->get().size());
- OValueVector::Vector::iterator aRowIter = _rRow->get().begin()+1;
+ aColumnNames.reserve(_rxColumns->size());
+ OValueVector::iterator aRowIter = _rRow->begin()+1;
for (sal_Int32 i=0; // the first column is the bookmark column
- aRowIter != _rRow->get().end();
+ aRowIter != _rRow->end();
++i, ++aRowIter
)
{
@@ -1227,7 +1227,7 @@ void OResultSet::setBoundedColumns(const OValueRow& _rRow,
// look if we have such a select column
// TODO: would like to have a O(log n) search here ...
sal_Int32 nColumnPos = 0;
- for (const auto& rxColumn : _rxColumns->get())
+ for (const auto& rxColumn : *_rxColumns)
{
if ( nColumnPos < static_cast<sal_Int32>(aColumnNames.size()) )
sSelectColumnRealName = aColumnNames[nColumnPos];
@@ -1305,11 +1305,11 @@ void OResultSet::fillKeySet(sal_Int32 nMaxCardNumber)
if (m_CurrentRowCount < nMaxCardNumber)
{
sal_Int32 nKeyValue;
- if ( static_cast<sal_Int32>(m_pKeySet->get().capacity()) < nMaxCardNumber )
- m_pKeySet->get().reserve(nMaxCardNumber + 20 );
+ if ( static_cast<sal_Int32>(m_pKeySet->capacity()) < nMaxCardNumber )
+ m_pKeySet->reserve(nMaxCardNumber + 20 );
for (nKeyValue = m_CurrentRowCount+1; nKeyValue <= nMaxCardNumber; nKeyValue ++)
- m_pKeySet->get().push_back( nKeyValue );
+ m_pKeySet->push_back( nKeyValue );
m_CurrentRowCount = nMaxCardNumber;
}
}
@@ -1317,7 +1317,7 @@ void OResultSet::fillKeySet(sal_Int32 nMaxCardNumber)
sal_Int32 OResultSet::deletedCount()
{
impl_ensureKeySet();
- return m_CurrentRowCount - static_cast<sal_Int32>(m_pKeySet->get().size());
+ return m_CurrentRowCount - static_cast<sal_Int32>(m_pKeySet->size());
}
@@ -1361,16 +1361,16 @@ bool OResultSet::seekRow( eRowPosition pos, sal_Int32 nOffset )
return false;
}
sal_Int32 nCurCard;
- if ( nCurPos < static_cast<sal_Int32>(m_pKeySet->get().size()) ) //The requested row is exist in m_pKeySet, so we just use it
+ if ( nCurPos < static_cast<sal_Int32>(m_pKeySet->size()) ) //The requested row is exist in m_pKeySet, so we just use it
{
- nCurCard = (m_pKeySet->get())[nCurPos-1];
+ nCurCard = (*m_pKeySet)[nCurPos-1];
}
else //The requested row has not been retrieved until now. We should get the right card for it.
nCurCard = nCurPos + deletedCount();
if ( nCurCard > nNumberOfRecords) {
fillKeySet(nNumberOfRecords);
- m_nRowPos = static_cast<sal_uInt32>(m_pKeySet->get().size() + 1);
+ m_nRowPos = static_cast<sal_uInt32>(m_pKeySet->size() + 1);
SAL_INFO(
"connectivity.mork", "return False, m_nRowPos = " << m_nRowPos);
return false;
@@ -1404,7 +1404,7 @@ css::uno::Any OResultSet::getBookmark( )
}
OSL_ENSURE((!m_aRow->isDeleted()),"getBookmark called for deleted row");
- return makeAny(static_cast<sal_Int32>((m_aRow->get())[0]));
+ return makeAny(static_cast<sal_Int32>((*m_aRow)[0]));
}
sal_Bool OResultSet::moveToBookmark( const css::uno::Any& bookmark )
{
@@ -1464,9 +1464,9 @@ sal_Int32 OResultSet::getCurrentCardNumber()
{
if ( ( m_nRowPos == 0 ) || !m_pKeySet.is() )
return 0;
- if (m_pKeySet->get().size() < m_nRowPos)
+ if (m_pKeySet->size() < m_nRowPos)
return 0;
- return (m_pKeySet->get())[m_nRowPos-1];
+ return (*m_pKeySet)[m_nRowPos-1];
}
void OResultSet::checkPendingUpdate()
{
@@ -1499,8 +1499,8 @@ void OResultSet::updateValue(sal_Int32 columnIndex ,const ORowSetValue& x)
checkIndex(columnIndex );
columnIndex = mapColumn(columnIndex);
- (m_aRow->get())[columnIndex].setBound(true);
- (m_aRow->get())[columnIndex] = x;
+ (*m_aRow)[columnIndex].setBound(true);
+ (*m_aRow)[columnIndex] = x;
}
@@ -1515,8 +1515,8 @@ void SAL_CALL OResultSet::updateNull( sal_Int32 columnIndex )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list