summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-09-28 15:16:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-09-28 20:09:48 +0200
commit4ff5a7b810d293e3d9d457049145ef5c3b1d95d0 (patch)
tree7692f7d721e0c0a5570d73d1d89cff86cb077c3c
parent2596131a1fcb40cd134200035049c23113d3e141 (diff)
cid#1607680 Overflowed constant
Change-Id: I8522cfe5422c187b9045858c2f94753d0f2c8714 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174123 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--sd/source/ui/view/outlview.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx
index 07c55d7c3ee7..33d8f78ba3c5 100644
--- a/sd/source/ui/view/outlview.cxx
+++ b/sd/source/ui/view/outlview.cxx
@@ -1176,7 +1176,9 @@ Paragraph* OutlineView::GetParagraphForPage( ::Outliner const & rOutl, SdPage co
{
// get the number of paragraphs with ident 0 we need to skip before
// we find the actual page
- sal_uInt32 nPagesToSkip = (pPage->GetPageNum() - 1) >> 1;
+ sal_uInt16 nPageNum = pPage->GetPageNum();
+ assert(nPageNum > 0);
+ sal_uInt32 nPagesToSkip = (nPageNum - 1) >> 1;
sal_Int32 nParaPos = 0;
Paragraph* pPara = rOutl.GetParagraph( 0 );