diff options
author | Armin Weiss <aw@openoffice.org> | 2009-10-26 17:53:55 +0000 |
---|---|---|
committer | Armin Weiss <aw@openoffice.org> | 2009-10-26 17:53:55 +0000 |
commit | ab6ea039d3c5a5ba7055b7b7f19d8b7c0d2eb084 (patch) | |
tree | 55193931904daae721be4d3932f64cde62822d50 /drawinglayer | |
parent | fix a compile problem (diff) | |
download | core-ab6ea039d3c5a5ba7055b7b7f19d8b7c0d2eb084.tar.gz core-ab6ea039d3c5a5ba7055b7b7f19d8b7c0d2eb084.zip |
#i105856# Corrected error with not taking into account that getB2DRange may be empty for primitives
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/source/processor2d/hittestprocessor2d.cxx | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drawinglayer/source/processor2d/hittestprocessor2d.cxx b/drawinglayer/source/processor2d/hittestprocessor2d.cxx index d038c61541ac..4ffef7515389 100644 --- a/drawinglayer/source/processor2d/hittestprocessor2d.cxx +++ b/drawinglayer/source/processor2d/hittestprocessor2d.cxx @@ -272,9 +272,11 @@ namespace drawinglayer // { // // empty 3D scene; Check for border hit // const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - // basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - // - // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // if(!aRange.isEmpty()) + // { + // const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + // mbHit = checkHairlineHitWithTolerance(aOutline, getDiscreteHitTolerance()); + // } // } } } @@ -474,9 +476,12 @@ namespace drawinglayer { // for text use the BoundRect of the primitive itself const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + if(!aRange.isEmpty()) + { + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + } break; } @@ -496,9 +501,12 @@ namespace drawinglayer // - For Bitamps, the mask and/or alpha information may be used // - For MetaFiles, the MetaFile content may be used const basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); - basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); - mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + if(!aRange.isEmpty()) + { + const basegfx::B2DPolygon aOutline(basegfx::tools::createPolygonFromRect(aRange)); + mbHit = checkFillHitWithTolerance(basegfx::B2DPolyPolygon(aOutline), getDiscreteHitTolerance()); + } } break; |