chart2/source/controller/main/PositionAndSizeHelper.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit 1dea4f935a97a59dbefd93a6ce250f628989b0ad Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Mon Jul 22 09:02:21 2019 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Mon Jul 22 20:48:45 2019 +0200 cid#1451627 Division or modulo by float zero Change-Id: Ifb4b446edb3da3096230e99a898e2fa8c4e9d66c Reviewed-on: https://gerrit.libreoffice.org/76098 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx index 8f8b7109b8a5..40972d47c3f4 100644 --- a/chart2/source/controller/main/PositionAndSizeHelper.cxx +++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx @@ -44,6 +44,10 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType tools::Rectangle aObjectRect( Point(rNewPositionAndSize.X,rNewPositionAndSize.Y), Size(rNewPositionAndSize.Width,rNewPositionAndSize.Height) ); tools::Rectangle aPageRect( Point(rPageRectangle.X,rPageRectangle.Y), Size(rPageRectangle.Width,rPageRectangle.Height) ); + // every following branch divides by width and height + if (aPageRect.getWidth() == 0 || aPageRect.getHeight() == 0) + return false; + if( eObjectType==OBJECTTYPE_TITLE ) { //@todo decide whether x is primary or secondary _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits