From 059f07f9f33460c809a93e0fda1165f5c6f6d805 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 15 Apr 2020 18:34:58 +0200 Subject: fixes for code creating reversed Rectangles ie. where left > right or top > bottom These are all places where the code is self-evidently doing the wrong thing. Found by adding asserts to tools::Rectangle. In theory, this is legit, and code that wants a proper Rectangle is supposed to be first call Justify on a Rectangle, but lots of places don't do that, and that seems very dodgy to me. So lets work towards Rectangles always being in a valid state. Change-Id: I03296a624bd9b5b193e6aa8778addfb09708cdc7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92310 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/view/viewshel.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sd') diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 9ef01355849c..97719c049e32 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -929,6 +929,8 @@ void ViewShell::ArrangeGUIElements() { if (mpImpl->mbArrangeActive) return; + if (maViewSize.IsEmpty()) + return; mpImpl->mbArrangeActive = true; // Calculate border for in-place editing. -- cgit