From 70f90c08592ef3e50840afda20428078c25c463a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolnai=20Tam=C3=A1s?= Date: Fri, 27 Dec 2013 09:45:05 +0100 Subject: [PATCH 085/109] Fix stepping to the next change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug description: In the "Accept or Reject Changes" dialog, when select a change (it should be after the first few ones) and clicking "Accept" or "Reject" button, acception/rejection is made but after it not the next change is selected for futher work, but a random one. This bug doesn't appear in all case, just if changes are complex enough. Solution: The nPos means absolute position so we have to get the next entry with the corresponding GetEntryAtAbsPos() method. It seems simple position can differ from absolute positions if changes are complex enough. Change-Id: I7996f81c2a09c492f9334f071591291d200d533f (cherry picked from commit dbd8a631bb23c588f52102e5dd2a61c9cd854bc3) Reviewed-on: https://gerrit.libreoffice.org/7209 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/ui/misc/redlndlg.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index 7885bb4..f1cc96d 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -830,9 +830,9 @@ void SwRedlineAcceptDlg::CallAcceptReject( sal_Bool bSelect, sal_Bool bAccept ) { if( nPos >= pTable->GetEntryCount() ) nPos = pTable->GetEntryCount() - 1; - pEntry = pTable->GetEntry( nPos ); + pEntry = pTable->GetEntryAtAbsPos( nPos ); if( !pEntry && nPos-- ) - pEntry = pTable->GetEntry( nPos ); + pEntry = pTable->GetEntryAtAbsPos( nPos ); if( pEntry ) { pTable->Select( pEntry ); -- 1.8.4.2