summaryrefslogtreecommitdiff
path: root/basegfx/source/polygon/b2dpolypolygontools.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <alg@apache.org>2013-08-13 15:10:34 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-08-14 11:32:19 +0100
commitb5c9668d34acdbce500609725760d6578debb95a (patch)
tree0e61d3bb269c40fb010b86684637a9be9cb13c1b /basegfx/source/polygon/b2dpolypolygontools.cxx
parentb74a2e6ee80e30ed42ef99e24f85eb1d2df346ca (diff)
Resolves: #i122149# Corrected stuff around polygon-based clip regions
do not use them where not needed (cherry picked from commit 4ccb1eb7d58005ab3b501b7c6ff128fadbcd5066) Conflicts: basegfx/inc/basegfx/matrix/b2dhommatrixtools.hxx basegfx/inc/basegfx/polygon/b2dpolygontools.hxx basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx basegfx/inc/basegfx/tuple/b2dtuple.hxx basegfx/inc/basegfx/tuple/b3dtuple.hxx sc/source/ui/inc/output.hxx sc/source/ui/view/gridwin.cxx sc/source/ui/view/output.cxx vcl/win/source/gdi/salgdi.cxx Change-Id: Ie265814a51180bffe3c821a3f2148cb3bb54ecad
Diffstat (limited to 'basegfx/source/polygon/b2dpolypolygontools.cxx')
-rw-r--r--basegfx/source/polygon/b2dpolypolygontools.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index c2b18eff4e44..b7db01c29e28 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -498,6 +498,23 @@ namespace basegfx
return aRetval;
}
+ bool containsOnlyHorizontalAndVerticalEdges(const B2DPolyPolygon& rCandidate)
+ {
+ if(rCandidate.areControlPointsUsed())
+ {
+ return false;
+ }
+
+ for(sal_uInt32 a(0); a < rCandidate.count(); a++)
+ {
+ if(!containsOnlyHorizontalAndVerticalEdges(rCandidate.getB2DPolygon(a)))
+ {
+ return false;
+ }
+ }
+
+ return true;
+ }
} // end of namespace tools
} // end of namespace basegfx