sw/source/uibase/docvw/PostItMgr.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 0059d0262adaadaca67de9e3245aaa9f62d07392
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Jul 24 11:00:13 2019 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Jul 25 09:27:11 2019 +0200

    cid#1448432 Division or modulo by zero
    
    Change-Id: Iaf99ea046591e7e1eb5d441804b812c08fea9bc9
    Reviewed-on: https://gerrit.libreoffice.org/76245
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>
    Tested-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 78fc9a3b317d..0b605096e299 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -789,11 +789,11 @@ void SwPostItMgr::LayoutPostIts()
                     {
                         pPage->lOffset = 0;
                     }
-                    else
+                    else if (sal_Int32 nScrollSize = GetScrollSize())
                     {
                         //when we changed our zoom level, the offset value can 
be to big, so lets check for the largest possible zoom value
                         long aAvailableHeight = 
mpEditWin->LogicToPixel(Size(0,pPage->mPageRect.Height())).Height() - 2 * 
GetSidebarScrollerHeight();
-                        long lOffset = -1 * GetScrollSize() * 
(aVisiblePostItList.size() - aAvailableHeight / GetScrollSize());
+                        long lOffset = -1 * nScrollSize * 
(aVisiblePostItList.size() - aAvailableHeight / nScrollSize);
                         if (pPage->lOffset < lOffset)
                             pPage->lOffset = lOffset;
                     }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to