diff options
Diffstat (limited to 'svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx')
-rw-r--r-- | svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx index 5b686bb5abae..3cf7b6415725 100644 --- a/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx +++ b/svx/source/sdr/primitive2d/sdrcustomshapeprimitive2d.cxx @@ -36,6 +36,7 @@ #include <svx/sdr/primitive2d/sdrdecompositiontools.hxx> #include <drawinglayer/primitive2d/groupprimitive2d.hxx> #include <svx/sdr/primitive2d/svx_primitivetypes2d.hxx> +#include <drawinglayer/attribute/sdrlineattribute.hxx> ////////////////////////////////////////////////////////////////////////////// @@ -52,21 +53,23 @@ namespace drawinglayer Primitive2DSequence aRetval(getSubPrimitives()); // add text - if(getSdrSTAttribute().getText()) + if(!getSdrSTAttribute().getText().isDefault()) { - const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createPolygonFromRect(basegfx::B2DRange(0.0, 0.0, 1.0, 1.0))); - appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, createTextPrimitive( - basegfx::B2DPolyPolygon(aUnitOutline), - getTextBox(), - *getSdrSTAttribute().getText(), - 0, - false, - getWordWrap(), - isForceTextClipToTextRange())); + const basegfx::B2DPolygon aUnitOutline(basegfx::tools::createUnitPolygon()); + + appendPrimitive2DReferenceToPrimitive2DSequence(aRetval, + createTextPrimitive( + basegfx::B2DPolyPolygon(aUnitOutline), + getTextBox(), + getSdrSTAttribute().getText(), + attribute::SdrLineAttribute(), + false, + getWordWrap(), + isForceTextClipToTextRange())); } // add shadow - if(aRetval.hasElements() && getSdrSTAttribute().getShadow()) + if(aRetval.hasElements() && !getSdrSTAttribute().getShadow().isDefault()) { // #i105323# add generic shadow only for 2D shapes. For // 3D shapes shadow will be set at the individual created @@ -80,7 +83,7 @@ namespace drawinglayer // shadow will be correct (using ColorModifierStack), but expensive. if(!get3DShape()) { - aRetval = createEmbeddedShadowPrimitive(aRetval, *getSdrSTAttribute().getShadow()); + aRetval = createEmbeddedShadowPrimitive(aRetval, getSdrSTAttribute().getShadow()); } } |