cid#1607396 silence Overflowed integer argument
Change-Id: I756688604ce80d0e9ca6494826767f49dcc13af1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172095 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
parent
edb352c241
commit
b95059acaf
1 changed files with 2 additions and 0 deletions
|
@ -1275,6 +1275,7 @@ EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView const * pView )
|
|||
const ParaPortion* pPPortion = FindParaPortion( rPaM.GetNode() );
|
||||
assert(pPPortion);
|
||||
sal_Int32 nLine = pPPortion->GetLineNumber( rPaM.GetIndex() );
|
||||
assert(nLine >= 0);
|
||||
const EditLine& rLine = pPPortion->GetLines()[nLine];
|
||||
|
||||
tools::Long nX;
|
||||
|
@ -1289,6 +1290,7 @@ EditPaM ImpEditEngine::CursorUp( const EditPaM& rPaM, EditView const * pView )
|
|||
EditPaM aNewPaM( rPaM );
|
||||
if ( nLine ) // same paragraph
|
||||
{
|
||||
assert(nLine >= 1);
|
||||
const EditLine& rPrevLine = pPPortion->GetLines()[nLine-1];
|
||||
aNewPaM.SetIndex(GetChar(*pPPortion, rPrevLine, nX));
|
||||
// If a previous automatically wrapped line, and one has to be exactly
|
||||
|
|
Loading…
Reference in a new issue