summaryrefslogtreecommitdiff
path: root/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/sdr/contact/viewcontactofe3dlathe.cxx')
-rw-r--r--svx/source/sdr/contact/viewcontactofe3dlathe.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
index 1d8784d31f8b..3cd55fcde828 100644
--- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
+++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx
@@ -54,16 +54,8 @@ namespace sdr
{
drawinglayer::primitive3d::Primitive3DSequence xRetval;
const SfxItemSet& rItemSet = GetE3dLatheObj().GetMergedItemSet();
- drawinglayer::attribute::SdrLineFillShadowAttribute* pAttribute = drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false);
-
- // for 3D Objects, always create a primitive even when not visible. This is necessary ATM
- // since e.g. chart geometries rely on the occupied space of non-visible objects
- if(!pAttribute)
- {
- pAttribute = new drawinglayer::attribute::SdrLineFillShadowAttribute(
- impCreateFallbackLineAttribute(basegfx::BColor(0.0, 1.0, 0.0)),
- 0, 0, 0, 0);
- }
+ const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute(
+ drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false));
// get extrude geometry
const basegfx::B2DPolyPolygon aPolyPolygon(GetE3dLatheObj().GetPolyPoly2D());
@@ -103,16 +95,16 @@ namespace sdr
// create primitive and add
const basegfx::B3DHomMatrix aWorldTransform;
- const drawinglayer::primitive3d::Primitive3DReference xReference(new drawinglayer::primitive3d::SdrLathePrimitive3D(
- aWorldTransform, aTextureSize, *pAttribute, *pSdr3DObjectAttribute,
- aPolyPolygon, nHorizontalSegments, nVerticalSegments,
- fDiagonal, fBackScale, fRotation,
- bSmoothNormals, true, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack));
+ const drawinglayer::primitive3d::Primitive3DReference xReference(
+ new drawinglayer::primitive3d::SdrLathePrimitive3D(
+ aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute,
+ aPolyPolygon, nHorizontalSegments, nVerticalSegments,
+ fDiagonal, fBackScale, fRotation,
+ bSmoothNormals, true, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack));
xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1);
// delete 3D Object Attributes
delete pSdr3DObjectAttribute;
- delete pAttribute;
return xRetval;
}