diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-04-15 13:27:24 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-04-15 13:33:58 +0200 |
commit | dc6a6475bcc7625a648e840de97ebd7a1ab03270 (patch) | |
tree | c00cfa2f8bb40a52f1d4fc70e6a16e010a658f2b | |
parent | f0461e8360e13137c29dfcc1d20ba93e7bbd3073 (diff) |
sw: DrawFillAttributes: move check for empty rPaintRegion
Tweak c2c22d26db03949771d5a0bb4f8abf6d2dc850ea a bit: if the paint
region is empty, nothing should be painted.
Change-Id: If88b8153f701b1f21cfd2300f0af532f5c718cdf
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index e8909c1b8923..292730f1d91f 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -1867,7 +1867,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())) { @@ -1916,7 +1917,7 @@ bool DrawFillAttributes( pPrimitives(&rSequence); drawinglayer::primitive2d::Primitive2DSequence primitives; // tdf#86578 the awful lcl_SubtractFlys hack - if (rPaintRegion.size() > 1 || (!rPaintRegion.empty() && rPaintRegion[0] != rPaintRegion.GetOrigin())) + if (rPaintRegion.size() > 1 || rPaintRegion[0] != rPaintRegion.GetOrigin()) { tools::PolyPolygon tempRegion; for (size_t i = 0; i < rPaintRegion.size(); ++i) |