diff options
Diffstat (limited to 'svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx')
-rw-r--r-- | svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx index 506792cb185d..d935cf3d2438 100644 --- a/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcaptionprimitive2d.cxx @@ -34,6 +34,7 @@ #include <svx/sdr/primitive2d/sdrdecompositiontools.hxx> #include <drawinglayer/primitive2d/groupprimitive2d.hxx> #include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> +#include <drawinglayer/primitive2d/hittestprimitive2d.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -64,6 +65,17 @@ namespace drawinglayer appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(aUnitOutline, getTransform(), *getSdrLFSTAttribute().getLine())); appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createPolygonLinePrimitive(getTail(), getTransform(), *getSdrLFSTAttribute().getLine(), getSdrLFSTAttribute().getLineStartEnd())); } + else + { + // if initially no line is defined, create one for HitTest and BoundRect + Primitive2DSequence aLineSequence(2); + const attribute::SdrLineAttribute aBlackHairline(basegfx::BColor(0.0, 0.0, 0.0)); + + aLineSequence[0] = createPolygonLinePrimitive(aUnitOutline, getTransform(), aBlackHairline); + aLineSequence[1] = createPolygonLinePrimitive(getTail(), getTransform(), aBlackHairline); + + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, Primitive2DReference(new HitTestPrimitive2D(aLineSequence))); + } // add text if(getSdrLFSTAttribute().getText()) |