connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx | 8 ++------ dbaccess/source/core/api/RowSetCache.cxx | 9 ++++----- 2 files changed, 6 insertions(+), 11 deletions(-)
New commits: commit 475bafc4be1b113095e1b0dcacfd565374777f8d Author: Lionel Elie Mamane <[email protected]> Date: Wed Feb 22 06:53:51 2012 +0100 Replace manual Mutex handling by clearable guard Change-Id: I4c20bf3a2aa5ca908db233e54f50404cc7466d72 diff --git a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx index 6e9079c..eed6e97 100644 --- a/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx +++ b/connectivity/source/drivers/mozab/mozillasrc/MQueryHelper.cxx @@ -222,28 +222,24 @@ MQueryHelper::getByIndex( sal_uInt32 nRow ) } do { - // Obtain the Mutex - don't use a guard as we want to be able to release - // and acquire again... - m_aMutex.acquire(); + ::osl::ClearableMutexGuard aGuard( m_aMutex ); if ( nRow > m_aResults.size() ) { if ( m_bQueryComplete ) { m_bAtEnd = sal_True; - m_aMutex.release(); return( NULL ); } else { clearResultOrComplete(); - m_aMutex.release(); + aGuard.clear(); if ( !waitForResultOrComplete( ) ) return( NULL ); } } else { - m_aMutex.release(); return( m_aResults[ nRow -1 ] ); } } while ( sal_True ); commit 43f9468d3529ab7e6f20a5ba3ae12dc14ead4193 Author: Lionel Elie Mamane <[email protected]> Date: Mon Jun 4 23:28:18 2012 +0200 bCheck is guaranteed by the for loop condition Change-Id: Ia54eaa5cb1aa8bb4a052cea25396b07f048ff74c diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx index 940618a..05a88d0 100644 --- a/dbaccess/source/core/api/RowSetCache.cxx +++ b/dbaccess/source/core/api/RowSetCache.cxx @@ -1087,11 +1087,10 @@ sal_Bool ORowSetCache::moveWindow() for(; !aIter->is() && bCheck;++aIter, ++nPos) { OSL_ENSURE(aIter != m_pMatrix->end(),"Invalid iterator"); - if ( bCheck ) // resultset stands on right position - { - *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); - m_pCacheSet->fillValueRow(*aIter, nPos); - } + + *aIter = new ORowSetValueVector(m_xMetaData->getColumnCount()); + m_pCacheSet->fillValueRow(*aIter, nPos); + bCheck = m_pCacheSet->next(); } } _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
