diff options
author | Oliver Specht <oliver.specht@cib.de> | 2016-01-15 15:32:18 +0100 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2016-01-15 15:39:28 +0000 |
commit | f5ccfd60c2c5dab392d58870fbd079a6286bc239 (patch) | |
tree | 903e910944aa400bf86161ada43cc0e700514a1d /sw | |
parent | 75358177ccbd6c27106a350108a18e7085541479 (diff) |
tdf#73025: set absolute database index fixed
DB field 'Any record' should not move the ResultSet directly but needs
to work on the selection if there is any
Change-Id: Ie66cc66afa1118bfbc44fc29889e2b36ecd074ee
Reviewed-on: https://gerrit.libreoffice.org/21491
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Tested-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 395b3d3bf270..90c7e57a6751 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -332,7 +332,24 @@ static bool lcl_MoveAbsolute(SwDSParam* pParam, long nAbsPos) bool bRet = false; try { - if(pParam->bScrollable) + if(pParam->aSelection.getLength()) + { + if(pParam->aSelection.getLength() <= nAbsPos) + { + pParam->bEndOfDB = true; + bRet = false; + } + else + { + pParam->nSelectionIndex = nAbsPos; + sal_Int32 nPos = 0; + pParam->aSelection.getConstArray()[ pParam->nSelectionIndex ] >>= nPos; + pParam->bEndOfDB = !pParam->xResultSet->absolute( nPos ); + pParam->CheckEndOfDB(); + bRet = !pParam->bEndOfDB; + } + } + else if(pParam->bScrollable) { bRet = pParam->xResultSet->absolute( nAbsPos ); } |