diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-15 09:34:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-12-15 12:37:30 +0100 |
commit | f388d1dbb2edc1d678a658572bef6af4046728ff (patch) | |
tree | 926589ed828ef567225621c60b4085e7dca9d726 /dbaccess | |
parent | 865eb18f0faa94b260518526d44bbac2b6ca97b9 (diff) |
CONTAINER_ENTRY_NOTFOUND not needed anymore
after we make dbaccess consistently use COLUMN_POSITION_NOT_FOUND
Change-Id: Ia22c17196e8d651201c04239505d28e54369a8a4
Reviewed-on: https://gerrit.libreoffice.org/46501
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/inc/WCopyTable.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/RowSetDrop.cxx | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/ui/inc/WCopyTable.hxx b/dbaccess/source/ui/inc/WCopyTable.hxx index db3dfbe38e98..b6d77f199be7 100644 --- a/dbaccess/source/ui/inc/WCopyTable.hxx +++ b/dbaccess/source/ui/inc/WCopyTable.hxx @@ -331,7 +331,7 @@ namespace dbaui void CheckButtons(); // checks which button can be disabled, enabled // returns a vector where the position of a column and if the column is in the selection - // when not the value is COLUMN_POSITION_NOT_FOUND == (sal_uInt32)-1 + // when not the value is COLUMN_POSITION_NOT_FOUND. const ODatabaseExport::TPositions& GetColumnPositions() const { return m_vColumnPositions; } const std::vector<sal_Int32>& GetColumnTypes() const { return m_vColumnTypes; } bool UseHeaderLine() const { return m_bUseHeaderLine; } diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 81afc5b43bc7..b9c7998a8d4c 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -766,7 +766,7 @@ void ODatabaseExport::adjustFormat() if ( nNewPos < static_cast<sal_Int32>(m_vColumnPositions.size()) ) { sal_Int32 nColPos = m_vColumnPositions[nNewPos].first; - if( nColPos != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND)) + if( nColPos != COLUMN_POSITION_NOT_FOUND) { --nColPos; OSL_ENSURE((nColPos) < static_cast<sal_Int32>(m_vNumberFormat.size()),"m_vFormatKey: Illegal index for vector"); @@ -832,7 +832,7 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R ODatabaseExport::TPositions::const_iterator aFind = std::find_if(_rvColumns.begin(),_rvColumns.end(), [j] (const ODatabaseExport::TPositions::value_type& tPos) { return tPos.second == (sal_Int32)(j+1); }); - if ( _rvColumns.end() != aFind && aFind->second != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) && aFind->first != sal::static_int_cast< long >(CONTAINER_ENTRY_NOTFOUND) ) + if ( _rvColumns.end() != aFind && aFind->second != COLUMN_POSITION_NOT_FOUND && aFind->first != COLUMN_POSITION_NOT_FOUND ) { OSL_ENSURE((aFind->first) < static_cast<sal_Int32>(aInsertList.size()),"aInsertList: Illegal index for vector"); aInsertList[aFind->first] = ::dbtools::quoteName( aQuote,*(pIter+j)); diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx index aa1858a57d1b..c1cba83d2490 100644 --- a/dbaccess/source/ui/misc/RowSetDrop.cxx +++ b/dbaccess/source/ui/misc/RowSetDrop.cxx @@ -69,7 +69,7 @@ void ORowSetImportExport::initialize() m_aColumnTypes.reserve(nCount); for (sal_Int32 i = 1;i <= nCount; ++i) { - sal_Int32 nPos = -1; // -1 means column is autoincrement or doesn't exist + sal_Int32 nPos = COLUMN_POSITION_NOT_FOUND; // means column is autoincrement or doesn't exist if(!m_xTargetResultSetMetaData->isAutoIncrement(i)) { try |