summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-09-01 20:35:51 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2016-09-23 23:25:49 +0200
commit178a23a827f16e046e5d5efb2aa2aa3fc990452a (patch)
treea031b14a28cba9eeab32f299c5771b39e782b7fa /sw/source/uibase
parent971947b38d1dbc6213e55403cf482a530cd9b449 (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/uibase')
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx6
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 )