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.kose@collabora.com>
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 6067bfe..9a7c84a 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;