[Libreoffice-commits] core.git: dbaccess/source

Julien Nabet serval2412 at yahoo.fr
Mon Mar 28 18:39:49 UTC 2016


 dbaccess/source/core/api/KeySet.cxx                        |   28 ++++----
 dbaccess/source/core/api/RowSet.cxx                        |   18 ++---
 dbaccess/source/core/api/RowSetBase.cxx                    |   12 +--
 dbaccess/source/core/api/RowSetCache.cxx                   |   32 ++++-----
 dbaccess/source/core/api/SingleSelectQueryComposer.cxx     |   14 ++--
 dbaccess/source/core/api/WrappedResultSet.cxx              |    2 
 dbaccess/source/core/api/querycontainer.cxx                |    6 -
 dbaccess/source/core/dataaccess/ContentHelper.cxx          |    4 -
 dbaccess/source/core/dataaccess/ModelImpl.cxx              |   18 ++---
 dbaccess/source/core/dataaccess/bookmarkcontainer.cxx      |    2 
 dbaccess/source/core/dataaccess/connection.cxx             |   10 +-
 dbaccess/source/core/dataaccess/databasecontext.cxx        |   12 +--
 dbaccess/source/core/dataaccess/databasedocument.cxx       |   10 +-
 dbaccess/source/core/dataaccess/datasource.cxx             |    2 
 dbaccess/source/core/dataaccess/definitioncontainer.cxx    |   14 ++--
 dbaccess/source/core/dataaccess/documentcontainer.cxx      |    8 +-
 dbaccess/source/core/dataaccess/documentevents.cxx         |    2 
 dbaccess/source/core/misc/ContainerMediator.cxx            |    6 -
 dbaccess/source/filter/xml/xmlExport.cxx                   |    8 +-
 dbaccess/source/ui/app/AppController.cxx                   |    9 +-
 dbaccess/source/ui/app/AppControllerDnD.cxx                |    8 +-
 dbaccess/source/ui/app/AppControllerGen.cxx                |    8 +-
 dbaccess/source/ui/app/AppDetailView.cxx                   |    2 
 dbaccess/source/ui/browser/formadapter.cxx                 |    8 +-
 dbaccess/source/ui/browser/genericcontroller.cxx           |   14 ++--
 dbaccess/source/ui/browser/sbagrid.cxx                     |    4 -
 dbaccess/source/ui/browser/unodatbr.cxx                    |   10 +-
 dbaccess/source/ui/control/RelationControl.cxx             |    2 
 dbaccess/source/ui/control/dbtreelistbox.cxx               |    4 -
 dbaccess/source/ui/control/toolboxcontroller.cxx           |    6 -
 dbaccess/source/ui/dlg/ConnectionHelper.cxx                |    2 
 dbaccess/source/ui/dlg/DbAdminImpl.cxx                     |    6 -
 dbaccess/source/ui/dlg/indexdialog.cxx                     |   10 +-
 dbaccess/source/ui/dlg/indexfieldscontrol.cxx              |    2 
 dbaccess/source/ui/misc/DExport.cxx                        |   10 +-
 dbaccess/source/ui/misc/RowSetDrop.cxx                     |    4 -
 dbaccess/source/ui/misc/UITools.cxx                        |    2 
 dbaccess/source/ui/misc/WColumnSelect.cxx                  |    4 -
 dbaccess/source/ui/misc/WCopyTable.cxx                     |   16 ++--
 dbaccess/source/ui/misc/WTypeSelect.cxx                    |    2 
 dbaccess/source/ui/misc/indexcollection.cxx                |    4 -
 dbaccess/source/ui/querydesign/JAccess.cxx                 |    2 
 dbaccess/source/ui/querydesign/JoinController.cxx          |    4 -
 dbaccess/source/ui/querydesign/JoinTableView.cxx           |   32 ++++-----
 dbaccess/source/ui/querydesign/QueryDesignView.cxx         |    6 -
 dbaccess/source/ui/querydesign/QueryTableView.cxx          |   18 ++---
 dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx      |   45 ++++++-------
 dbaccess/source/ui/querydesign/TableConnection.cxx         |    4 -
 dbaccess/source/ui/querydesign/TableConnectionData.cxx     |    4 -
 dbaccess/source/ui/querydesign/TableWindowAccess.cxx       |    4 -
 dbaccess/source/ui/relationdesign/RTableConnectionData.cxx |   12 +--
 dbaccess/source/ui/relationdesign/RelationController.cxx   |    8 +-
 dbaccess/source/ui/relationdesign/RelationTableView.cxx    |    6 -
 dbaccess/source/ui/tabledesign/TEditControl.cxx            |    6 -
 dbaccess/source/ui/tabledesign/TableController.cxx         |   18 ++---
 dbaccess/source/ui/tabledesign/TableUndo.cxx               |   12 +--
 56 files changed, 263 insertions(+), 263 deletions(-)

New commits:
commit 2b60e64c18e16391ab7e04d1ded1119b8b5428ac
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Mar 28 19:17:45 2016 +0200

    Use const_iterator when possible (whole dbaccess)
    
    Change-Id: I3d10a7914353b384fc7a2195a70398869f675211
    Reviewed-on: https://gerrit.libreoffice.org/23570
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index d89fac7..28a1f1c 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -348,12 +348,12 @@ void OKeySet::ensureStatement( )
     const connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aEnd  = m_aKeyIter->second.first->get().end();
     for( ; aIter != aEnd; ++aIter )
         FilterColumnsNULL.push_back(aIter->isNull());
-    vStatements_t::iterator pNewStatement(m_vStatements.find(FilterColumnsNULL));
+    vStatements_t::const_iterator pNewStatement(m_vStatements.find(FilterColumnsNULL));
     if(pNewStatement == m_vStatements.end())
     {
         // no: make a new one
         makeNewStatement();
-        std::pair< vStatements_t::iterator, bool > insert_result
+        std::pair< vStatements_t::const_iterator, bool > insert_result
             (m_vStatements.insert(vStatements_t::value_type(FilterColumnsNULL, m_xStatement)));
         (void) insert_result; // WaE: unused variable
         assert(insert_result.second);
@@ -720,11 +720,11 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
                     Reference< XResultSetMetaDataSupplier > xMdSup(xRes,UNO_QUERY);
                     Reference< XResultSetMetaData > xMd = xMdSup->getMetaData();
                     sal_Int32 nColumnCount = xMd->getColumnCount();
-                    ::std::vector< OUString >::iterator aAutoIter = m_aAutoColumns.begin();
-                    ::std::vector< OUString >::iterator aAutoEnd = m_aAutoColumns.end();
+                    ::std::vector< OUString >::const_iterator aAutoIter = m_aAutoColumns.begin();
+                    ::std::vector< OUString >::const_iterator aAutoEnd = m_aAutoColumns.end();
                     for (sal_Int32 i = 1;aAutoIter !=  aAutoEnd && i <= nColumnCount; ++aAutoIter,++i)
                     {
-                        SelectColumnsMetaData::iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
+                        SelectColumnsMetaData::const_iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
                         if ( aFind != m_pKeyColumnNames->end() )
                             (_rInsertRow->get())[aFind->second.nPosition].fill(i, aFind->second.nType, xRow);
                     }
@@ -748,12 +748,12 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
         const OUString sQuote = getIdentifierQuoteString();
         OUString sMaxStmt;
         aEnd = m_pKeyColumnNames->end();
-        ::std::vector< OUString >::iterator aAutoIter = m_aAutoColumns.begin();
-        ::std::vector< OUString >::iterator aAutoEnd = m_aAutoColumns.end();
+        ::std::vector< OUString >::const_iterator aAutoIter = m_aAutoColumns.begin();
+        ::std::vector< OUString >::const_iterator aAutoEnd = m_aAutoColumns.end();
         for (;aAutoIter !=  aAutoEnd; ++aAutoIter)
         {
             // we will only fetch values which are keycolumns
-            SelectColumnsMetaData::iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
+            SelectColumnsMetaData::const_iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
             if ( aFind != aEnd )
             {
                 sMaxStmt += sMax;
@@ -782,7 +782,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
                     for (sal_Int32 i=1;aAutoIter != aAutoEnd; ++aAutoIter,++i)
                     {
                         // we will only fetch values which are keycolumns
-                        SelectColumnsMetaData::iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
+                        SelectColumnsMetaData::const_iterator aFind = m_pKeyColumnNames->find(*aAutoIter);
                         if ( aFind != aEnd )
                             (_rInsertRow->get())[aFind->second.nPosition].fill(i, aFind->second.nType, xRow);
                     }
@@ -797,7 +797,7 @@ void OKeySet::executeInsert( const ORowSetRow& _rInsertRow,const OUString& i_sSQ
     }
     if ( m_bInserted )
     {
-        OKeySetMatrix::iterator aKeyIter = m_aKeyMap.end();
+        OKeySetMatrix::const_iterator aKeyIter = m_aKeyMap.end();
         --aKeyIter;
         ORowSetRow aKeyRow = new connectivity::ORowVector< ORowSetValue >(m_pKeyColumnNames->size());
         copyRowValue(_rInsertRow,aKeyRow,aKeyIter->first + 1);
@@ -949,8 +949,8 @@ void SAL_CALL OKeySet::deleteRow(const ORowSetRow& _rDeleteRow,const connectivit
     }
 
     // now we have to set the index values
-    ::std::vector<sal_Int32>::iterator aIdxColIter = aIndexColumnPositions.begin();
-    ::std::vector<sal_Int32>::iterator aIdxColEnd = aIndexColumnPositions.end();
+    ::std::vector<sal_Int32>::const_iterator aIdxColIter = aIndexColumnPositions.begin();
+    ::std::vector<sal_Int32>::const_iterator aIdxColEnd = aIndexColumnPositions.end();
     aIter = m_pColumnNames->begin();
     for(;aIdxColIter != aIdxColEnd;++aIdxColIter,++i,++aIter)
     {
@@ -1198,7 +1198,7 @@ bool OKeySet::doTryRefetch_throw()  throw(SQLException, RuntimeException)
     sal_Int32 nPos=1;
     connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaIter;
     connectivity::ORowVector< ORowSetValue >::Vector::const_iterator aParaEnd;
-    OUpdatedParameter::iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first);
+    OUpdatedParameter::const_iterator aUpdateFind = m_aUpdatedParameter.find(m_aKeyIter->first);
     if ( aUpdateFind == m_aUpdatedParameter.end() )
     {
         aParaIter = m_aParameterValueForCache->get().begin();
@@ -1248,7 +1248,7 @@ void SAL_CALL OKeySet::refreshRow() throw(SQLException, RuntimeException)
     if ( !bOK )
     {
         // This row has disappeared; remove it.
-        OKeySetMatrix::iterator aTemp = m_aKeyIter;
+        OKeySetMatrix::const_iterator aTemp = m_aKeyIter;
         // use *next* row
         ++m_aKeyIter;
         m_aKeyMap.erase(aTemp);
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index bbf6548..8b1baa7 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -541,8 +541,8 @@ void ORowSet::freeResources( bool _bComplete )
     MutexGuard aGuard(m_aMutex);
 
     // free all clones
-    connectivity::OWeakRefArray::iterator aEnd = m_aClones.end();
-    for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; ++i)
+    connectivity::OWeakRefArray::const_iterator aEnd = m_aClones.end();
+    for (connectivity::OWeakRefArray::const_iterator i = m_aClones.begin(); aEnd != i; ++i)
     {
         Reference< XComponent > xComp(i->get(), UNO_QUERY);
         if (xComp.is())
@@ -1241,7 +1241,7 @@ void SAL_CALL ORowSet::moveToInsertRow(  ) throw(SQLException, RuntimeException,
 void ORowSet::impl_setDataColumnsWriteable_throw()
 {
     impl_restoreDataColumnsWriteable_throw();
-    TDataColumns::iterator aIter = m_aDataColumns.begin();
+    TDataColumns::const_iterator aIter = m_aDataColumns.begin();
     m_aReadOnlyDataColumns.resize(m_aDataColumns.size(),false);
     ::std::vector<bool, std::allocator<bool> >::iterator aReadIter = m_aReadOnlyDataColumns.begin();
     for(;aIter != m_aDataColumns.end();++aIter,++aReadIter)
@@ -1257,8 +1257,8 @@ void ORowSet::impl_setDataColumnsWriteable_throw()
 void ORowSet::impl_restoreDataColumnsWriteable_throw()
 {
     assert(m_aDataColumns.size() == m_aReadOnlyDataColumns.size() || m_aReadOnlyDataColumns.size() == 0 );
-    TDataColumns::iterator aIter = m_aDataColumns.begin();
-    ::std::vector<bool, std::allocator<bool> >::iterator aReadIter = m_aReadOnlyDataColumns.begin();
+    TDataColumns::const_iterator aIter = m_aDataColumns.begin();
+    ::std::vector<bool, std::allocator<bool> >::const_iterator aReadIter = m_aReadOnlyDataColumns.begin();
     for(;aReadIter != m_aReadOnlyDataColumns.end();++aIter,++aReadIter)
     {
         (*aIter)->setPropertyValue(PROPERTY_ISREADONLY, makeAny( (bool)*aReadIter ) );
@@ -2165,8 +2165,8 @@ void ORowSet::notifyRowSetAndClonesRowDelete( const Any& _rBookmark )
     // notify ourself
     onDeleteRow( _rBookmark );
     // notify the clones
-    connectivity::OWeakRefArray::iterator aEnd = m_aClones.end();
-    for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; ++i)
+    connectivity::OWeakRefArray::const_iterator aEnd = m_aClones.end();
+    for (connectivity::OWeakRefArray::const_iterator i = m_aClones.begin(); aEnd != i; ++i)
     {
         Reference< XUnoTunnel > xTunnel(i->get(),UNO_QUERY);
         if(xTunnel.is())
@@ -2183,8 +2183,8 @@ void ORowSet::notifyRowSetAndClonesRowDeleted( const Any& _rBookmark, sal_Int32
     // notify ourself
     onDeletedRow( _rBookmark, _nPos );
     // notify the clones
-    connectivity::OWeakRefArray::iterator aEnd = m_aClones.end();
-    for (connectivity::OWeakRefArray::iterator i = m_aClones.begin(); aEnd != i; ++i)
+    connectivity::OWeakRefArray::const_iterator aEnd = m_aClones.end();
+    for (connectivity::OWeakRefArray::const_iterator i = m_aClones.begin(); aEnd != i; ++i)
     {
         Reference< XUnoTunnel > xTunnel(i->get(),UNO_QUERY);
         if(xTunnel.is())
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index 85d9a71..054f1b3 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -230,13 +230,13 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex)
     if ( bValidCurrentRow )
     {
 #if OSL_DEBUG_LEVEL > 0
-        ORowSetMatrix::iterator aCacheEnd;
+        ORowSetMatrix::const_iterator aCacheEnd;
         ORowSetMatrix::iterator aCurrentRow;
         aCacheEnd = m_pCache->getEnd();
         aCurrentRow = m_aCurrentRow;
-        ORowSetCacheMap::iterator aCacheIter = m_aCurrentRow.getIter();
+        ORowSetCacheMap::const_iterator aCacheIter = m_aCurrentRow.getIter();
         ORowSetCacheIterator_Helper aHelper = aCacheIter->second;
-        ORowSetMatrix::iterator k = aHelper.aIterator;
+        ORowSetMatrix::const_iterator k = aHelper.aIterator;
         for (; k != m_pCache->getEnd(); ++k)
         {
             ORowSetValueVector* pTemp = k->get();
@@ -1177,8 +1177,8 @@ void ORowSetBase::firePropertyChange(const ORowSetRow& _rOldRow)
     SAL_INFO("dbaccess", "ORowSetBase::firePropertyChange() Clone = " << m_bClone);
     OSL_ENSURE(m_pColumns,"Columns can not be NULL here!");
     sal_Int32 i=0;
-    TDataColumns::iterator aEnd = m_aDataColumns.end();
-    for(TDataColumns::iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i)
+    TDataColumns::const_iterator aEnd = m_aDataColumns.end();
+    for(TDataColumns::const_iterator aIter = m_aDataColumns.begin();aIter != aEnd;++aIter,++i)
     {
         try
         {
@@ -1444,7 +1444,7 @@ void ORowSetNotifier::firePropertyChange()
     OSL_ENSURE(m_pImpl.get(),"Illegal CTor call, use the other one!");
     if( m_pImpl.get() )
     {
-        ::std::vector<sal_Int32>::iterator aIter = m_pImpl->aChangedColumns.begin();
+        ::std::vector<sal_Int32>::const_iterator aIter = m_pImpl->aChangedColumns.begin();
         for(;aIter != m_pImpl->aChangedColumns.end();++aIter)
         {
             m_pRowSet->firePropertyChange((*aIter)-1 ,m_pImpl->aRow[(*aIter)-1], ORowSetBase::GrantNotifierAccess());
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index f298c44..e689992 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -402,7 +402,7 @@ void ORowSetCache::setFetchSize(sal_Int32 _nSize)
         ::std::map<sal_Int32,sal_Bool> aCacheIterToChange;
         // first get the positions where they stand now
         ORowSetCacheMap::iterator aCacheIter = m_aCacheIterators.begin();
-        ORowSetCacheMap::iterator aCacheEnd = m_aCacheIterators.end();
+        ORowSetCacheMap::const_iterator aCacheEnd = m_aCacheIterators.end();
         for(;aCacheIter != aCacheEnd;++aCacheIter)
         {
             aCacheIterToChange[aCacheIter->first] = sal_False;
@@ -785,7 +785,7 @@ bool ORowSetCache::fillMatrix(sal_Int32& _nNewStartPos, sal_Int32 &_nNewEndPos)
                 m_bRowCountFinal = true;
             }
             const ORowSetMatrix::iterator aEnd = aIter;
-            ORowSetMatrix::iterator aRealEnd = m_pMatrix->end();
+            ORowSetMatrix::const_iterator aRealEnd = m_pMatrix->end();
             sal_Int32 nPos;
             if (m_nRowCount >= m_nFetchSize)
             {
@@ -1033,7 +1033,7 @@ void ORowSetCache::moveWindow()
             else
             {   // the end was reached before or at end() so we can set the start before or at nNewStartPos
                 // and possibly keep more of m_pMatrix than planned.
-                const ORowSetMatrix::iterator::difference_type nFetchedRows  = aIter - m_pMatrix->begin();
+                const ORowSetMatrix::const_iterator::difference_type nFetchedRows  = aIter - m_pMatrix->begin();
                 // *m_pMatrix now looks like:
                 // [0; nFetchedRows) i.e. [begin(); aIter): newly fetched data for positions m_nEndPos to m_nEndPos+nFetchedRows
                 // [nFetchedRows; ???) i.e. [aIter; aDataEnd]: data to be kept for positions m_nStartPos+nFetchedRows to ???
@@ -1302,7 +1302,7 @@ bool ORowSetCache::insertRow(::std::vector< Any >& o_aBookmarks)
             moveToBookmark(aBookmark);
             // update the cached values
             ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get();
-            ORowSetMatrix::iterator aIter = m_pMatrix->begin();
+            ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
             for(;aIter != m_pMatrix->end();++aIter)
             {
                 if ( m_aMatrixIter != aIter && aIter->is() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) )
@@ -1331,7 +1331,7 @@ void ORowSetCache::cancelRowModification()
 {
     // clear the insertrow references   -> implies that the current row of the rowset changes as well
     ORowSetCacheMap::iterator aCacheIter = m_aCacheIterators.begin();
-    ORowSetCacheMap::iterator aCacheEnd = m_aCacheIterators.end();
+    ORowSetCacheMap::const_iterator aCacheEnd = m_aCacheIterators.end();
     for(;aCacheIter != aCacheEnd;++aCacheIter)
     {
         if ( aCacheIter->second.pRowSet->isInsertRow() && aCacheIter->second.aIterator == m_aInsertRow )
@@ -1358,7 +1358,7 @@ void ORowSetCache::updateRow( ORowSetMatrix::iterator& _rUpdateRow,::std::vector
     {
         // update the cached values
         ORowSetValueVector::Vector& rCurrentRow = ((*m_aMatrixIter))->get();
-        ORowSetMatrix::iterator aIter = m_pMatrix->begin();
+        ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
         for(;aIter != m_pMatrix->end();++aIter)
         {
             if ( m_aMatrixIter != aIter && aIter->is() && m_pCacheSet->columnValuesUpdated((*aIter)->get(),rCurrentRow) )
@@ -1385,7 +1385,7 @@ bool ORowSetCache::deleteRow(  )
     ORowSetMatrix::iterator aPos = calcPosition();
     (*aPos)   = nullptr;
 
-    ORowSetMatrix::iterator aEnd = m_pMatrix->end();
+    ORowSetMatrix::const_iterator aEnd = m_pMatrix->end();
     for(++aPos;aPos != aEnd && aPos->is();++aPos)
     {
         *(aPos-1) = *aPos;
@@ -1426,7 +1426,7 @@ void ORowSetCache::moveToInsertRow(  )
 
     // we don't unbound the bookmark column
     ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin()+1;
-    ORowSetValueVector::Vector::iterator aEnd = (*m_aInsertRow)->get().end();
+    ORowSetValueVector::Vector::const_iterator aEnd = (*m_aInsertRow)->get().end();
     for(sal_Int32 i = 1;aIter != aEnd;++aIter,++i)
     {
         aIter->setBound(false);
@@ -1446,7 +1446,7 @@ ORowSetCacheIterator ORowSetCache::createIterator(ORowSetBase* _pRowSet)
 
 void ORowSetCache::deleteIterator(const ORowSetBase* _pRowSet)
 {
-    ORowSetCacheMap::iterator aCacheIter = m_aCacheIterators.begin();
+    ORowSetCacheMap::const_iterator aCacheIter = m_aCacheIterators.begin();
     for(;aCacheIter != m_aCacheIterators.end();)
     {
         if ( aCacheIter->second.pRowSet == _pRowSet )
@@ -1465,7 +1465,7 @@ void ORowSetCache::rotateCacheIterator(ORowSetMatrix::difference_type _nDist)
     {
         // now correct the iterator in our iterator vector
         ORowSetCacheMap::iterator aCacheIter = m_aCacheIterators.begin();
-        ORowSetCacheMap::iterator aCacheEnd  = m_aCacheIterators.end();
+        ORowSetCacheMap::const_iterator aCacheEnd  = m_aCacheIterators.end();
         for(;aCacheIter != aCacheEnd;++aCacheIter)
         {
             if ( !aCacheIter->second.pRowSet->isInsertRow()
@@ -1510,7 +1510,7 @@ void ORowSetCache::setUpdateIterator(const ORowSetMatrix::iterator& _rOriginalRo
     (*(*m_aInsertRow)) = (*(*_rOriginalRow));
     // we don't unbound the bookmark column
     ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin();
-    ORowSetValueVector::Vector::iterator aEnd = (*m_aInsertRow)->get().end();
+    ORowSetValueVector::Vector::const_iterator aEnd = (*m_aInsertRow)->get().end();
     for(;aIter != aEnd;++aIter)
         aIter->setModified(false);
 }
@@ -1639,7 +1639,7 @@ void ORowSetCache::clearInsertRow()
     if ( m_aInsertRow != m_pInsertMatrix->end() && m_aInsertRow->is() )
     {
         ORowSetValueVector::Vector::iterator aIter = (*m_aInsertRow)->get().begin()+1;
-        ORowSetValueVector::Vector::iterator aEnd = (*m_aInsertRow)->get().end();
+        ORowSetValueVector::Vector::const_iterator aEnd = (*m_aInsertRow)->get().end();
         for(;aIter != aEnd;++aIter)
         {
             aIter->setBound(false);
@@ -1665,7 +1665,7 @@ TORowSetOldRowHelperRef ORowSetCache::registerOldRow()
 
 void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
 {
-    TOldRowSetRows::iterator aOldRowEnd = m_aOldRows.end();
+    TOldRowSetRows::const_iterator aOldRowEnd = m_aOldRows.end();
     for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
     {
         if ( aOldRowIter->get() == _rRow.get() )
@@ -1680,7 +1680,7 @@ void ORowSetCache::deregisterOldRow(const TORowSetOldRowHelperRef& _rRow)
 bool ORowSetCache::reFillMatrix(sal_Int32 _nNewStartPos, sal_Int32 _nNewEndPos)
 {
     const TOldRowSetRows::const_iterator aOldRowEnd = m_aOldRows.end();
-    for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
+    for (TOldRowSetRows::const_iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
     {
         if ( aOldRowIter->is() && (*aOldRowIter)->getRow().is() )
             (*aOldRowIter)->setRow(new ORowSetValueVector( *((*aOldRowIter)->getRow()) ) );
@@ -1703,7 +1703,7 @@ bool ORowSetCache::fill(ORowSetMatrix::iterator& _aIter, const ORowSetMatrix::co
         else
         {
             const TOldRowSetRows::const_iterator aOldRowEnd = m_aOldRows.end();
-            for (TOldRowSetRows::iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
+            for (TOldRowSetRows::const_iterator aOldRowIter = m_aOldRows.begin(); aOldRowIter != aOldRowEnd; ++aOldRowIter)
             {
                 if ( (*aOldRowIter)->getRow() == *_aIter )
                     *_aIter = new ORowSetValueVector(nColumnCount);
@@ -1736,7 +1736,7 @@ void ORowSetCache::impl_updateRowFromCache_throw(ORowSetValueVector::Vector& io_
 {
     if ( o_ChangedColumns.size() > 1 )
     {
-        ORowSetMatrix::iterator aIter = m_pMatrix->begin();
+        ORowSetMatrix::const_iterator aIter = m_pMatrix->begin();
         for(;aIter != m_pMatrix->end();++aIter)
         {
             if ( aIter->is() && m_pCacheSet->updateColumnValues((*aIter)->get(),io_aRow,o_ChangedColumns))
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index 693e589..622d86b 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -265,13 +265,13 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
 
 OSingleSelectQueryComposer::~OSingleSelectQueryComposer()
 {
-    ::std::vector<OPrivateColumns*>::iterator aColIter = m_aColumnsCollection.begin();
-    ::std::vector<OPrivateColumns*>::iterator aEnd = m_aColumnsCollection.end();
+    ::std::vector<OPrivateColumns*>::const_iterator aColIter = m_aColumnsCollection.begin();
+    ::std::vector<OPrivateColumns*>::const_iterator aEnd = m_aColumnsCollection.end();
     for(;aColIter != aEnd;++aColIter)
         delete *aColIter;
 
-    ::std::vector<OPrivateTables*>::iterator aTabIter = m_aTablesCollection.begin();
-    ::std::vector<OPrivateTables*>::iterator aTabEnd = m_aTablesCollection.end();
+    ::std::vector<OPrivateTables*>::const_iterator aTabIter = m_aTablesCollection.begin();
+    ::std::vector<OPrivateTables*>::const_iterator aTabEnd = m_aTablesCollection.end();
     for(;aTabIter != aTabEnd;++aTabIter)
         delete *aTabIter;
 }
@@ -898,7 +898,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns(  ) thr
             {
                 // we can now only look if we found it under the realname property
                 // here we have to make the assumption that the position is correct
-                OSQLColumns::Vector::iterator aFind2 = aSelectColumns->get().begin() + i-1;
+                OSQLColumns::Vector::const_iterator aFind2 = aSelectColumns->get().begin() + i-1;
                 Reference<XPropertySet> xProp(*aFind2,UNO_QUERY);
                 if ( !xProp.is() || !xProp->getPropertySetInfo()->hasPropertyByName( PROPERTY_REALNAME ) )
                     continue;
@@ -909,7 +909,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns(  ) thr
 
                 OUString sRealName;
                 xProp->getPropertyValue(PROPERTY_REALNAME) >>= sRealName;
-                ::std::vector< OUString>::iterator aFindName;
+                ::std::vector< OUString>::const_iterator aFindName;
                 if ( sColumnName.isEmpty() )
                     xProp->getPropertyValue(PROPERTY_NAME) >>= sColumnName;
 
@@ -1373,7 +1373,7 @@ void OSingleSelectQueryComposer::clearColumns( const EColumnType _eType )
 void OSingleSelectQueryComposer::clearCurrentCollections()
 {
     ::std::vector<OPrivateColumns*>::iterator aIter = m_aCurrentColumns.begin();
-    ::std::vector<OPrivateColumns*>::iterator aEnd = m_aCurrentColumns.end();
+    ::std::vector<OPrivateColumns*>::const_iterator aEnd = m_aCurrentColumns.end();
     for (;aIter != aEnd;++aIter)
     {
         if ( *aIter )
diff --git a/dbaccess/source/core/api/WrappedResultSet.cxx b/dbaccess/source/core/api/WrappedResultSet.cxx
index abcbc95..d9659a1 100644
--- a/dbaccess/source/core/api/WrappedResultSet.cxx
+++ b/dbaccess/source/core/api/WrappedResultSet.cxx
@@ -82,7 +82,7 @@ void SAL_CALL WrappedResultSet::insertRow( const ORowSetRow& _rInsertRow,const c
 {
     m_xUpd->moveToInsertRow();
     sal_Int32 i = 1;
-    connectivity::ORowVector< ORowSetValue > ::Vector::iterator aEnd = _rInsertRow->get().end();
+    connectivity::ORowVector< ORowSetValue > ::Vector::const_iterator aEnd = _rInsertRow->get().end();
     for(connectivity::ORowVector< ORowSetValue > ::Vector::iterator aIter = _rInsertRow->get().begin()+1;aIter != aEnd;++aIter,++i)
     {
         aIter->setSigned(m_aSignedFlags[i-1]);
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index 91a74a4..eec3ace 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -324,8 +324,8 @@ void SAL_CALL OQueryContainer::disposing( const css::lang::EventObject& _rSource
     {
         Reference< XContent > xSource(_rSource.Source, UNO_QUERY);
         // it's one of our documents ....
-        Documents::iterator aIter = m_aDocumentMap.begin();
-        Documents::iterator aEnd = m_aDocumentMap.end();
+        Documents::const_iterator aIter = m_aDocumentMap.begin();
+        Documents::const_iterator aEnd = m_aDocumentMap.end();
         for (;aIter != aEnd;++aIter )
         {
             if ( xSource == aIter->second.get() )
@@ -383,7 +383,7 @@ bool OQueryContainer::checkExistence(const OUString& _rName)
     if ( !m_bInPropertyChange )
     {
         bRet = m_xCommandDefinitions->hasByName(_rName);
-        Documents::iterator aFind = m_aDocumentMap.find(_rName);
+        Documents::const_iterator aFind = m_aDocumentMap.find(_rName);
         if ( !bRet && aFind != m_aDocumentMap.end() )
         {
             m_aDocuments.erase( ::std::find(m_aDocuments.begin(),m_aDocuments.end(),aFind));
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index ea3f458..da159ac 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -517,7 +517,7 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
                     PropertyEventSequence* propertyEvents = nullptr;
 
                     XPropertiesChangeListener* pListener = static_cast< XPropertiesChangeListener * >( aIter.next() );
-                    PropertiesEventListenerMap::iterator it = aListeners.find( pListener );
+                    PropertiesEventListenerMap::const_iterator it = aListeners.find( pListener );
                     if ( it == aListeners.end() )
                     {
                         // Not in map - create and insert new entry.
@@ -534,7 +534,7 @@ void OContentHelper::notifyPropertiesChange( const Sequence< PropertyChangeEvent
         }
 
         // Notify listeners.
-        PropertiesEventListenerMap::iterator it = aListeners.begin();
+        PropertiesEventListenerMap::const_iterator it = aListeners.begin();
         while ( !aListeners.empty() )
         {
             XPropertiesChangeListener* pListener =
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index c1e75e7..318ed94 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -181,7 +181,7 @@ void DocumentStorageAccess::dispose()
 {
     ::osl::MutexGuard aGuard( m_aMutex );
 
-    for (   NamedStorages::iterator loop = m_aExposedStorages.begin();
+    for (   NamedStorages::const_iterator loop = m_aExposedStorages.begin();
             loop != m_aExposedStorages.end();
             ++loop
         )
@@ -239,7 +239,7 @@ void DocumentStorageAccess::disposeStorages()
 {
     m_bDisposingSubStorages = true;
 
-    NamedStorages::iterator aEnd = m_aExposedStorages.end();
+    NamedStorages::const_iterator aEnd = m_aExposedStorages.end();
     for (   NamedStorages::iterator aIter = m_aExposedStorages.begin();
             aIter != aEnd ;
             ++aIter
@@ -305,7 +305,7 @@ bool DocumentStorageAccess::commitEmbeddedStorage( bool _bPreventRootCommits )
 Reference< XStorage > SAL_CALL DocumentStorageAccess::getDocumentSubStorage( const OUString& aStorageName, ::sal_Int32 _nDesiredMode ) throw (RuntimeException, std::exception)
 {
     ::osl::MutexGuard aGuard( m_aMutex );
-    NamedStorages::iterator pos = m_aExposedStorages.find( aStorageName );
+    NamedStorages::const_iterator pos = m_aExposedStorages.find( aStorageName );
     if ( pos == m_aExposedStorages.end() )
     {
         Reference< XStorage > xResult = impl_openSubStorage_nothrow( aStorageName, _nDesiredMode );
@@ -379,7 +379,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& So
     if ( m_bDisposingSubStorages )
         return;
 
-    for (   NamedStorages::iterator find = m_aExposedStorages.begin();
+    for (   NamedStorages::const_iterator find = m_aExposedStorages.begin();
             find != m_aExposedStorages.end();
             ++find
         )
@@ -629,7 +629,7 @@ void SAL_CALL ODatabaseModelImpl::disposing( const css::lang::EventObject& Sourc
     if ( xCon.is() )
     {
         bool bStore = false;
-        OWeakConnectionArray::iterator aEnd = m_aConnections.end();
+        OWeakConnectionArray::const_iterator aEnd = m_aConnections.end();
         for (OWeakConnectionArray::iterator i = m_aConnections.begin(); aEnd != i; ++i)
         {
             if ( xCon == i->get() )
@@ -655,8 +655,8 @@ void ODatabaseModelImpl::clearConnections()
     aConnections.swap( m_aConnections );
 
     Reference< XConnection > xConn;
-    OWeakConnectionArray::iterator aEnd = aConnections.end();
-    for ( OWeakConnectionArray::iterator i = aConnections.begin(); aEnd != i; ++i )
+    OWeakConnectionArray::const_iterator aEnd = aConnections.end();
+    for ( OWeakConnectionArray::const_iterator i = aConnections.begin(); aEnd != i; ++i )
     {
         xConn = *i;
         if ( xConn.is() )
@@ -694,8 +694,8 @@ void ODatabaseModelImpl::dispose()
     m_xDataSource = WeakReference<XDataSource>();
     m_xModel = WeakReference< XModel >();
 
-    ::std::vector<TContentPtr>::iterator aIter = m_aContainer.begin();
-    ::std::vector<TContentPtr>::iterator aEnd = m_aContainer.end();
+    ::std::vector<TContentPtr>::const_iterator aIter = m_aContainer.begin();
+    ::std::vector<TContentPtr>::const_iterator aEnd = m_aContainer.end();
     for (;aIter != aEnd ; ++aIter)
     {
         if ( aIter->get() )
diff --git a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
index 87d4237..3175df9 100644
--- a/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/bookmarkcontainer.cxx
@@ -268,7 +268,7 @@ void OBookmarkContainer::implRemove(const OUString& _rName)
     MutexGuard aGuard(m_rMutex);
 
     // look for the name in the index access vector
-    MapString2String::iterator aMapPos = m_aBookmarks.end();
+    MapString2String::const_iterator aMapPos = m_aBookmarks.end();
     for (   MapIteratorVector::iterator aSearch = m_aBookmarksIndexed.begin();
             aSearch != m_aBookmarksIndexed.end();
             ++aSearch
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 0ff6362..7fcd857 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -459,8 +459,8 @@ void OConnection::disposing()
     OSubComponent::disposing();
     OConnectionWrapper::disposing();
 
-    connectivity::OWeakRefArray::iterator aEnd = m_aStatements.end();
-    for (connectivity::OWeakRefArray::iterator i = m_aStatements.begin(); aEnd != i; ++i)
+    connectivity::OWeakRefArray::const_iterator aEnd = m_aStatements.end();
+    for (connectivity::OWeakRefArray::const_iterator i = m_aStatements.begin(); aEnd != i; ++i)
     {
         Reference<XComponent> xComp(i->get(),UNO_QUERY);
         ::comphelper::disposeComponent(xComp);
@@ -475,8 +475,8 @@ void OConnection::disposing()
 
     ::comphelper::disposeComponent(m_xQueries);
 
-    connectivity::OWeakRefArray::iterator aComposerEnd = m_aComposers.end();
-    for (connectivity::OWeakRefArray::iterator j = m_aComposers.begin(); aComposerEnd != j; ++j)
+    connectivity::OWeakRefArray::const_iterator aComposerEnd = m_aComposers.end();
+    for (connectivity::OWeakRefArray::const_iterator j = m_aComposers.begin(); aComposerEnd != j; ++j)
     {
         Reference<XComponent> xComp(j->get(),UNO_QUERY);
         ::comphelper::disposeComponent(xComp);
@@ -640,7 +640,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s
     {
         if ( !_sServiceSpecifier.isEmpty() )
         {
-            TSupportServices::iterator aFind = m_aSupportServices.find(_sServiceSpecifier);
+            TSupportServices::const_iterator aFind = m_aSupportServices.find(_sServiceSpecifier);
             if ( aFind == m_aSupportServices.end() )
             {
                 Sequence<Any> aArgs(1);
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index 84fef36..a82d227 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -271,8 +271,8 @@ void ODatabaseContext::disposing()
     // dispose the data sources
     // disposing seems to remove elements, so work on copy for valid iterators
     ObjectCache objCopy(m_aDatabaseObjects);
-    ObjectCache::iterator const aEnd = objCopy.end();
-    for (   ObjectCache::iterator aIter = objCopy.begin();
+    ObjectCache::const_iterator const aEnd = objCopy.end();
+    for (   ObjectCache::const_iterator aIter = objCopy.begin();
             aIter != aEnd;
             ++aIter
         )
@@ -530,7 +530,7 @@ void ODatabaseContext::revokeObject(const OUString& _rName) throw( Exception, Ru
     }
 
     // check if URL is already loaded
-    ObjectCache::iterator aExistent = m_aDatabaseObjects.find( sURL );
+    ObjectCache::const_iterator aExistent = m_aDatabaseObjects.find( sURL );
     if ( aExistent != m_aDatabaseObjects.end() )
         m_aDatabaseObjects.erase( aExistent );
 
@@ -675,7 +675,7 @@ sal_Bool ODatabaseContext::hasByName(const OUString& _rName) throw( RuntimeExcep
 
 Reference< XInterface > ODatabaseContext::getObject( const OUString& _rURL )
 {
-    ObjectCache::iterator aFind = m_aDatabaseObjects.find( _rURL );
+    ObjectCache::const_iterator aFind = m_aDatabaseObjects.find( _rURL );
     Reference< XInterface > xExistent;
     if ( aFind != m_aDatabaseObjects.end() )
         xExistent = aFind->second->getOrCreateDataSource();
@@ -706,9 +706,9 @@ void ODatabaseContext::databaseDocumentURLChange( const OUString& _rOldURL, cons
 {
     SAL_INFO("dbaccess.core", "DatabaseContext: changing registrations from " << _rOldURL <<
              " to " << _rNewURL);
-    ObjectCache::iterator oldPos = m_aDatabaseObjects.find( _rOldURL );
+    ObjectCache::const_iterator oldPos = m_aDatabaseObjects.find( _rOldURL );
     ENSURE_OR_THROW( oldPos != m_aDatabaseObjects.end(), "illegal old database document URL" );
-    ObjectCache::iterator newPos = m_aDatabaseObjects.find( _rNewURL );
+    ObjectCache::const_iterator newPos = m_aDatabaseObjects.find( _rNewURL );
     ENSURE_OR_THROW( newPos == m_aDatabaseObjects.end(), "illegal new database document URL" );
 
     m_aDatabaseObjects[ _rNewURL ] = oldPos->second;
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index a3bd0ff..dc1f629 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -409,8 +409,8 @@ void lcl_uglyHackToStoreDialogeEmbedImages( const Reference< XStorageBasedLibrar
     {
         // Export the images to the storage
         Reference< XGraphicObjectResolver > xGraphicResolver = GraphicObjectResolver::createWithStorage(rxContext, xTmpPic);
-        std::vector< OUString >::iterator it = vEmbedImgUrls.begin();
-        std::vector< OUString >::iterator it_end = vEmbedImgUrls.end();
+        std::vector< OUString >::const_iterator it = vEmbedImgUrls.begin();
+        std::vector< OUString >::const_iterator it_end = vEmbedImgUrls.end();
         if ( xGraphicResolver.is() )
         {
             for ( sal_Int32 count = 0; it != it_end; ++it, ++count )
@@ -1459,8 +1459,8 @@ void ODatabaseDocument::impl_closeControllerFrames_nolck_throw( bool _bDeliverOw
 {
     Controllers aCopy = m_aControllers;
 
-    Controllers::iterator aEnd = aCopy.end();
-    for ( Controllers::iterator aIter = aCopy.begin(); aIter != aEnd ; ++aIter )
+    Controllers::const_iterator aEnd = aCopy.end();
+    for ( Controllers::const_iterator aIter = aCopy.begin(); aIter != aEnd ; ++aIter )
     {
         if ( !aIter->is() )
             continue;
@@ -2118,7 +2118,7 @@ uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHel
     }
     uno::Reference< frame::XUntitledNumbers > xNumberedControllers;
 
-    TNumberedController::iterator aFind = m_aNumberedControllers.find(sModuleId);
+    TNumberedController::const_iterator aFind = m_aNumberedControllers.find(sModuleId);
     if ( aFind == m_aNumberedControllers.end() )
     {
         uno::Reference< frame::XModel > xThis(static_cast< frame::XModel* >(this), uno::UNO_QUERY_THROW);
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 5b24d6d..9bd46bf 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -322,7 +322,7 @@ void SAL_CALL OSharedConnectionManager::disposing( const css::lang::EventObject&
 {
     MutexGuard aGuard(m_aMutex);
     Reference<XConnection> xConnection(Source.Source,UNO_QUERY);
-    TSharedConnectionMap::iterator aFind = m_aSharedConnection.find(xConnection);
+    TSharedConnectionMap::const_iterator aFind = m_aSharedConnection.find(xConnection);
     if ( m_aSharedConnection.end() != aFind )
     {
         osl_atomic_decrement(&aFind->second->second.nALiveCount);
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 8535b30..16cedbb 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -55,7 +55,7 @@ namespace dbaccess
 // ODefinitionContainer_Impl
 void ODefinitionContainer_Impl::erase( TContentPtr _pDefinition )
 {
-    NamedDefinitions::iterator aPos = find( _pDefinition );
+    NamedDefinitions::const_iterator aPos = find( _pDefinition );
     if ( aPos != end() )
         m_aDefinitions.erase( aPos );
 }
@@ -120,8 +120,8 @@ void SAL_CALL ODefinitionContainer::disposing()
     m_aContainerListeners.disposeAndClear(aEvt);
 
     // dispose our elements
-    Documents::iterator aIter = m_aDocumentMap.begin();
-    Documents::iterator aEnd = m_aDocumentMap.end();
+    Documents::const_iterator aIter = m_aDocumentMap.begin();
+    Documents::const_iterator aEnd = m_aDocumentMap.end();
 
     for (; aIter != aEnd; ++aIter)
     {
@@ -429,8 +429,8 @@ Sequence< OUString > SAL_CALL ODefinitionContainer::getElementNames(  ) throw(Ru
 
     Sequence< OUString > aNames(m_aDocumentMap.size());
     OUString* pNames = aNames.getArray();
-    Documents::iterator aEnd = m_aDocumentMap.end();
-    for (   Documents::iterator aNameIter = m_aDocumentMap.begin();
+    Documents::const_iterator aEnd = m_aDocumentMap.end();
+    for (   Documents::const_iterator aNameIter = m_aDocumentMap.begin();
             aNameIter != aEnd;
             ++pNames, ++aNameIter
         )
@@ -454,7 +454,7 @@ void SAL_CALL ODefinitionContainer::disposing( const EventObject& _rSource ) thr
     Reference< XContent > xSource(_rSource.Source, UNO_QUERY);
     // it's one of our documents ....
     Documents::iterator aIter = m_aDocumentMap.begin();
-    Documents::iterator aEnd = m_aDocumentMap.end();
+    Documents::const_iterator aEnd = m_aDocumentMap.end();
     for (;aIter != aEnd;++aIter )
     {
         if ( xSource == aIter->second.get() )
@@ -469,7 +469,7 @@ void SAL_CALL ODefinitionContainer::disposing( const EventObject& _rSource ) thr
 void ODefinitionContainer::implRemove(const OUString& _rName)
 {
     // from the object maps
-    Documents::iterator aFind = m_aDocumentMap.find(_rName);
+    Documents::const_iterator aFind = m_aDocumentMap.find(_rName);
     if ( aFind != m_aDocumentMap.end() )
     {
         m_aDocuments.erase( ::std::find(m_aDocuments.begin(),m_aDocuments.end(),aFind));
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 8a95b71..ad11290 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -671,8 +671,8 @@ void ODocumentContainer::getPropertyDefaultByHandle( sal_Int32 /*_nHandle*/, Any
 void SAL_CALL ODocumentContainer::commit(  ) throw (css::io::IOException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception)
 {
     MutexGuard aGuard(m_aMutex);
-    Documents::iterator aIter = m_aDocumentMap.begin();
-    Documents::iterator aEnd = m_aDocumentMap.end();
+    Documents::const_iterator aIter = m_aDocumentMap.begin();
+    Documents::const_iterator aEnd = m_aDocumentMap.end();
     for (; aIter != aEnd ; ++aIter)
     {
         Reference<XTransactedObject> xTrans(aIter->second.get(),UNO_QUERY);
@@ -687,8 +687,8 @@ void SAL_CALL ODocumentContainer::commit(  ) throw (css::io::IOException, css::l
 void SAL_CALL ODocumentContainer::revert(  ) throw (css::io::IOException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception)
 {
     MutexGuard aGuard(m_aMutex);
-    Documents::iterator aIter = m_aDocumentMap.begin();
-    Documents::iterator aEnd = m_aDocumentMap.end();
+    Documents::const_iterator aIter = m_aDocumentMap.begin();
+    Documents::const_iterator aEnd = m_aDocumentMap.end();
     for (; aIter != aEnd ; ++aIter)
     {
         Reference<XTransactedObject> xTrans(aIter->second.get(),UNO_QUERY);
diff --git a/dbaccess/source/core/dataaccess/documentevents.cxx b/dbaccess/source/core/dataaccess/documentevents.cxx
index 37d364d..161b6a2 100644
--- a/dbaccess/source/core/dataaccess/documentevents.cxx
+++ b/dbaccess/source/core/dataaccess/documentevents.cxx
@@ -114,7 +114,7 @@ namespace dbaccess
         while ( pEventData->pAsciiEventName )
         {
             OUString sEventName = OUString::createFromAscii( pEventData->pAsciiEventName );
-            DocumentEventsData::iterator existingPos = m_pData->rEventsData.find( sEventName );
+            DocumentEventsData::const_iterator existingPos = m_pData->rEventsData.find( sEventName );
             if ( existingPos == m_pData->rEventsData.end() )
                 m_pData->rEventsData[ sEventName ] = Sequence< PropertyValue >();
             ++pEventData;
diff --git a/dbaccess/source/core/misc/ContainerMediator.cxx b/dbaccess/source/core/misc/ContainerMediator.cxx
index 06cba6a..802b802 100644
--- a/dbaccess/source/core/misc/ContainerMediator.cxx
+++ b/dbaccess/source/core/misc/ContainerMediator.cxx
@@ -102,7 +102,7 @@ void SAL_CALL OContainerMediator::elementInserted( const ContainerEvent& _rEvent
     {
         OUString sElementName;
         _rEvent.Accessor >>= sElementName;
-        PropertyForwardList::iterator aFind = m_aForwardList.find(sElementName);
+        PropertyForwardList::const_iterator aFind = m_aForwardList.find(sElementName);
         if ( aFind != m_aForwardList.end() )
         {
             Reference< XPropertySet> xDest(_rEvent.Element,UNO_QUERY);
@@ -141,7 +141,7 @@ void SAL_CALL OContainerMediator::elementReplaced( const ContainerEvent& _rEvent
         OUString sElementName;
         _rEvent.ReplacedElement >>= sElementName;
 
-        PropertyForwardList::iterator aFind = m_aForwardList.find(sElementName);
+        PropertyForwardList::const_iterator aFind = m_aForwardList.find(sElementName);
         if ( aFind != m_aForwardList.end() )
         {
             OUString sNewName;
@@ -193,7 +193,7 @@ void OContainerMediator::notifyElementCreated( const OUString& _sName, const Ref
     if ( !m_xSettings.is() )
         return;
 
-    PropertyForwardList::iterator aFind = m_aForwardList.find( _sName );
+    PropertyForwardList::const_iterator aFind = m_aForwardList.find( _sName );
     if  (   aFind != m_aForwardList.end()
         &&  aFind->second->getDefinition().is()
         )
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index b0fd2dc..f1b5a55 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -662,7 +662,7 @@ void ODBExport::exportDataSourceSettings()
 
     SvXMLElementExport aElem(*this,XML_NAMESPACE_DB, XML_DATA_SOURCE_SETTINGS, true, true);
     ::std::vector< TypedPropertyValue >::iterator aIter = m_aDataSourceSettings.begin();
-    ::std::vector< TypedPropertyValue >::iterator aEnd = m_aDataSourceSettings.end();
+    ::std::vector< TypedPropertyValue >::const_iterator aEnd = m_aDataSourceSettings.end();
     for ( ; aIter != aEnd; ++aIter )
     {
         bool bIsSequence = TypeClass_SEQUENCE == aIter->Type.getTypeClass();
@@ -906,7 +906,7 @@ void ODBExport::exportStyleName(XPropertySet* _xProp,SvXMLAttributeList& _rAtt)
 
 void ODBExport::exportStyleName(const ::xmloff::token::XMLTokenEnum _eToken,const uno::Reference<beans::XPropertySet>& _xProp,SvXMLAttributeList& _rAtt,TPropertyStyleMap& _rMap)
 {
-    TPropertyStyleMap::iterator aFind = _rMap.find(_xProp);
+    TPropertyStyleMap::const_iterator aFind = _rMap.find(_xProp);
     if ( aFind != _rMap.end() )
     {
         _rAtt.AddAttribute( GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_DB, GetXMLToken(_eToken) ),
@@ -963,7 +963,7 @@ void ODBExport::exportColumns(const Reference<XColumnsSupplier>& _xColSup)
         if ( !xNameAccess->hasElements() )
         {
             Reference< XPropertySet > xComponent(_xColSup,UNO_QUERY);
-            TTableColumnMap::iterator aFind = m_aTableDummyColumns.find(xComponent);
+            TTableColumnMap::const_iterator aFind = m_aTableDummyColumns.find(xComponent);
             if ( aFind != m_aTableDummyColumns.end() )
             {
                 SvXMLElementExport aColumns(*this,XML_NAMESPACE_DB, XML_COLUMNS, true, true);
@@ -1183,7 +1183,7 @@ void ODBExport::exportAutoStyle(XPropertySet* _xProp)
             if ( !aPropStates.empty() )
             {
                 ::std::vector< XMLPropertyState >::iterator aItr = aPropStates.begin();
-                ::std::vector< XMLPropertyState >::iterator aEnd = aPropStates.end();
+                ::std::vector< XMLPropertyState >::const_iterator aEnd = aPropStates.end();
                 const rtl::Reference < XMLPropertySetMapper >& pStyle = pExportHelper[i].first->getPropertySetMapper();
                 while ( aItr != aEnd )
                 {
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 5763216..7a3de71 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1054,8 +1054,8 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
                         ::std::unique_ptr<SfxAbstractPasteDialog> pDlg(pFact->CreatePasteDialog( getView() ));
                         ::std::vector<SotClipboardFormatId> aFormatIds;
                         getSupportedFormats(getContainer()->getElementType(),aFormatIds);
-                        const ::std::vector<SotClipboardFormatId>::iterator aEnd = aFormatIds.end();
-                        for (::std::vector<SotClipboardFormatId>::iterator aIter = aFormatIds.begin();aIter != aEnd; ++aIter)
+                        const ::std::vector<SotClipboardFormatId>::const_iterator aEnd = aFormatIds.end();
+                        for (::std::vector<SotClipboardFormatId>::const_iterator aIter = aFormatIds.begin();aIter != aEnd; ++aIter)
                             pDlg->Insert(*aIter,"");
 
                         const TransferableDataHelper& rClipboard = getViewClipboard();
@@ -1703,7 +1703,7 @@ bool OApplicationController::onContainerSelect(ElementType _eType)
             getContainer()->getDetailView()->createPage(_eType,xContainer);
         }
 
-        SelectionByElementType::iterator pendingSelection = m_aPendingSelection.find( _eType );
+        SelectionByElementType::const_iterator pendingSelection = m_aPendingSelection.find( _eType );
         if ( pendingSelection != m_aPendingSelection.end() )
         {
             getContainer()->selectElements( comphelper::containerToSequence(pendingSelection->second) );
@@ -1998,7 +1998,7 @@ void OApplicationController::addContainerListener(const Reference<XNameAccess>&
         if ( xCont.is() )
         {
             // add as listener to get notified if elements are inserted or removed
-            TContainerVector::iterator aFind = ::std::find(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),xCont);
+            TContainerVector::const_iterator aFind = ::std::find(m_aCurrentContainers.begin(),m_aCurrentContainers.end(),xCont);
             if ( aFind == m_aCurrentContainers.end() )
             {
                 xCont->addContainerListener(this);
@@ -2850,7 +2850,6 @@ sal_Bool SAL_CALL OApplicationController::select( const Any& _aSelection ) throw
             }
         }
     }
-
     for (   SelectionByElementType::const_iterator sel = aSelectedElements.begin();
             sel != aSelectedElements.end();
             ++sel
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 151ad46..73991c6 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -207,7 +207,7 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
         ::std::set< OUString >::size_type nCount = aDeleteNames.size();
         for ( ::std::set< OUString >::size_type nObjectsLeft = nCount; !aDeleteNames.empty(); )
         {
-            ::std::set< OUString >::iterator  aThisRound = aDeleteNames.begin();
+            ::std::set< OUString >::const_iterator  aThisRound = aDeleteNames.begin();
 
             if ( eResult != svtools::QUERYDELETE_ALL )
             {
@@ -252,12 +252,12 @@ void OApplicationController::deleteObjects( ElementType _eType, const ::std::vec
                     OUStringBuffer sSmallestSiblingName( *aThisRound );
                     sSmallestSiblingName.append( (sal_Unicode)( '/' + 1) );
 
-                    ::std::set< OUString >::iterator aUpperChildrenBound = aDeleteNames.lower_bound( sSmallestSiblingName.makeStringAndClear() );
-                    for ( ::std::set< OUString >::iterator aObsolete = aThisRound;
+                    ::std::set< OUString >::const_iterator aUpperChildrenBound = aDeleteNames.lower_bound( sSmallestSiblingName.makeStringAndClear() );
+                    for ( ::std::set< OUString >::const_iterator aObsolete = aThisRound;
                           aObsolete != aUpperChildrenBound;
                         )
                     {
-                        ::std::set< OUString >::iterator aNextObsolete = aObsolete; ++aNextObsolete;
+                        ::std::set< OUString >::const_iterator aNextObsolete = aObsolete; ++aNextObsolete;
                         aDeleteNames.erase( aObsolete );
                         --nObjectsLeft;
                         aObsolete = aNextObsolete;
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx
index 19aed63..1b8d85f 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -704,8 +704,8 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
     }
 
     ::std::vector< ::std::pair< OUString ,Reference< XModel > > > aComponents;
-    ::std::vector< OUString>::iterator aEnd = aList.end();
-    for (::std::vector< OUString>::iterator aIter = aList.begin(); aIter != aEnd; ++aIter)
+    ::std::vector< OUString>::const_iterator aEnd = aList.end();
+    for (::std::vector< OUString>::const_iterator aIter = aList.begin(); aIter != aEnd; ++aIter)
     {
         if ( SID_DB_APP_CONVERTTOVIEW == _nId )
             convertToView(*aIter);
@@ -720,8 +720,8 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO
     if ( _eOpenMode == E_OPEN_FOR_MAIL )
     {
 
-        ::std::vector< ::std::pair< OUString ,Reference< XModel > > >::iterator componentIter = aComponents.begin();
-        ::std::vector< ::std::pair< OUString ,Reference< XModel > > >::iterator componentEnd = aComponents.end();
+        ::std::vector< ::std::pair< OUString ,Reference< XModel > > >::const_iterator componentIter = aComponents.begin();
+        ::std::vector< ::std::pair< OUString ,Reference< XModel > > >::const_iterator componentEnd = aComponents.end();
         OUString aDocTypeString;
         SfxMailModel aSendMail;
         SfxMailModel::SendMailResult eResult = SfxMailModel::SEND_MAIL_OK;
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 3a36c028..6d73785 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -729,7 +729,7 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane
     }
 
     // for the remaining entries, assign mnemonics
-    for (   TaskEntryList::iterator pTask = rList.begin();
+    for (   TaskEntryList::const_iterator pTask = rList.begin();
             pTask != rList.end();
             ++pTask
         )
diff --git a/dbaccess/source/ui/browser/formadapter.cxx b/dbaccess/source/ui/browser/formadapter.cxx
index 49a6a30..48bd33b 100644
--- a/dbaccess/source/ui/browser/formadapter.cxx
+++ b/dbaccess/source/ui/browser/formadapter.cxx
@@ -1086,7 +1086,7 @@ void SAL_CALL SbaXFormAdapter::dispose() throw( RuntimeException, std::exception
     m_aContainerListeners.disposeAndClear(aEvt);
 
     // dispose all children
-    for (   ::std::vector< Reference< css::form::XFormComponent > >::iterator aIter = m_aChildren.begin();
+    for (   ::std::vector< Reference< css::form::XFormComponent > >::const_iterator aIter = m_aChildren.begin();
             aIter != m_aChildren.end();
             ++aIter
         )
@@ -1428,7 +1428,7 @@ void SbaXFormAdapter::implInsert(const Any& aElement, sal_Int32 nIndex, const OU
 
 sal_Int32 SbaXFormAdapter::implGetPos(const OUString& rName)
 {
-    ::std::vector< OUString>::iterator aIter = ::std::find_if(   m_aChildNames.begin(),
+    ::std::vector< OUString>::const_iterator aIter = ::std::find_if(   m_aChildNames.begin(),
                                                                 m_aChildNames.end(),
                                                                 ::std::bind2nd(::std::equal_to< OUString>(),rName));
 
@@ -1631,7 +1631,7 @@ void SAL_CALL SbaXFormAdapter::propertyChange(const css::beans::PropertyChangeEv
 {
     if (evt.PropertyName == PROPERTY_NAME)
     {
-        ::std::vector<  css::uno::Reference< css::form::XFormComponent > >::iterator aIter = ::std::find_if(  m_aChildren.begin(),
+        ::std::vector<  css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = ::std::find_if(  m_aChildren.begin(),
                                                                 m_aChildren.end(),
                                                                 ::std::bind2nd(::std::equal_to< css::uno::Reference< css::uno::XInterface > >(),evt.Source));
 
@@ -1651,7 +1651,7 @@ void SAL_CALL SbaXFormAdapter::disposing(const css::lang::EventObject& Source) t
     if (Source.Source == m_xMainForm)
         dispose();
 
-    ::std::vector<  css::uno::Reference< css::form::XFormComponent > >::iterator aIter = ::std::find_if(  m_aChildren.begin(),
+    ::std::vector<  css::uno::Reference< css::form::XFormComponent > >::const_iterator aIter = ::std::find_if(  m_aChildren.begin(),
                                                                 m_aChildren.end(),
                                                                 ::std::bind2nd(::std::equal_to< css::uno::Reference< css::uno::XInterface > >(),Source.Source));
     if(aIter != m_aChildren.end())
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 1f47b9f..6439cd7 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -486,7 +486,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature,
         // m_arrStatusListener itself
         Dispatch aNotifyLoop( m_arrStatusListener );
         Dispatch::iterator iterSearch = aNotifyLoop.begin();
-        Dispatch::iterator iterEnd = aNotifyLoop.end();
+        Dispatch::const_iterator iterEnd = aNotifyLoop.end();
 
         while (iterSearch != iterEnd)
         {
@@ -504,7 +504,7 @@ void OGenericUnoController::ImplBroadcastFeatureState(const OUString& _rFeature,
 
 bool OGenericUnoController::isFeatureSupported( sal_Int32 _nId )
 {
-    SupportedFeatures::iterator aFeaturePos = ::std::find_if(
+    SupportedFeatures::const_iterator aFeaturePos = ::std::find_if(
         m_aSupportedFeatures.begin(),
         m_aSupportedFeatures.end(),
         ::std::bind2nd( CompareFeatureById(), _nId )
@@ -537,7 +537,7 @@ void OGenericUnoController::InvalidateFeature_Impl()
         }
         else
         {
-            SupportedFeatures::iterator aFeaturePos = ::std::find_if(
+            SupportedFeatures::const_iterator aFeaturePos = ::std::find_if(
                 m_aSupportedFeatures.begin(),
                 m_aSupportedFeatures.end(),
                 ::std::bind2nd( CompareFeatureById(), aNextFeature.nId )
@@ -574,7 +574,7 @@ void OGenericUnoController::ImplInvalidateFeature( sal_Int32 _nId, const Referen
 #if OSL_DEBUG_LEVEL > 0
     if ( _nId != -1 )
     {
-        SupportedFeatures::iterator aFeaturePos = ::std::find_if(
+        SupportedFeatures::const_iterator aFeaturePos = ::std::find_if(
             m_aSupportedFeatures.begin(),
             m_aSupportedFeatures.end(),
             ::std::bind2nd( CompareFeatureById(), _nId )
@@ -752,7 +752,7 @@ void OGenericUnoController::removeStatusListener(const Reference< XStatusListene
     SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find(_rURL.Complete);
     if (aIter != m_aSupportedFeatures.end())
     {   // clear the cache for that feature
-        StateCache::iterator aCachePos = m_aStateCache.find( aIter->second.nFeatureId );
+        StateCache::const_iterator aCachePos = m_aStateCache.find( aIter->second.nFeatureId );
         if ( aCachePos != m_aStateCache.end() )
             m_aStateCache.erase( aCachePos );
     }
@@ -786,8 +786,8 @@ void OGenericUnoController::disposing()
         EventObject aDisposeEvent;
         aDisposeEvent.Source = static_cast<XWeak*>(this);
         Dispatch aStatusListener = m_arrStatusListener;
-        Dispatch::iterator aEnd = aStatusListener.end();
-        for (Dispatch::iterator aIter = aStatusListener.begin(); aIter != aEnd; ++aIter)
+        Dispatch::const_iterator aEnd = aStatusListener.end();
+        for (Dispatch::const_iterator aIter = aStatusListener.begin(); aIter != aEnd; ++aIter)
         {
             aIter->xListener->disposing(aDisposeEvent);
         }
diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx
index 47be954..8edf4b2 100644
--- a/dbaccess/source/ui/browser/sbagrid.cxx
+++ b/dbaccess/source/ui/browser/sbagrid.cxx
@@ -203,7 +203,7 @@ void SAL_CALL SbaXGridControl::createPeer(const Reference< css::awt::XToolkit >
     // TODO: why the hell this whole class does not use any mutex?
 
         Reference< css::frame::XDispatch >  xDisp(getPeer(), UNO_QUERY);
-        for (   StatusMultiplexerArray::iterator aIter = m_aStatusMultiplexer.begin();
+        for (   StatusMultiplexerArray::const_iterator aIter = m_aStatusMultiplexer.begin();
                 aIter != m_aStatusMultiplexer.end();
                 ++aIter)
         {
@@ -452,7 +452,7 @@ void SAL_CALL SbaXGridPeer::dispatch(const URL& aURL, const Sequence< PropertyVa
     if ( dtUnknown != eURLType )
     {
         // notify any status listeners that the dialog is now active (well, about to be active)
-        MapDispatchToBool::iterator aThisURLState = m_aDispatchStates.insert( MapDispatchToBool::value_type( eURLType, sal_True ) ).first;
+        MapDispatchToBool::const_iterator aThisURLState = m_aDispatchStates.insert( MapDispatchToBool::value_type( eURLType, sal_True ) ).first;
         NotifyStatusChanged( aURL, nullptr );
 
         // execute the dialog
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 5dc64f8..b5000d0 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1361,11 +1361,11 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const css::lang::EventObject& _rS
         Reference< XDispatch > xSource(_rSource.Source, UNO_QUERY);
         if(xSource.is())
         {
-            ExternalFeaturesMap::iterator aLoop = m_aExternalFeatures.begin();
-            ExternalFeaturesMap::iterator aEnd = m_aExternalFeatures.end();
+            ExternalFeaturesMap::const_iterator aLoop = m_aExternalFeatures.begin();
+            ExternalFeaturesMap::const_iterator aEnd = m_aExternalFeatures.end();
             while (aLoop != aEnd)
             {
-                ExternalFeaturesMap::iterator aI = aLoop++;
+                ExternalFeaturesMap::const_iterator aI = aLoop++;
                 if ( aI->second.xDispatcher.get() == xSource.get() )
                 {
                     sal_uInt16 nSlot = aI->first;
@@ -3762,10 +3762,10 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo
             "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: inconsistence (2)!");
 
     // delete any user data of the child entries of the to-be-removed entry
-    std::pair<SvTreeListEntries::iterator, SvTreeListEntries::iterator> aIters =
+    std::pair<SvTreeListEntries::const_iterator, SvTreeListEntries::const_iterator> aIters =
         m_pTreeModel->GetChildIterators(pDataSourceEntry);
 
-    SvTreeListEntries::iterator it = aIters.first, itEnd = aIters.second;
+    SvTreeListEntries::const_iterator it = aIters.first, itEnd = aIters.second;
 
     for (; it != itEnd; ++it)
     {
diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx
index a6d5c27..eef6891 100644
--- a/dbaccess/source/ui/control/RelationControl.cxx
+++ b/dbaccess/source/ui/control/RelationControl.cxx
@@ -612,7 +612,7 @@ namespace dbaui
         }
         m_pParentDialog->setValid(bValid);
 
-        ORelationControl::ops_type::iterator i (m_pRC_Tables->m_ops.begin());
+        ORelationControl::ops_type::const_iterator i (m_pRC_Tables->m_ops.begin());
         const ORelationControl::ops_type::const_iterator e (m_pRC_Tables->m_ops.end());
         m_pRC_Tables->DeactivateCell();
         for(; i != e; ++i)
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index 2aa4a9b..c650843 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -96,11 +96,11 @@ void DBTreeListBox::dispose()
 SvTreeListEntry* DBTreeListBox::GetEntryPosByName( const OUString& aName, SvTreeListEntry* pStart, const IEntryFilter* _pFilter ) const
 {
     SvTreeList* myModel = GetModel();
-    std::pair<SvTreeListEntries::iterator,SvTreeListEntries::iterator> aIters =
+    std::pair<SvTreeListEntries::const_iterator,SvTreeListEntries::const_iterator> aIters =
         myModel->GetChildIterators(pStart);
 
     SvTreeListEntry* pEntry = nullptr;
-    SvTreeListEntries::iterator it = aIters.first, itEnd = aIters.second;
+    SvTreeListEntries::const_iterator it = aIters.first, itEnd = aIters.second;
     for (; it != itEnd; ++it)
     {
         pEntry = (*it).get();
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index b2b0dd9..ddf9254 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -126,8 +126,8 @@ namespace dbaui
             m_aStates.insert(TCommandState::value_type(OUString(".uno:DBRebuildData")   ,sal_True));
         }
 
-        TCommandState::iterator aIter = m_aStates.begin();
-        TCommandState::iterator aEnd = m_aStates.end();
+        TCommandState::const_iterator aIter = m_aStates.begin();
+        TCommandState::const_iterator aEnd = m_aStates.end();
         for (; aIter != aEnd; ++aIter)
             addStatusListener(aIter->first);
 
@@ -203,7 +203,7 @@ namespace dbaui
 
                     Image aImage(aImages[0]);
                     pMenu->SetItemImage(nItemId,aImage);
-                    TCommandState::iterator aFind = m_aStates.find( aSeq[0] );
+                    TCommandState::const_iterator aFind = m_aStates.find( aSeq[0] );
                     if ( aFind != m_aStates.end() )
                     {
                         pMenu->EnableItem(nItemId,aFind->second);
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 380e4a3..fa86cea1 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -621,7 +621,7 @@ namespace dbaui
             Sequence< Any > aNewDirectoryAttributes(1);
 
             // loop
-            for (   ::std::vector< OUString >::reverse_iterator aLocalName = aToBeCreated.rbegin();
+            for (   ::std::vector< OUString >::const_reverse_iterator aLocalName = aToBeCreated.rbegin();
                     aLocalName != aToBeCreated.rend();
                     ++aLocalName
                 )
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 7d9a004..22ca33f 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -715,8 +715,8 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
     // collect the translated property values for the relevant items
     PropertyValueSet aRelevantSettings;
     MapInt2String::const_iterator aTranslation;
-    ::std::vector< sal_Int32>::iterator aDetailsEnd = aDetailIds.end();
-    for (::std::vector< sal_Int32>::iterator aIter = aDetailIds.begin();aIter != aDetailsEnd ; ++aIter)
+    ::std::vector< sal_Int32>::const_iterator aDetailsEnd = aDetailIds.end();
+    for (::std::vector< sal_Int32>::const_iterator aIter = aDetailIds.begin();aIter != aDetailsEnd ; ++aIter)
     {
         const SfxPoolItem* pCurrent = _rSource.GetItem((sal_uInt16)*aIter);
         aTranslation = m_aIndirectPropTranslator.find(*aIter);
@@ -746,7 +746,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
     for (sal_Int32 i = 0; i < nCount; ++i, ++pInfo)
     {
         aSearchFor.Name = pInfo->Name;
-        PropertyValueSet::iterator aOverwrittenSetting = aRelevantSettings.find(aSearchFor);
+        PropertyValueSet::const_iterator aOverwrittenSetting = aRelevantSettings.find(aSearchFor);
         if (aRelevantSettings.end() != aOverwrittenSetting)
         {   // the setting was present in the original sequence, and it is to be overwritten -> replace it
             if ( pInfo->Value != aOverwrittenSetting->Value )
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 8050cc8..56a63f7 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -290,8 +290,8 @@ namespace dbaui
         Image aPKeyIcon(ModuleRes( IMG_PKEYICON ));
         // fill the list with the index names
         m_pIndexList->Clear();
-        Indexes::iterator aIndexLoop = m_pIndexes->begin();
-        Indexes::iterator aEnd = m_pIndexes->end();
+        Indexes::const_iterator aIndexLoop = m_pIndexes->begin();
+        Indexes::const_iterator aEnd = m_pIndexes->end();
         for (; aIndexLoop != aEnd; ++aIndexLoop)
         {
             SvTreeListEntry* pNewEntry = nullptr;
@@ -395,7 +395,7 @@ namespace dbaui
         // they're iterators of the index collection, and thus they have changed when removing the index
         for (SvTreeListEntry* pAdjust = m_pIndexList->First(); pAdjust; pAdjust = m_pIndexList->Next(pAdjust))
         {
-            Indexes::iterator aAfterInsertPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust));
+            Indexes::const_iterator aAfterInsertPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust));
             OSL_ENSURE(aAfterInsertPos != m_pIndexes->end(), "DbaIndexDialog::OnNewIndex: problems with on of the entries!");
             pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterInsertPos - m_pIndexes->begin())));
         }
@@ -465,7 +465,7 @@ namespace dbaui
             // they're iterators of the index collection, and thus they have changed when removing the index
             for (SvTreeListEntry* pAdjust = m_pIndexList->First(); pAdjust; pAdjust = m_pIndexList->Next(pAdjust))
             {
-                Indexes::iterator aAfterDropPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust));
+                Indexes::const_iterator aAfterDropPos = m_pIndexes->find(m_pIndexList->GetEntryText(pAdjust));
                 OSL_ENSURE(aAfterDropPos != m_pIndexes->end(), "DbaIndexDialog::OnDropIndex: problems with on of the remaining entries!");
                 pAdjust->SetUserData(reinterpret_cast< void* >(sal_Int32(aAfterDropPos - m_pIndexes->begin())));
             }
@@ -717,7 +717,7 @@ namespace dbaui
     {
         if (m_pPreviousSelection)
         {
-            Indexes::iterator aPreviouslySelected = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData());
+            Indexes::const_iterator aPreviouslySelected = m_pIndexes->begin() + reinterpret_cast<sal_IntPtr>(m_pPreviousSelection->GetUserData());
 
             if (!implSaveModified())
                 return false;
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
index d66e76d..3182823 100644
--- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
+++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx
@@ -171,7 +171,7 @@ namespace dbaui
         IndexFields::const_iterator aSource = m_aFields.begin();
         IndexFields::const_iterator aSourceEnd = m_aFields.end();
         IndexFields::iterator aDest = _rFields.begin();
-        for (; aSource < aSourceEnd; ++aSource)
+        for (; aSource != aSourceEnd; ++aSource)
             if (!aSource->sFieldName.isEmpty())
             {
                 *aDest = *aSource;
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index d531422..2be4934 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -285,8 +285,8 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection,
 ODatabaseExport::~ODatabaseExport()
 {
     m_pFormatter = nullptr;
-    ODatabaseExport::TColumns::iterator aIter = m_aDestColumns.begin();
-    ODatabaseExport::TColumns::iterator aEnd  = m_aDestColumns.end();
+    ODatabaseExport::TColumns::const_iterator aIter = m_aDestColumns.begin();
+    ODatabaseExport::TColumns::const_iterator aEnd  = m_aDestColumns.end();
 
     for(;aIter != aEnd;++aIter)
         delete aIter->second;
@@ -664,7 +664,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
     pField->SetPrimaryKey(false);
     pField->SetCurrency(false);
 
-    TColumns::iterator aFind = m_aDestColumns.find( aAlias );
+    TColumns::const_iterator aFind = m_aDestColumns.find( aAlias );
     if ( aFind != m_aDestColumns.end() )
     {
         delete aFind->second;
@@ -844,8 +844,8 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
 
     i = 1;
     // create the sql string
-    ::std::vector< OUString>::iterator aInsertEnd = aInsertList.end();
-    for (::std::vector< OUString>::iterator aInsertIter = aInsertList.begin(); aInsertIter != aInsertEnd; ++aInsertIter)
+    ::std::vector< OUString>::const_iterator aInsertEnd = aInsertList.end();
+    for (::std::vector< OUString>::const_iterator aInsertIter = aInsertList.begin(); aInsertIter != aInsertEnd; ++aInsertIter)
     {
         if ( !aInsertIter->isEmpty() )
         {
diff --git a/dbaccess/source/ui/misc/RowSetDrop.cxx b/dbaccess/source/ui/misc/RowSetDrop.cxx
index 63ba674..b2aac31 100644
--- a/dbaccess/source/ui/misc/RowSetDrop.cxx
+++ b/dbaccess/source/ui/misc/RowSetDrop.cxx
@@ -157,8 +157,8 @@ bool ORowSetImportExport::insertNewRow()
     {
         m_xTargetResultSetUpdate->moveToInsertRow();
         sal_Int32 i = 1;
-        ::std::vector<sal_Int32>::iterator aEnd = m_aColumnMapping.end();
-        for (::std::vector<sal_Int32>::iterator aIter = m_aColumnMapping.begin(); aIter != aEnd ;++aIter,++i )
+        ::std::vector<sal_Int32>::const_iterator aEnd = m_aColumnMapping.end();
+        for (::std::vector<sal_Int32>::const_iterator aIter = m_aColumnMapping.begin(); aIter != aEnd ;++aIter,++i )
         {
             if(*aIter > 0)
             {
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index fecce2b..7d62280 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -634,7 +634,7 @@ void fillTypeInfo(  const Reference< css::sdbc::XConnection>& _rxConnection,
         _rTypeInfoIters.reserve(_rTypeInfoMap.size());
 
         OTypeInfoMap::iterator aIter = _rTypeInfoMap.begin();
-        OTypeInfoMap::iterator aEnd = _rTypeInfoMap.end();
+        OTypeInfoMap::const_iterator aEnd = _rTypeInfoMap.end();
         for(;aIter != aEnd;++aIter)
             _rTypeInfoIters.push_back(aIter);
 
diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx
index 80a8c05..c0aa281 100644
--- a/dbaccess/source/ui/misc/WColumnSelect.cxx
+++ b/dbaccess/source/ui/misc/WColumnSelect.cxx
@@ -335,7 +335,7 @@ void OWizColumnSelect::moveColumn(  ListBox* _pRight,
     else
     {
         // find the new column in the dest name mapping to obtain the old column
-        OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
+        OCopyTableWizard::TNameMapping::const_iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
             [&_aCase, &_sColumnName] (const OCopyTableWizard::TNameMapping::value_type& nameMap) {
                 return _aCase(nameMap.second, _sColumnName);
             });
@@ -384,7 +384,7 @@ sal_Int32 OWizColumnSelect::adjustColumnPosition( ListBox* _pLeft,
         if(_sColumnName != sColumnString)
         {
             // find the new column in the dest name mapping to obtain the old column
-            OCopyTableWizard::TNameMapping::iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
+            OCopyTableWizard::TNameMapping::const_iterator aIter = ::std::find_if(m_pParent->m_mNameMapping.begin(),m_pParent->m_mNameMapping.end(),
                 [&_aCase, &sColumnString] (const OCopyTableWizard::TNameMapping::value_type& nameMap) {
                     return _aCase(nameMap.second, sColumnString);
                 });
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 79f34ca..bfcdf21 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -82,8 +82,8 @@ namespace
 {
     void clearColumns(ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColumnsVec)
     {
-        ODatabaseExport::TColumns::iterator aIter = _rColumns.begin();
-        ODatabaseExport::TColumns::iterator aEnd  = _rColumns.end();
+        ODatabaseExport::TColumns::const_iterator aIter = _rColumns.begin();
+        ODatabaseExport::TColumns::const_iterator aEnd  = _rColumns.end();
 
         for(;aIter != aEnd;++aIter)
             delete aIter->second;
@@ -791,7 +791,7 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos)
             ODatabaseExport::TColumnVector::const_iterator aSrcEnd = m_vSourceVec.end();
             for(;aSrcIter != aSrcEnd;++aSrcIter)
             {
-                ODatabaseExport::TColumns::iterator aDestIter = m_vDestColumns.find(m_mNameMapping[(*aSrcIter)->first]);
+                ODatabaseExport::TColumns::const_iterator aDestIter = m_vDestColumns.find(m_mNameMapping[(*aSrcIter)->first]);
 
                 if ( aDestIter != m_vDestColumns.end() )
                 {
@@ -873,7 +873,7 @@ IMPL_LINK_NOARG_TYPED(OCopyTableWizard, ImplOKHdl, Button*, void)
                 {
                     if ( supportsPrimaryKey() )
                     {
-                        ODatabaseExport::TColumns::iterator aFind = ::std::find_if(m_vDestColumns.begin(),m_vDestColumns.end(),
+                        ODatabaseExport::TColumns::const_iterator aFind = ::std::find_if(m_vDestColumns.begin(),m_vDestColumns.end(),
                             [] (const ODatabaseExport::TColumns::value_type& tCol) { return tCol.second->IsPrimaryKey(); });
                         if ( aFind == m_vDestColumns.end() && m_xInteractionHandler.is() )
                         {
@@ -999,7 +999,7 @@ void OCopyTableWizard::insertColumn(sal_Int32 _nPos,OFieldDescription* _pField)
     OSL_ENSURE(_pField,"FieldDescrioption is null!");
     if ( _pField )
     {
-        ODatabaseExport::TColumns::iterator aFind = m_vDestColumns.find(_pField->GetName());
+        ODatabaseExport::TColumns::const_iterator aFind = m_vDestColumns.find(_pField->GetName());
         if ( aFind != m_vDestColumns.end() )
         {
             delete aFind->second;
@@ -1032,8 +1032,8 @@ void OCopyTableWizard::impl_loadSourceData()
 
 void OCopyTableWizard::loadData(  const ICopyTableSourceObject& _rSourceObject, ODatabaseExport::TColumns& _rColumns, ODatabaseExport::TColumnVector& _rColVector )
 {
-    ODatabaseExport::TColumns::iterator colEnd = _rColumns.end();
-    for ( ODatabaseExport::TColumns::iterator col = _rColumns.begin(); col != colEnd; ++col )
+    ODatabaseExport::TColumns::const_iterator colEnd = _rColumns.end();
+    for ( ODatabaseExport::TColumns::const_iterator col = _rColumns.begin(); col != colEnd; ++col )
         delete col->second;
 
     _rColVector.clear();
@@ -1080,7 +1080,7 @@ void OCopyTableWizard::loadData(  const ICopyTableSourceObject& _rSourceObject,
 
     for( ; pKeyColName != pKeyColEnd; ++pKeyColName )
     {
-        ODatabaseExport::TColumns::iterator keyPos = _rColumns.find( *pKeyColName );
+        ODatabaseExport::TColumns::const_iterator keyPos = _rColumns.find( *pKeyColName );
         if ( keyPos != _rColumns.end() )
         {
             keyPos->second->SetPrimaryKey( true );
diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx
index 96fdd65..4b85643 100644
--- a/dbaccess/source/ui/misc/WTypeSelect.cxx
+++ b/dbaccess/source/ui/misc/WTypeSelect.cxx
@@ -153,7 +153,7 @@ void OWizTypeSelectControl::CellModified(long nRow, sal_uInt16 nColId )
 
                 // now we change the name
                 OCopyTableWizard::TNameMapping::iterator aIter = pWiz->m_mNameMapping.begin();
-                OCopyTableWizard::TNameMapping::iterator aEnd  = pWiz->m_mNameMapping.end();
+                OCopyTableWizard::TNameMapping::const_iterator aEnd  = pWiz->m_mNameMapping.end();
 
                 ::comphelper::UStringMixEqual aCase(bCase);
                 for(;aIter != aEnd;++aIter)
diff --git a/dbaccess/source/ui/misc/indexcollection.cxx b/dbaccess/source/ui/misc/indexcollection.cxx
index 5049e2a..c7a07ac 100644
--- a/dbaccess/source/ui/misc/indexcollection.cxx
+++ b/dbaccess/source/ui/misc/indexcollection.cxx
@@ -85,7 +85,7 @@ namespace dbaui
 
         // loop'n'compare
         Indexes::iterator aSearch = m_aIndexes.begin();
-        Indexes::iterator aEnd = m_aIndexes.end();
+        Indexes::const_iterator aEnd = m_aIndexes.end();
         for (; aSearch != aEnd; ++aSearch)
             if (aSearch->sName == sNameCompare)
                 break;
@@ -113,7 +113,7 @@ namespace dbaui
 
         // loop'n'compare
         Indexes::iterator aSearch = m_aIndexes.begin();
-        Indexes::iterator aEnd = m_aIndexes.end();
+        Indexes::const_iterator aEnd = m_aIndexes.end();
         for (; aSearch != aEnd; ++aSearch)
             if (aSearch->getOriginalName() == sNameCompare)
                 break;
diff --git a/dbaccess/source/ui/querydesign/JAccess.cxx b/dbaccess/source/ui/querydesign/JAccess.cxx
index 30351dd..6ad8eb0 100644
--- a/dbaccess/source/ui/querydesign/JAccess.cxx
+++ b/dbaccess/source/ui/querydesign/JAccess.cxx
@@ -71,7 +71,7 @@ namespace dbaui
             sal_Int32 nTableWindowCount = m_pTableView->GetTabWinCount();
             if( i < nTableWindowCount )
             {
-                OJoinTableView::OTableWindowMap::iterator aIter = m_pTableView->GetTabWinMap().begin();
+                OJoinTableView::OTableWindowMap::const_iterator aIter = m_pTableView->GetTabWinMap().begin();
                 for (sal_Int32 j=i; j; ++aIter,--j)
                     ;
                 aRet = aIter->second->GetAccessible();
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index 5fd3147..c1dd52e 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -298,8 +298,8 @@ void OJoinController::SaveTabWinsPosSize( OJoinTableView::OTableWindowMap* pTabW
     OSL_ENSURE(m_vTableData.size() == pTabWinList->size(),
         "OJoinController::SaveTabWinsPosSize : inkonsistenter Zustand : sollte genausviel TabWinDatas haben wie TabWins !");
 
-    OJoinTableView::OTableWindowMap::iterator aIter = pTabWinList->begin();
-    OJoinTableView::OTableWindowMap::iterator aEnd = pTabWinList->end();
+    OJoinTableView::OTableWindowMap::const_iterator aIter = pTabWinList->begin();
+    OJoinTableView::OTableWindowMap::const_iterator aEnd = pTabWinList->end();
     for(;aIter != aEnd;++aIter)
         SaveTabWinPosSize(aIter->second, nOffsetX, nOffsetY);
 }
diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx
index cd7520c..8b2bd21 100644
--- a/dbaccess/source/ui/querydesign/JoinTableView.cxx
+++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx
@@ -227,8 +227,8 @@ void OJoinTableView::Resize()
         // all ok
         return;
 
-    OTableWindowMap::iterator aIter = m_aTableMap.begin();
-    OTableWindowMap::iterator aEnd = m_aTableMap.end();
+    OTableWindowMap::const_iterator aIter = m_aTableMap.begin();
+    OTableWindowMap::const_iterator aEnd = m_aTableMap.end();
     for(;aIter != aEnd;++aIter)
     {
         OTableWindow* pCurrent = aIter->second;
@@ -271,7 +271,7 @@ bool OJoinTableView::RemoveConnection( OTableConnection* _pConn, bool _bDelete )
 
 OTableWindow* OJoinTableView::GetTabWindow( const OUString& rName )
 {
-    OTableWindowMap::iterator aIter = m_aTableMap.find(rName);
+    OTableWindowMap::const_iterator aIter = m_aTableMap.find(rName);
 
     return aIter == m_aTableMap.end() ? nullptr : aIter->second;
 }
@@ -538,8 +538,8 @@ void OJoinTableView::SetDefaultTabWinPosSize( OTableWindow* pTabWin )
         aRowRect.Bottom() = (nRow+1) * ( TABWIN_SPACING_Y + TABWIN_HEIGHT_STD );
 
         // check occupied areas of this line
-        OTableWindowMap::iterator aIter = m_aTableMap.begin();
-        OTableWindowMap::iterator aEnd = m_aTableMap.end();
+        OTableWindowMap::const_iterator aIter = m_aTableMap.begin();
+        OTableWindowMap::const_iterator aEnd = m_aTableMap.end();
         for(;aIter != aEnd;++aIter)
         {
             OTableWindow* pOtherTabWin = aIter->second;
@@ -702,8 +702,8 @@ bool OJoinTableView::ScrollPane( long nDelta, bool bHoriz, bool bPaintScrollBars
     OTableWindow* pTabWin;
     Point aPos;
 
-    OTableWindowMap::iterator aIter = m_aTableMap.begin();
-    OTableWindowMap::iterator aEnd = m_aTableMap.end();
+    OTableWindowMap::const_iterator aIter = m_aTableMap.begin();
+    OTableWindowMap::const_iterator aEnd = m_aTableMap.end();
     for(;aIter != aEnd;++aIter)
     {
         pTabWin = aIter->second;
@@ -1286,8 +1286,8 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt)
 
                         bool bForward = !pKeyEvent->GetKeyCode().IsShift();
                         // is there an active tab win ?
-                        OTableWindowMap::iterator aIter = m_aTableMap.begin();
-                        OTableWindowMap::iterator aEnd = m_aTableMap.end();
+                        OTableWindowMap::const_iterator aIter = m_aTableMap.begin();
+                        OTableWindowMap::const_iterator aEnd = m_aTableMap.end();
                         for(;aIter != aEnd;++aIter)
                             if (aIter->second && aIter->second->HasChildPathFocus())
                                 break;
@@ -1419,8 +1419,8 @@ bool OJoinTableView::PreNotify(NotifyEvent& rNEvt)
 
                 if (pSearchFor)
                 {
-                    OTableWindowMap::iterator aIter = m_aTableMap.begin();
-                    OTableWindowMap::iterator aEnd = m_aTableMap.end();
+                    OTableWindowMap::const_iterator aIter = m_aTableMap.begin();
+                    OTableWindowMap::const_iterator aEnd = m_aTableMap.end();
                     for(;aIter != aEnd;++aIter)
                     {
                         if (aIter->second == pSearchFor)
@@ -1475,8 +1475,8 @@ void OJoinTableView::StateChanged( StateChangedType nType )
             aFont.Merge( GetControlFont() );
         SetZoomedPointFont(*this, aFont);
 
-        OTableWindowMap::iterator aIter = m_aTableMap.begin();
-        OTableWindowMap::iterator aEnd = m_aTableMap.end();
+        OTableWindowMap::const_iterator aIter = m_aTableMap.begin();
+        OTableWindowMap::const_iterator aEnd = m_aTableMap.end();
         for(;aIter != aEnd;++aIter)
         {
             aIter->second->SetZoom(GetZoom());
@@ -1495,8 +1495,8 @@ void OJoinTableView::HideTabWins()
 
     // working on a copy because the real list will be cleared in inner calls
     OTableWindowMap aCopy(rTabWins);
-    OTableWindowMap::iterator aIter = aCopy.begin();
-    OTableWindowMap::iterator aEnd = aCopy.end();
+    OTableWindowMap::const_iterator aIter = aCopy.begin();
+    OTableWindowMap::const_iterator aEnd = aCopy.end();
     for(;aIter != aEnd;++aIter)
         RemoveTabWin(aIter->second);
 
@@ -1526,7 +1526,7 @@ void OJoinTableView::clearLayoutInformation()
     m_pSelectedConn     = nullptr;
     // delete lists
     OTableWindowMap::iterator aIter = m_aTableMap.begin();
-    OTableWindowMap::iterator aEnd  = m_aTableMap.end();
+    OTableWindowMap::const_iterator aEnd  = m_aTableMap.end();
     for(;aIter != aEnd;++aIter)
     {
         if ( aIter->second )
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 74ad498..0e7271f 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1045,8 +1045,8 @@ namespace
             }
 
             const bool bUseEscape = ::dbtools::getBooleanDataSourceSetting( _xConnection, PROPERTY_OUTERJOINESCAPE );
-            ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aRIter = aMulti.rbegin();
-            ::std::multimap<sal_Int32 , OTableWindow*>::reverse_iterator aREnd = aMulti.rend();
+            ::std::multimap<sal_Int32 , OTableWindow*>::const_reverse_iterator aRIter = aMulti.rbegin();
+            ::std::multimap<sal_Int32 , OTableWindow*>::const_reverse_iterator aREnd = aMulti.rend();
             for(;aRIter != aREnd;++aRIter)
             {
                 auto aConIter = aRIter->second->getTableView()->getTableConnections(aRIter->second);
@@ -1908,7 +1908,7 @@ namespace
         // now we have to insert the fields which aren't in the statement
         OQueryController& rController = static_cast<OQueryController&>(_pView->getController());
         OTableFields& rUnUsedFields = rController.getUnUsedFields();
-        OTableFields::iterator aEnd = rUnUsedFields.end();
+        OTableFields::const_iterator aEnd = rUnUsedFields.end();
         for(OTableFields::iterator aIter = rUnUsedFields.begin();aIter != aEnd;++aIter)
             if(_pSelectionBrw->InsertField(*aIter,BROWSER_INVALIDID,false,false).is())
                 (*aIter) = nullptr;
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 0fa5f28..cbbbeeb9 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -232,7 +232,7 @@ sal_Int32 OQueryTableView::CountTableAlias(const OUString& rName, sal_Int32& rMa
 {
     sal_Int32 nRet = 0;
 
-    OTableWindowMap::iterator aIter = GetTabWinMap().find(rName);
+    OTableWindowMap::const_iterator aIter = GetTabWinMap().find(rName);
     while(aIter != GetTabWinMap().end())
     {
         OUString aNewName = rName + "_" + OUString::number(++nRet);
@@ -253,7 +253,7 @@ void OQueryTableView::ReSync()
     // I need a collection of all window names that cannot be created so that I do not initialize connections for them.
     ::std::vector<OUString> arrInvalidTables;
 
-    TTableWindowData::reverse_iterator aIter = rTabWinDataList.rbegin();
+    TTableWindowData::const_reverse_iterator aIter = rTabWinDataList.rbegin();
     // Create the window and add it
 
     for(;aIter != rTabWinDataList.rend();++aIter)
@@ -286,7 +286,7 @@ void OQueryTableView::ReSync()
 
     // Add the connections
     TTableConnectionData& rTabConnDataList = m_pView->getController().getTableConnectionData();
-    TTableConnectionData::reverse_iterator aConIter = rTabConnDataList.rbegin();
+    TTableConnectionData::const_reverse_iterator aConIter = rTabConnDataList.rbegin();
 
     for(;aConIter != rTabConnDataList.rend();++aConIter)
     {
@@ -442,8 +442,8 @@ void OQueryTableView::AddTabWin(const OUString& _rComposedName, const OUString&
     bool bAppend = bNewTable;
     TTableWindowData::value_type pNewTabWinData;
     TTableWindowData& rWindowData = getDesignView()->getController().getTableWindowData();
-    TTableWindowData::iterator aWinIter = rWindowData.begin();
-    TTableWindowData::iterator aWinEnd = rWindowData.end();
+    TTableWindowData::const_iterator aWinIter = rWindowData.begin();
+    TTableWindowData::const_iterator aWinEnd = rWindowData.end();
     for(;aWinIter != aWinEnd;++aWinIter)
     {
         pNewTabWinData = *aWinIter;
@@ -720,8 +720,8 @@ bool OQueryTableView::ContainsTabWin(const OTableWindow& rTabWin)
 {
     OTableWindowMap& rTabWins = GetTabWinMap();
 
-    OTableWindowMap::iterator aIter = rTabWins.begin();
-    OTableWindowMap::iterator aEnd  = rTabWins.end();
+    OTableWindowMap::const_iterator aIter = rTabWins.begin();
+    OTableWindowMap::const_iterator aEnd  = rTabWins.end();
 
     for ( ;aIter != aEnd ; ++aIter )
     {
@@ -798,8 +798,8 @@ void OQueryTableView::HideTabWin( OQueryTableWindow* pTabWin, OQueryTabWinUndoAc
     getDesignView()->SaveTabWinUIConfig(pTabWin);
     // (I need to go via the parent, as only the parent knows the position of the scrollbars)
     // and then out of the TabWins list and hide
-    OTableWindowMap::iterator aIter = rTabWins.begin();
-    OTableWindowMap::iterator aEnd  = rTabWins.end();
+    OTableWindowMap::const_iterator aIter = rTabWins.begin();
+    OTableWindowMap::const_iterator aEnd  = rTabWins.end();
     for ( ;aIter != aEnd ; ++aIter )
         if ( aIter->second == pTabWin )
         {
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
index 37be853..b548783 100644
--- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
+++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx
@@ -295,8 +295,8 @@ void OSelectionBrowseBox::ColumnMoved( sal_uInt16 nColId, bool _bCreateUndo )
     if ( rFields.size() > sal_uInt16(nNewPos-1) )
     {
         sal_uInt16 nOldPos = 0;
-        OTableFields::iterator aEnd = rFields.end();
-        OTableFields::iterator aIter = rFields.begin();
+        OTableFields::const_iterator aEnd = rFields.end();
+        OTableFields::const_iterator aIter = rFields.begin();
         for (; aIter != aEnd && ( (*aIter)->GetColumnId() != nColId ); ++aIter,++nOldPos)
             ;
 
@@ -395,7 +395,7 @@ void OSelectionBrowseBox::ClearAll()
 {
     SetUpdateMode(false);
 
-    OTableFields::reverse_iterator aIter = getFields().rbegin();
+    OTableFields::const_reverse_iterator aIter = getFields().rbegin();
     for ( ;aIter != getFields().rend(); ++aIter )
     {
         if ( !(*aIter)->IsEmpty() )
@@ -493,8 +493,8 @@ void OSelectionBrowseBox::InitController(CellControllerRef& /*rController*/, lon
             if ( !pEntry->isCondition() )
             {
                 OJoinTableView::OTableWindowMap& rTabWinList = getDesignView()->getTableView()->GetTabWinMap();
-                OJoinTableView::OTableWindowMap::iterator aIter = rTabWinList.begin();
-                OJoinTableView::OTableWindowMap::iterator aEnd = rTabWinList.end();
+                OJoinTableView::OTableWindowMap::const_iterator aIter = rTabWinList.begin();
+                OJoinTableView::OTableWindowMap::const_iterator aEnd = rTabWinList.end();
 
                 for(;aIter != aEnd;++aIter)
                     m_pTableCell->InsertEntry(static_cast<OQueryTableWindow*>(aIter->second.get())->GetAliasName());
@@ -988,7 +988,7 @@ bool OSelectionBrowseBox::SaveModified()
                     pEntry->SetAlias(aAliasName);
                     // we have to set the table name as well as the table window
                     OJoinTableView::OTableWindowMap& rTabWinList = getDesignView()->getTableView()->GetTabWinMap();
-                    OJoinTableView::OTableWindowMap::iterator aIter = rTabWinList.find(aAliasName);
+                    OJoinTableView::OTableWindowMap::const_iterator aIter = rTabWinList.find(aAliasName);
                     if(aIter != rTabWinList.end())
                     {
                         OQueryTableWindow* pEntryTab = static_cast<OQueryTableWindow*>(aIter->second.get());
@@ -1425,7 +1425,7 @@ void OSelectionBrowseBox::DeleteFields(const OUString& rAliasName)
         if (bWasEditing)
             DeactivateCell();
 
-        OTableFields::reverse_iterator aIter = getFields().rbegin();
+        OTableFields::const_reverse_iterator aIter = getFields().rbegin();
         OTableFieldDescRef pEntry = nullptr;
         for(sal_uInt16 nPos=sal::static_int_cast< sal_uInt16 >(getFields().size());aIter != getFields().rend();++aIter,--nPos)
         {
@@ -1587,10 +1587,11 @@ OTableFieldDescRef OSelectionBrowseBox::InsertField(const OTableFieldDescRef& _r
 
 sal_uInt16 OSelectionBrowseBox::FieldsCount()
 {
-    OTableFields::iterator aIter = getFields().begin();
+    OTableFields::const_iterator aIter = getFields().begin();
+    OTableFields::const_iterator aEnd = getFields().end();
     sal_uInt16 nCount = 0;
 
-    while (aIter != getFields().end())
+    while (aIter != aEnd)
     {
         if ((*aIter).is() && !(*aIter)->IsEmpty())
             ++nCount;
@@ -1602,8 +1603,8 @@ sal_uInt16 OSelectionBrowseBox::FieldsCount()
 
 OTableFieldDescRef OSelectionBrowseBox::FindFirstFreeCol(sal_uInt16& _rColumnPosition )
 {
-    OTableFields::iterator aIter = getFields().begin();
-    OTableFields::iterator aEnd  = getFields().end();
+    OTableFields::const_iterator aIter = getFields().begin();
+    OTableFields::const_iterator aEnd  = getFields().end();
 
     _rColumnPosition = BROWSER_INVALIDID;
 
@@ -1641,8 +1642,8 @@ void OSelectionBrowseBox::AddGroupBy( const OTableFieldDescRef& rInfo , sal_uInt
     //sal_Bool bAppend = sal_False;
 
     OTableFields& rFields = getFields();
-    OTableFields::iterator aIter = rFields.begin();
-    OTableFields::iterator aEnd = rFields.end();
+    OTableFields::const_iterator aIter = rFields.begin();
+    OTableFields::const_iterator aEnd = rFields.end();
     for(;aIter != aEnd;++aIter)
     {
         pEntry = *aIter;
@@ -1688,8 +1689,8 @@ void OSelectionBrowseBox::DuplicateConditionLevel( const sal_uInt16 nLevel)
 {
     const sal_uInt16 nNewLevel = nLevel +1;
     OTableFields& rFields = getFields();
-    OTableFields::iterator aIter = rFields.begin();
-    OTableFields::iterator aEnd = rFields.end();
+    OTableFields::const_iterator aIter = rFields.begin();
+    OTableFields::const_iterator aEnd = rFields.end();
     for(;aIter != aEnd;++aIter)
     {
         OTableFieldDescRef pEntry = *aIter;
@@ -1721,8 +1722,8 @@ void OSelectionBrowseBox::AddCondition( const OTableFieldDescRef& rInfo, const O
     ::comphelper::UStringMixEqual bCase(xMeta.is() && xMeta->supportsMixedCaseQuotedIdentifiers());
 
     OTableFields& rFields = getFields();
-    OTableFields::iterator aIter = rFields.begin();
-    OTableFields::iterator aEnd = rFields.end();
+    OTableFields::const_iterator aIter = rFields.begin();
+    OTableFields::const_iterator aEnd = rFields.end();
     for(;aIter != aEnd;++aIter)
     {
         OTableFieldDescRef pEntry = *aIter;
@@ -1814,8 +1815,8 @@ void OSelectionBrowseBox::AddOrder( const OTableFieldDescRef& rInfo, const EOrde
 
     bool bAppend = false;
     OTableFields& rFields = getFields();
-    OTableFields::iterator aIter = rFields.begin();
-    OTableFields::iterator aEnd = rFields.end();
+    OTableFields::const_iterator aIter = rFields.begin();
+    OTableFields::const_iterator aEnd = rFields.end();
     for(;aIter != aEnd;++aIter)
     {
         pEntry = *aIter;
@@ -2594,7 +2595,7 @@ bool OSelectionBrowseBox::fillEntryTable(OTableFieldDescRef& _pEntry,const OUStr
 {
     bool bRet = false;
     OJoinTableView::OTableWindowMap& rTabWinList = getDesignView()->getTableView()->GetTabWinMap();
-    OJoinTableView::OTableWindowMap::iterator aIter = rTabWinList.find(_sTableName);
+    OJoinTableView::OTableWindowMap::const_iterator aIter = rTabWinList.find(_sTableName);
     if(aIter != rTabWinList.end())
     {
         OQueryTableWindow* pEntryTab = static_cast<OQueryTableWindow*>(aIter->second.get());
@@ -2675,8 +2676,8 @@ Reference< XAccessible > OSelectionBrowseBox::CreateAccessibleCell( sal_Int32 _n
 bool OSelectionBrowseBox::HasFieldByAliasName(const OUString& rFieldName, OTableFieldDescRef& rInfo) const
 {
     OTableFields& aFields = getFields();
-    OTableFields::iterator aIter = aFields.begin();
-    OTableFields::iterator aEnd  = aFields.end();
+    OTableFields::const_iterator aIter = aFields.begin();
+    OTableFields::const_iterator aEnd  = aFields.end();
 
     for(;aIter != aEnd;++aIter)
     {
diff --git a/dbaccess/source/ui/querydesign/TableConnection.cxx b/dbaccess/source/ui/querydesign/TableConnection.cxx
index 062158e..ebf2e17 100644
--- a/dbaccess/source/ui/querydesign/TableConnection.cxx
+++ b/dbaccess/source/ui/querydesign/TableConnection.cxx
@@ -66,8 +66,8 @@ namespace dbaui
     }
     void OTableConnection::clearLineData()
     {
-        ::std::vector<OConnectionLine*>::iterator aLineEnd = m_vConnLine.end();
-        for(::std::vector<OConnectionLine*>::iterator aLineIter = m_vConnLine.begin();aLineIter != aLineEnd;++aLineIter)
+        ::std::vector<OConnectionLine*>::const_iterator aLineEnd = m_vConnLine.end();
+        for(::std::vector<OConnectionLine*>::const_iterator aLineIter = m_vConnLine.begin();aLineIter != aLineEnd;++aLineIter)
             delete *aLineIter;
         m_vConnLine.clear();
     }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list