[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - dbaccess/source
Caolán McNamara
caolan at kemper.freedesktop.org
Fri May 18 08:44:22 PDT 2012
dbaccess/source/core/api/KeySet.cxx | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
New commits:
commit be98213ec701ead0f7d13a815770598a5544022b
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Tue May 15 18:37:43 2012 +0200
simplify/clarify code
Signed-off-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index c30d35f..74b8b17 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1142,15 +1142,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 222ba799ad57b0ff93ac103c8af65c706ca4cf37
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
Signed-off-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 8e42b30..c30d35f 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -1145,14 +1145,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