[Libreoffice-commits] .: 2 commits - dbaccess/source

Lionel Elie Mamane lmamane at kemper.freedesktop.org
Tue May 15 09:53:01 PDT 2012


 dbaccess/source/core/api/KeySet.cxx |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

New commits:
commit 2ffe693d7e1f9710815b946112b34e2aec5450e5
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Tue May 15 18:37:43 2012 +0200

    simplify/clarify code

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 49edcbf..26112cf 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1105,15 +1105,12 @@ sal_Bool SAL_CALL OKeySet::next(  ) throw(SQLException, RuntimeException)
 
     if(isAfterLast())
         return sal_False;
+    ++m_aKeyIter;
     if(!m_bRowCountFinal) // not yet all records fetched
     {
-        ++m_aKeyIter; // this is possible because we stand on begin() and this is the "beforefirst" row
-                      // LEM: above comment is wrong; we may be anywhere but after last.
         if(m_aKeyIter == m_aKeyMap.end() && !fetchRow())
             m_aKeyIter = m_aKeyMap.end();
     }
-    else if(!isAfterLast())
-        ++m_aKeyIter;
 
     refreshRow();
     return !isAfterLast();
commit 8fca982829c03995e74faf17e5777b3aa61b91dc
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date:   Tue May 15 18:36:12 2012 +0200

    fdo#48345 need to refresh row also when not m_bRowCountFinal

diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 309d6d8..49edcbf 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1108,14 +1108,9 @@ sal_Bool SAL_CALL OKeySet::next(  ) throw(SQLException, RuntimeException)
     if(!m_bRowCountFinal) // not yet all records fetched
     {
         ++m_aKeyIter; // this is possible because we stand on begin() and this is the "beforefirst" row
+                      // LEM: above comment is wrong; we may be anywhere but after last.
         if(m_aKeyIter == m_aKeyMap.end() && !fetchRow())
             m_aKeyIter = m_aKeyMap.end();
-        else
-        {
-            //m_aKeyIter->second.second.second = new OPrivateRow(_rInsertRow->get());
-            m_xRow.set(m_xDriverRow,UNO_QUERY_THROW);
-            return !isAfterLast();
-        }
     }
     else if(!isAfterLast())
         ++m_aKeyIter;


More information about the Libreoffice-commits mailing list