sw/source/uibase/dbui/dbmgr.cxx |   19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

New commits:
commit f5ccfd60c2c5dab392d58870fbd079a6286bc239
Author: Oliver Specht <oliver.spe...@cib.de>
Date:   Fri Jan 15 15:32:18 2016 +0100

    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.spe...@cib.de>
    Tested-by: Oliver Specht <oliver.spe...@cib.de>

diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 395b3d3..90c7e57 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 );
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to