From 6d1699d707a2be510a0021dbce124d27356819ad Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 15 Apr 2015 11:11:03 +0100 Subject: fix crash on re-export of fdo39974-1.odt to odt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit c2c22d26db03949771d5a0bb4f8abf6d2dc850ea) sw: DrawFillAttributes: move check for empty rPaintRegion Tweak c2c22d26db03949771d5a0bb4f8abf6d2dc850ea a bit: if the paint region is empty, nothing should be painted. (cherry picked from commit dc6a6475bcc7625a648e840de97ebd7a1ab03270) Change-Id: Ib4246987a3665f655ad44339ade0350b074c3266 Reviewed-on: https://gerrit.libreoffice.org/15329 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara (cherry picked from commit 7ede9572e86a907f7cce8debba732d07b6b45923) Reviewed-on: https://gerrit.libreoffice.org/15330 Reviewed-by: Michael Stahl --- sw/source/core/layout/paintfrm.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 5557de34a48f..7c395fbc4b39 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1858,7 +1858,8 @@ bool DrawFillAttributes( rPaintRegion.GetOrigin().Right(), rPaintRegion.GetOrigin().Bottom()); - if(!aPaintRange.isEmpty() && + if (!aPaintRange.isEmpty() && + !rPaintRegion.empty() && !basegfx::fTools::equalZero(aPaintRange.getWidth()) && !basegfx::fTools::equalZero(aPaintRange.getHeight())) { -- cgit v1.2.3