sw/source/core/crsr/swcrsr.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 1e5cf1b3ebf39aee01ed2a3bfd5be7ee6f44d18e Author: Canberk TURAN <canberkktur...@gmail.com> AuthorDate: Sun Jun 7 16:26:16 2020 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Mon Jun 8 08:08:49 2020 +0200 tdf#131990 MACROS: fixes return value of UpDown Method This patch fixes bRet return value of UpDown method in sw/source/core/crsr/swcrsr.cxx. Before this patch UpDown method always returns true. Change-Id: I5ebe4bef4e6b9d7ace4941c31e9d5a03c2023997 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95669 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com> diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx index 6067bfe414d4..9a7c84a44b9f 100644 --- a/sw/source/core/crsr/swcrsr.cxx +++ b/sw/source/core/crsr/swcrsr.cxx @@ -2036,6 +2036,7 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, } pFrame->GetModelPositionForViewPoint( GetPoint(), aPt, &eTmpState ); } + bRet = !IsSelOvr( SwCursorSelOverFlags::Toggle | SwCursorSelOverFlags::ChangePos ); } else { @@ -2047,12 +2048,17 @@ bool SwCursor::UpDown( bool bUp, sal_uInt16 nCnt, //if cursor has already been at start or end of file, //Update cursor to change nUpDownX. if ( aOldPos.nContent.GetIndex() == nOffset ) + { GetDoc()->GetEditShell()->UpdateCursor(); - else + bRet = false; + } + else{ *GetPoint() = aPos; // just give a new position + bRet = true; + } + } - bRet = !IsSelOvr( SwCursorSelOverFlags::Toggle | SwCursorSelOverFlags::ChangePos ); DoSetBidiLevelUpDown(); // calculate cursor bidi level } return bRet; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits