diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-09-01 20:35:51 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2016-09-23 23:25:49 +0200 |
commit | 178a23a827f16e046e5d5efb2aa2aa3fc990452a (patch) | |
tree | a031b14a28cba9eeab32f299c5771b39e782b7fa /sw/source | |
parent | 971947b38d1dbc6213e55403cf482a530cd9b449 (diff) |
MM just increment after a successful next record
This correctly counts the record id from 1, while using 0
for the first item in the selection array.
Change-Id: I363eab048cb041bf46454ef685baab1eb3b2138a
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 077d4e63b3cd..238f62d2e536 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2178,7 +2178,7 @@ static bool lcl_ToNextRecord( SwDSParam* pParam, const SwDBNextRecord action ) else { sal_Int32 nPos = 0; - pParam->aSelection.getConstArray()[ pParam->nSelectionIndex++ ] >>= nPos; + pParam->aSelection.getConstArray()[ pParam->nSelectionIndex ] >>= nPos; pParam->bEndOfDB = !pParam->xResultSet->absolute( nPos ); } } @@ -2193,11 +2193,11 @@ static bool lcl_ToNextRecord( SwDSParam* pParam, const SwDBNextRecord action ) if( !pParam->bEndOfDB && nBefore == pParam->xResultSet->getRow() ) { // next returned true but it didn't move - pParam->bEndOfDB = true; + ::dbtools::throwFunctionSequenceException( pParam->xResultSet ); } - ++pParam->nSelectionIndex; } + ++pParam->nSelectionIndex; bRet = !pParam->bEndOfDB; } catch( const uno::Exception &e ) |