diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-06 22:32:24 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-04-06 22:32:24 +0200 |
commit | eba4d5b2b76cefde90cb3d6638c736f435023a45 (patch) | |
tree | 43befa620475c11f3dde00e5ea141e1efd95a334 /sd/source/ui/func/fucon3d.cxx | |
parent | 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91 (diff) |
Revert "SOSAW080: Added first bunch of basic changes to helpers"
This reverts commit 6c14c27c75a03e2363f2b363ddf0a6f2f46cfa91.
Diffstat (limited to 'sd/source/ui/func/fucon3d.cxx')
-rw-r--r-- | sd/source/ui/func/fucon3d.cxx | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/sd/source/ui/func/fucon3d.cxx b/sd/source/ui/func/fucon3d.cxx index f74db13144eb..5fe097765688 100644 --- a/sd/source/ui/func/fucon3d.cxx +++ b/sd/source/ui/func/fucon3d.cxx @@ -89,7 +89,6 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() case SID_3D_CUBE: { p3DObj = new E3dCubeObj( - mpView->getSdrModelFromSdrView(), mpView->Get3DDefaultAttributes(), ::basegfx::B3DPoint(-2500, -2500, -2500), ::basegfx::B3DVector(5000, 5000, 5000)); @@ -99,7 +98,6 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() case SID_3D_SPHERE: { p3DObj = new E3dSphereObj( - mpView->getSdrModelFromSdrView(), mpView->Get3DDefaultAttributes(), ::basegfx::B3DPoint(0, 0, 0), ::basegfx::B3DVector(5000, 5000, 5000)); @@ -116,10 +114,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() { aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon); } - p3DObj = new E3dLatheObj( - mpView->getSdrModelFromSdrView(), - mpView->Get3DDefaultAttributes(), - ::basegfx::B2DPolyPolygon(aB2DPolygon)); + p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon)); /* this is an open object, therefore it has to be handled double- sided by default */ @@ -146,10 +141,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() { aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon); } - p3DObj = new E3dLatheObj( - mpView->getSdrModelFromSdrView(), - mpView->Get3DDefaultAttributes(), - ::basegfx::B2DPolyPolygon(aB2DPolygon)); + p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon)); break; } @@ -160,10 +152,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() { aB2DPolygon = ::basegfx::utils::adaptiveSubdivideByAngle(aB2DPolygon); } - p3DObj = new E3dLatheObj( - mpView->getSdrModelFromSdrView(), - mpView->Get3DDefaultAttributes(), - ::basegfx::B2DPolyPolygon(aB2DPolygon)); + p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aB2DPolygon)); break; } @@ -189,10 +178,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() aInnerPoly.append(::basegfx::B2DPoint(0, -1000*5)); aInnerPoly.setClosed(true); - p3DObj = new E3dLatheObj( - mpView->getSdrModelFromSdrView(), - mpView->Get3DDefaultAttributes(), - ::basegfx::B2DPolyPolygon(aInnerPoly)); + p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly)); break; } @@ -216,10 +202,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5)); aInnerPoly.setClosed(true); - p3DObj = new E3dLatheObj( - mpView->getSdrModelFromSdrView(), - mpView->Get3DDefaultAttributes(), - ::basegfx::B2DPolyPolygon(aInnerPoly)); + p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly)); break; } @@ -243,10 +226,7 @@ E3dCompoundObject* FuConstruct3dObject::ImpCreateBasic3DShape() aInnerPoly.append(::basegfx::B2DPoint(0, 1000*5)); aInnerPoly.setClosed(true); - p3DObj = new E3dLatheObj( - mpView->getSdrModelFromSdrView(), - mpView->Get3DDefaultAttributes(), - ::basegfx::B2DPolyPolygon(aInnerPoly)); + p3DObj = new E3dLatheObj(mpView->Get3DDefaultAttributes(), ::basegfx::B2DPolyPolygon(aInnerPoly)); p3DObj->SetMergedItem(makeSvx3DHorizontalSegmentsItem(4)); break; } @@ -393,7 +373,7 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const double fW(aVolume.getWidth()); double fH(aVolume.getHeight()); ::tools::Rectangle a3DRect(0, 0, static_cast<long>(fW), static_cast<long>(fH)); - E3dScene* pScene = new E3dScene(*mpDoc); + E3dScene* pScene = new E3dScene; // copied code from E3dView::InitScene double fCamZ(aVolume.getMaxZ() + ((fW + fH) / 4.0)); @@ -407,9 +387,13 @@ SdrObject* FuConstruct3dObject::CreateDefaultObject(const sal_uInt16 nID, const aCam.SetFocalLength(mpView->GetDefaultCamFocal()); aCam.SetDefaults(::basegfx::B3DPoint(0.0, 0.0, fDefaultCamPosZ), aLookAt); pScene->SetCamera(aCam); + pScene->Insert3DObj(p3DObj); pScene->NbcSetSnapRect(a3DRect); + pScene->SetModel(mpDoc); + ImpPrepareBasic3DShape(p3DObj, pScene); + SfxItemSet aAttr(mpDoc->GetPool()); SetStyleSheet(aAttr, p3DObj); aAttr.Put(XLineStyleItem (drawing::LineStyle_NONE)); |