[Libreoffice-commits] core.git: 3 commits - connectivity/source

Lionel Elie Mamane lionel at mamane.lu
Wed Aug 28 10:28:28 PDT 2013


 connectivity/source/drivers/odbcbase/OResultSet.cxx |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7bf8739fd169d378aba96c59a545f15c8f19d9f1
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Aug 28 19:26:00 2013 +0200

    janitorial: more constness
    
    Change-Id: Icf4746d70488bec20b4c47fc65fa989cfe90992b

diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 2d044e6..31fbbb0 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -1577,7 +1577,7 @@ void OResultSet::fillColumn(const sal_Int32 _nColumn)
     }
 
     TDataRow::iterator pColumn      = m_aRow.begin() + curCol;
-    TDataRow::iterator pColumnEnd   = m_aRow.begin() + _nColumn + 1;
+    const TDataRow::const_iterator pColumnEnd   = m_aRow.begin() + _nColumn + 1;
 
     if(curCol==0)
     {
commit 313a81f9158600b6a214fe54d11ec4afcc0cc961
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Aug 28 19:21:41 2013 +0200

    ODBC OResultSet::ensureCacheForColumn initialise *all* new elements
    
    e.g. when growing m_aRow from size 3 to size 10
    (that is, columnIndex==9),
    the old code was initialising only position 9
    while it we need to initialise all new positions,
    that is positions 3 to 9.
    
    Change-Id: I6a51b816104e33fdd7773b68e254e9bea50110ef

diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 91b8cc6..2d044e6 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -413,7 +413,7 @@ void OResultSet::ensureCacheForColumn(sal_Int32 columnIndex)
         return;
 
     m_aRow.resize(columnIndex + 1);
-    TDataRow::iterator i (m_aRow.begin() + uColumnIndex);
+    TDataRow::iterator i (m_aRow.begin() + oldCacheSize);
     const TDataRow::const_iterator end(m_aRow.end());
     for (; i != end; ++i)
     {
commit c72a6ebd4ab41e690bf349c8dd4597a2140aac9a
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Wed Aug 28 19:17:36 2013 +0200

    remove risk of infinite recursion
    
    fillColumn is the only caller of impl_getBookmark, so all necessary
    setup (in particular ensureCacheForColumn) is already done, and
    does not need to be done in impl_getBookmark again.
    
    Change-Id: Ic78b7dabd7c536abd9ed956baa178d685a63f713

diff --git a/connectivity/source/drivers/odbcbase/OResultSet.cxx b/connectivity/source/drivers/odbcbase/OResultSet.cxx
index 0c5de7d..91b8cc6 100644
--- a/connectivity/source/drivers/odbcbase/OResultSet.cxx
+++ b/connectivity/source/drivers/odbcbase/OResultSet.cxx
@@ -1206,7 +1206,6 @@ Sequence<sal_Int8> OResultSet::impl_getBookmark(  ) throw( SQLException,  Runtim
         if(m_nUseBookmarks == SQL_UB_OFF)
             throw SQLException();
 
-        fillColumn(0);
         Sequence<sal_Int8> bookmark = OTools::getBytesValue(m_pStatement->getOwnConnection(),m_aStatementHandle,0,SQL_C_VARBOOKMARK,m_bWasNull,**this);
         m_aPosToBookmarks[bookmark] = m_nRowPos;
         OSL_ENSURE(bookmark.getLength(),"Invalid bookmark from length 0!");


More information about the Libreoffice-commits mailing list