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

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/46501Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 865eb18f
......@@ -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; }
......
......@@ -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));
......
......@@ -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
......
......@@ -24,7 +24,6 @@
#include <limits.h>
#define CONTAINER_APPEND (ULONG_MAX)
#define CONTAINER_ENTRY_NOTFOUND (ULONG_MAX)
#define TREELIST_APPEND (ULONG_MAX)
#define TREELIST_ENTRY_NOTFOUND (ULONG_MAX)
......
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