sd/source/ui/view/tabcontr.cxx | 4 +++- sw/source/core/crsr/pam.cxx | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit 286d8207d5ce6c4c76578ed3e88dce4ab5511052 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 28 10:56:57 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 28 12:14:33 2024 +0100 cid#1607729 Overflowed constant Change-Id: Iebfcb18a764a432f3bd56b98225e27fb5081737f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/sd/source/ui/view/tabcontr.cxx b/sd/source/ui/view/tabcontr.cxx index 21b3bd1aed43..68baa2b8067d 100644 --- a/sd/source/ui/view/tabcontr.cxx +++ b/sd/source/ui/view/tabcontr.cxx @@ -203,7 +203,9 @@ sal_Int8 TabControl::ExecuteDrop( const ExecuteDropEvent& rEvt ) if( bInternalMove ) { - sal_uInt16 nPageId = ShowDropPos( aPos ) - 1; + sal_uInt16 nDropPos = ShowDropPos( aPos ); + assert(nDropPos > 0); + sal_uInt16 nPageId = nDropPos - 1; switch (rEvt.mnAction) { commit 32e98ce4bfe7eef24aa6acca83a5f22199f486f5 Author: Noel Grandin <noel.gran...@collabora.co.uk> AuthorDate: Mon Oct 28 10:23:44 2024 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Mon Oct 28 12:14:22 2024 +0100 cid#1607347 Overflowed constant Change-Id: Idd2afe534177fc1ff2fe216b9167e0107843628f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175719 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index bccb0d510e98..a81a9d736b9d 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1140,7 +1140,10 @@ void GoStartSection( SwPosition * pPos ) SwNodes& rNodes = pPos->GetNodes(); sal_uInt16 nLevel = SwNodes::GetSectionLevel( pPos->GetNode() ); if( pPos->GetNode() < *rNodes.GetEndOfContent().StartOfSectionNode() ) + { + assert(nLevel > 0); nLevel--; + } do { SwNodes::GoStartOfSection( &pPos->nNode ); } while( nLevel-- ); // already on a ContentNode