sw/source/core/doc/docnum.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 911609a595728f304dfe592bd290c79d2d1ef436
Author: Caolán McNamara <[email protected]>
AuthorDate: Tue Apr 1 10:31:16 2025 +0100
Commit: Caolán McNamara <[email protected]>
CommitDate: Tue Apr 1 20:12:55 2025 +0200
cid#1645558 silence Overflowed constant
Change-Id: I311ede3b822c2e1ec20bba3d1b3bba83381db70d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183579
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <[email protected]>
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index 6ff2afc11ebd..510cbe459ae0 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -476,6 +476,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam,
{
if( !nCurrentPos )
return false; // Promoting or demoting before the first outline =>
no.
+ assert(nCurrentPos > 0 && "coverity#1645558");
if( --nCurrentPos )
aSttRg = *GetNodes().GetOutLineNds()[ nCurrentPos ];
else if( 0 > nOffset )
@@ -489,6 +490,7 @@ bool SwDoc::MoveOutlinePara( const SwPaM& rPam,
{
if( !nCurrentPosInline )
return false; // Promoting or demoting before the first
outline => no.
+ assert(nCurrentPosInline > 0 && "coverity#1645558");
if( --nCurrentPosInline )
{
aSttRg = *SwOutlineNodes::GetRootNode((*pOutlineNodesInline)[
nCurrentPosInline ]);