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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Oct 21 18:56:19 UTC 2018


 connectivity/source/drivers/mork/MQueryHelper.cxx |    9 -------
 connectivity/source/drivers/mork/MQueryHelper.hxx |    1 
 connectivity/source/drivers/mork/MResultSet.cxx   |   26 ++--------------------
 3 files changed, 3 insertions(+), 33 deletions(-)

New commits:
commit 062401fee55847fd646f73d95d9056950c1f1b1f
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Sat Oct 20 19:33:42 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Sun Oct 21 20:55:57 2018 +0200

    queryComplete is always true
    
    Change-Id: I455fc328a0b9aa3af3e37e9a9fa86ecba97dc5a4
    Reviewed-on: https://gerrit.libreoffice.org/62099
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/connectivity/source/drivers/mork/MQueryHelper.cxx b/connectivity/source/drivers/mork/MQueryHelper.cxx
index c2b3ccf5713b..307613f936fd 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.cxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.cxx
@@ -127,15 +127,6 @@ sal_Int32 MQueryHelper::getResultCount() const
 
 bool MQueryHelper::checkRowAvailable( sal_Int32 nDBRow )
 {
-/*
-    while (!queryComplete() && getResultCount() <= (sal_uInt32)nDBRow)
-    {
-        if ( !m_aQueryHelper->waitForRow( nDBRow ) ) {
-            m_aError = m_aQueryHelper->getError();
-            return sal_False;
-        }
-    }
-*/
     return getResultCount() > nDBRow;
 }
 
diff --git a/connectivity/source/drivers/mork/MQueryHelper.hxx b/connectivity/source/drivers/mork/MQueryHelper.hxx
index 136760e8c052..0aabc5aed26f 100644
--- a/connectivity/source/drivers/mork/MQueryHelper.hxx
+++ b/connectivity/source/drivers/mork/MQueryHelper.hxx
@@ -167,7 +167,6 @@ namespace connectivity
 
             void                       reset();
             MQueryHelperResultEntry*   getByIndex( sal_uInt32 nRow );
-            static bool                queryComplete() { return true; }
             sal_Int32                  getResultCount() const;
             bool                       checkRowAvailable( sal_Int32 nDBRow );
             bool                       getRowValue( ORowSetValue& rValue, sal_Int32 nDBRow,const OUString& aDBColumnName, sal_Int32 nType );
diff --git a/connectivity/source/drivers/mork/MResultSet.cxx b/connectivity/source/drivers/mork/MResultSet.cxx
index 49600e8bda3e..d8b7de04a0c1 100644
--- a/connectivity/source/drivers/mork/MResultSet.cxx
+++ b/connectivity/source/drivers/mork/MResultSet.cxx
@@ -384,8 +384,7 @@ sal_Bool SAL_CALL OResultSet::isAfterLast(  )
     SAL_WARN("connectivity.mork", "OResultSet::isAfterLast() NOT IMPLEMENTED!");
     ResultSetEntryGuard aGuard( *this );
 
-//    return sal_True;
-    return m_nRowPos > currentRowCount() && MQueryHelper::queryComplete();
+    return m_nRowPos > currentRowCount();
 }
 
 sal_Bool SAL_CALL OResultSet::isFirst(  )
@@ -401,7 +400,7 @@ sal_Bool SAL_CALL OResultSet::isLast(  )
     ResultSetEntryGuard aGuard( *this );
 
 //    return sal_True;
-    return m_nRowPos == currentRowCount() && MQueryHelper::queryComplete();
+    return m_nRowPos == currentRowCount();
 }
 
 void SAL_CALL OResultSet::beforeFirst(  )
@@ -1124,8 +1123,6 @@ void OResultSet::executeQuery()
                     // query to the mozilla addressbooks has returned all
                     // values.
 
-                    OSL_ENSURE( MQueryHelper::queryComplete(), "Query not complete!!");
-
                     OSortIndex aSortIndex(eKeyType,m_aOrderbyAscending);
 
 #if OSL_DEBUG_LEVEL > 0
@@ -1305,25 +1302,8 @@ bool OResultSet::validRow( sal_uInt32 nRow)
 {
     sal_Int32  nNumberOfRecords = m_aQueryHelper.getResultCount();
 
-    while ( nRow > static_cast<sal_uInt32>(nNumberOfRecords) && !MQueryHelper::queryComplete() ) {
-            if (!m_aQueryHelper.checkRowAvailable( nRow ))
-            {
-                SAL_INFO(
-                    "connectivity.mork",
-                    "validRow(" << nRow << "): return False");
-                return false;
-            }
-
-            if ( m_aQueryHelper.hadError() )
-            {
-                m_pStatement->getOwnConnection()->throwSQLException( m_aQueryHelper.getError(), *this );
-            }
-
-            nNumberOfRecords = m_aQueryHelper.getResultCount();
-    }
-
     if (( nRow == 0 ) ||
-        ( nRow > static_cast<sal_uInt32>(nNumberOfRecords) && MQueryHelper::queryComplete()) ){
+        ( nRow > static_cast<sal_uInt32>(nNumberOfRecords)) ){
         SAL_INFO("connectivity.mork", "validRow(" << nRow << "): return False");
         return false;
     }


More information about the Libreoffice-commits mailing list