diff options
Diffstat (limited to 'vcl/source/gdi/region.cxx')
-rw-r--r-- | vcl/source/gdi/region.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index b46972a7383a..e359f59a1678 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1100,7 +1100,7 @@ Region::Region( const basegfx::B2DPolyPolygon& rPolyPoly ) DBG_CTOR( Region, ImplDbgTestRegion ); DBG_CHKOBJ( &rPolyPoly, PolyPolygon, NULL ); - mpImplRegion = new ImplRegion( rPolyPoly ); + ImplCreatePolyPolyRegion( rPolyPoly ); } // ----------------------------------------------------------------------- @@ -1190,6 +1190,16 @@ void Region::ImplCreatePolyPolyRegion( const PolyPolygon& rPolyPoly ) // ----------------------------------------------------------------------- +void Region::ImplCreatePolyPolyRegion( const basegfx::B2DPolyPolygon& rPolyPoly ) +{ + if (rPolyPoly.count()==0 || rPolyPoly.getB2DRange().isEmpty()) + mpImplRegion = (ImplRegion*)(&aImplEmptyRegion); + else + mpImplRegion = new ImplRegion( rPolyPoly ); +} + +// ----------------------------------------------------------------------- + void Region::ImplPolyPolyRegionToBandRegionFunc() { // ensure to subdivide when bezier segemnts are used, it's going to |