summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/processor2d/hittestprocessor2d.cxx22
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;