diff options
author | Noel Grandin <noel@peralex.com> | 2015-12-15 10:31:06 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-12-15 10:42:52 +0200 |
commit | 4463da0488099b52959544923407b15d73d3e172 (patch) | |
tree | c0fd9ada0bfdf2d3925fc1c94bac3782d332ef5a /svx/source | |
parent | 00ea9e5e4ef2f20353c881ec5844ed3862897239 (diff) |
use vector as container for Primitive3DReference
rather than uno::Sequence, since we modify this container a lot
and uno::Sequence is expensive to update
Change-Id: Id5bc5171cbc4b90b243e6dda6d572f21b3bdf00d
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/engine3d/helperhittest3d.cxx | 6 | ||||
-rw-r--r-- | svx/source/engine3d/helperminimaldepth3d.cxx | 6 | ||||
-rw-r--r-- | svx/source/engine3d/obj3d.cxx | 14 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3d.cxx | 26 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dcube.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dextrude.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dlathe.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dpolygon.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dscene.cxx | 51 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewcontactofe3dsphere.cxx | 6 | ||||
-rw-r--r-- | svx/source/sdr/contact/viewobjectcontactofe3d.cxx | 18 |
11 files changed, 74 insertions, 77 deletions
diff --git a/svx/source/engine3d/helperhittest3d.cxx b/svx/source/engine3d/helperhittest3d.cxx index 935a0906d6ca..1362642e7b83 100644 --- a/svx/source/engine3d/helperhittest3d.cxx +++ b/svx/source/engine3d/helperhittest3d.cxx @@ -72,12 +72,12 @@ void getAllHit3DObjectWithRelativePoint( { // rObject is a E3dCompoundObject, so it cannot be a scene (which is a E3dObject) const sdr::contact::ViewContactOfE3d& rVCObject = static_cast< sdr::contact::ViewContactOfE3d& >(rObject.GetViewContact()); - const drawinglayer::primitive3d::Primitive3DSequence aPrimitives(rVCObject.getViewIndependentPrimitive3DSequence()); + const drawinglayer::primitive3d::Primitive3DContainer aPrimitives(rVCObject.getViewIndependentPrimitive3DContainer()); - if(aPrimitives.hasElements()) + if(!aPrimitives.empty()) { // make BoundVolume empty and overlapping test for speedup - const basegfx::B3DRange aObjectRange(drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence(aPrimitives, rObjectViewInformation3D)); + const basegfx::B3DRange aObjectRange(aPrimitives.getB3DRange(rObjectViewInformation3D)); if(!aObjectRange.isEmpty()) { diff --git a/svx/source/engine3d/helperminimaldepth3d.cxx b/svx/source/engine3d/helperminimaldepth3d.cxx index 44deea0546dc..7e7aedbe372f 100644 --- a/svx/source/engine3d/helperminimaldepth3d.cxx +++ b/svx/source/engine3d/helperminimaldepth3d.cxx @@ -139,7 +139,7 @@ namespace drawinglayer } // end of namespace drawinglayer -// changed to create values using VCs, Primitive3DSequence and ViewInformation3D to allow +// changed to create values using VCs, Primitive3DContainer and ViewInformation3D to allow // removal of old 3D bucket geometry. There is one slight difference in the result, it's // in [0.0 .. 1.0] for Z-Depth since the scaling of the scene as 2D object is no longer // part of the 3D transformations. This could be added since the ViewContactOfE3dScene is @@ -151,10 +151,10 @@ double getMinimalDepthInViewCoordinates(const E3dCompoundObject& rObject) // this is a E3dCompoundObject, so it cannot be a scene (which is a E3dObject). // Get primitive sequence using VC const sdr::contact::ViewContactOfE3d& rVCObject = static_cast< sdr::contact::ViewContactOfE3d& >(rObject.GetViewContact()); - const drawinglayer::primitive3d::Primitive3DSequence aPrimitives = rVCObject.getViewIndependentPrimitive3DSequence(); + const drawinglayer::primitive3d::Primitive3DContainer aPrimitives = rVCObject.getViewIndependentPrimitive3DContainer(); double fRetval(DBL_MAX); - if(aPrimitives.hasElements()) + if(!aPrimitives.empty()) { const E3dScene* pScene = rObject.GetScene(); diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx index 9d67c722261b..cd553f6111c6 100644 --- a/svx/source/engine3d/obj3d.cxx +++ b/svx/source/engine3d/obj3d.cxx @@ -548,15 +548,14 @@ basegfx::B3DRange E3dObject::RecalcBoundVolume() const if(pVCOfE3D) { // BoundVolume is without 3D object transformation, use correct sequence - const drawinglayer::primitive3d::Primitive3DSequence xLocalSequence(pVCOfE3D->getVIP3DSWithoutObjectTransform()); + const drawinglayer::primitive3d::Primitive3DContainer xLocalSequence(pVCOfE3D->getVIP3DSWithoutObjectTransform()); - if(xLocalSequence.hasElements()) + if(!xLocalSequence.empty()) { const uno::Sequence< beans::PropertyValue > aEmptyParameters; const drawinglayer::geometry::ViewInformation3D aLocalViewInformation3D(aEmptyParameters); - aRetval = drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence( - xLocalSequence, aLocalViewInformation3D); + aRetval = xLocalSequence.getB3DRange(aLocalViewInformation3D); } } } @@ -907,13 +906,12 @@ void E3dCompoundObject::RecalcSnapRect() if(pVCOfE3D) { // get 3D primitive sequence - const drawinglayer::primitive3d::Primitive3DSequence xLocalSequence(pVCOfE3D->getViewIndependentPrimitive3DSequence()); + const drawinglayer::primitive3d::Primitive3DContainer xLocalSequence(pVCOfE3D->getViewIndependentPrimitive3DContainer()); - if(xLocalSequence.hasElements()) + if(!xLocalSequence.empty()) { // get BoundVolume - basegfx::B3DRange aBoundVolume(drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence( - xLocalSequence, aViewInfo3D)); + basegfx::B3DRange aBoundVolume(xLocalSequence.getB3DRange(aViewInfo3D)); // transform bound volume to relative scene coordinates aBoundVolume.transform(aViewInfo3D.getObjectToView()); diff --git a/svx/source/sdr/contact/viewcontactofe3d.cxx b/svx/source/sdr/contact/viewcontactofe3d.cxx index 3e355bbec026..9bbb61a6f1a2 100644 --- a/svx/source/sdr/contact/viewcontactofe3d.cxx +++ b/svx/source/sdr/contact/viewcontactofe3d.cxx @@ -67,12 +67,12 @@ const sdr::contact::ViewContactOfE3dScene* tryToFindVCOfE3DScene( namespace sdr { namespace contact { -drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3d::impCreateWithGivenPrimitive3DSequence( - const drawinglayer::primitive3d::Primitive3DSequence& rxContent3D) const +drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3d::impCreateWithGivenPrimitive3DContainer( + const drawinglayer::primitive3d::Primitive3DContainer& rxContent3D) const { drawinglayer::primitive2d::Primitive2DContainer xRetval; - if(rxContent3D.hasElements()) + if(!rxContent3D.empty()) { // try to get the outmost ViewObjectContactOfE3dScene for this single 3d object, // the ones on the way there are grouping scenes. Collect the in-between scene's @@ -135,27 +135,27 @@ ViewContactOfE3d::~ViewContactOfE3d() { } -drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getVIP3DSWithoutObjectTransform() const +drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3d::getVIP3DSWithoutObjectTransform() const { // local up-to-date checks. Create new list and compare. - drawinglayer::primitive3d::Primitive3DSequence xNew(createViewIndependentPrimitive3DSequence()); + drawinglayer::primitive3d::Primitive3DContainer xNew(createViewIndependentPrimitive3DContainer()); - if(!drawinglayer::primitive3d::arePrimitive3DSequencesEqual(mxViewIndependentPrimitive3DSequence, xNew)) + if(mxViewIndependentPrimitive3DContainer != xNew) { // has changed, copy content - const_cast< ViewContactOfE3d* >(this)->mxViewIndependentPrimitive3DSequence = xNew; + const_cast< ViewContactOfE3d* >(this)->mxViewIndependentPrimitive3DContainer = xNew; } // return current Primitive2DContainer - return mxViewIndependentPrimitive3DSequence; + return mxViewIndependentPrimitive3DContainer; } -drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getViewIndependentPrimitive3DSequence() const +drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3d::getViewIndependentPrimitive3DContainer() const { // get sequence without object transform - drawinglayer::primitive3d::Primitive3DSequence xRetval(getVIP3DSWithoutObjectTransform()); + drawinglayer::primitive3d::Primitive3DContainer xRetval(getVIP3DSWithoutObjectTransform()); - if(xRetval.hasElements()) + if(!xRetval.empty()) { // add object transform if it's used const basegfx::B3DHomMatrix& rObjectTransform(GetE3dObject().GetTransform()); @@ -167,7 +167,7 @@ drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3d::getViewIndepend rObjectTransform, xRetval)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; } } @@ -180,7 +180,7 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3d::createViewInde // also need to create a 2D embedding when the view-independent part is requested, // see view-dependent part in ViewObjectContactOfE3d::createPrimitive2DSequence // get 3d primitive vector, isPrimitiveVisible() is done in 3d creator - return impCreateWithGivenPrimitive3DSequence(getViewIndependentPrimitive3DSequence()); + return impCreateWithGivenPrimitive3DContainer(getViewIndependentPrimitive3DContainer()); } ViewObjectContact& ViewContactOfE3d::CreateObjectSpecificViewObjectContact(ObjectContact& rObjectContact) diff --git a/svx/source/sdr/contact/viewcontactofe3dcube.cxx b/svx/source/sdr/contact/viewcontactofe3dcube.cxx index 6ace072269fc..d68778029a5f 100644 --- a/svx/source/sdr/contact/viewcontactofe3dcube.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dcube.cxx @@ -40,9 +40,9 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dCube::createViewIndependentPrimitive3DSequence() const + drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3dCube::createViewIndependentPrimitive3DContainer() const { - drawinglayer::primitive3d::Primitive3DSequence xRetval; + drawinglayer::primitive3d::Primitive3DContainer xRetval; const SfxItemSet& rItemSet = GetE3dCubeObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); @@ -81,7 +81,7 @@ namespace sdr const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrCubePrimitive3D( aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; return xRetval; } diff --git a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx index 51d6e6d79b9e..be77f9e1b0e1 100644 --- a/svx/source/sdr/contact/viewcontactofe3dextrude.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dextrude.cxx @@ -40,9 +40,9 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dExtrude::createViewIndependentPrimitive3DSequence() const + drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3dExtrude::createViewIndependentPrimitive3DContainer() const { - drawinglayer::primitive3d::Primitive3DSequence xRetval; + drawinglayer::primitive3d::Primitive3DContainer xRetval; const SfxItemSet& rItemSet = GetE3dExtrudeObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); @@ -76,7 +76,7 @@ namespace sdr aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute, aPolyPolygon, fDepth, fDiagonal, fBackScale, bSmoothNormals, true, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; return xRetval; } diff --git a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx index 4554ffc1f546..e7ffa94f8455 100644 --- a/svx/source/sdr/contact/viewcontactofe3dlathe.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dlathe.cxx @@ -40,9 +40,9 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dLathe::createViewIndependentPrimitive3DSequence() const + drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3dLathe::createViewIndependentPrimitive3DContainer() const { - drawinglayer::primitive3d::Primitive3DSequence xRetval; + drawinglayer::primitive3d::Primitive3DContainer xRetval; const SfxItemSet& rItemSet = GetE3dLatheObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); @@ -91,7 +91,7 @@ namespace sdr aPolyPolygon, nHorizontalSegments, nVerticalSegments, fDiagonal, fBackScale, fRotation, bSmoothNormals, true, bSmoothLids, bCharacterMode, bCloseFront, bCloseBack)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; return xRetval; } diff --git a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx index d646046072f4..ae3f5719dadf 100644 --- a/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dpolygon.cxx @@ -41,9 +41,9 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dPolygon::createViewIndependentPrimitive3DSequence() const + drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3dPolygon::createViewIndependentPrimitive3DContainer() const { - drawinglayer::primitive3d::Primitive3DSequence xRetval; + drawinglayer::primitive3d::Primitive3DContainer xRetval; const SfxItemSet& rItemSet = GetE3dPolygonObj().GetMergedItemSet(); const bool bSuppressFill(GetE3dPolygonObj().GetLineOnly()); const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute( @@ -162,7 +162,7 @@ namespace sdr const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::SdrPolyPolygonPrimitive3D( aPolyPolygon3D, aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; return xRetval; } diff --git a/svx/source/sdr/contact/viewcontactofe3dscene.cxx b/svx/source/sdr/contact/viewcontactofe3dscene.cxx index d3412d6e1a90..fdcc395ab726 100644 --- a/svx/source/sdr/contact/viewcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dscene.cxx @@ -41,8 +41,8 @@ namespace { // pActiveVC is only true if ghosted is still activated and maybe needs to be switched off in this path void createSubPrimitive3DVector( const sdr::contact::ViewContact& rCandidate, - drawinglayer::primitive3d::Primitive3DSequence& o_rAllTarget, - drawinglayer::primitive3d::Primitive3DSequence* o_pVisibleTarget, + drawinglayer::primitive3d::Primitive3DContainer& o_rAllTarget, + drawinglayer::primitive3d::Primitive3DContainer* o_pVisibleTarget, const SetOfByte* pVisibleLayerSet, const bool bTestSelectedVisibility) { @@ -55,8 +55,8 @@ void createSubPrimitive3DVector( if(nChildrenCount) { // provide new collection sequences - drawinglayer::primitive3d::Primitive3DSequence aNewAllTarget; - drawinglayer::primitive3d::Primitive3DSequence aNewVisibleTarget; + drawinglayer::primitive3d::Primitive3DContainer aNewAllTarget; + drawinglayer::primitive3d::Primitive3DContainer aNewVisibleTarget; // add children recursively for(sal_uInt32 a(0L); a < nChildrenCount; a++) @@ -75,12 +75,12 @@ void createSubPrimitive3DVector( aNewAllTarget)); // add created content to all target - drawinglayer::primitive3d::appendPrimitive3DReferenceToPrimitive3DSequence(o_rAllTarget, xReference); + o_rAllTarget.push_back(xReference); // add created content to visible target if exists if(o_pVisibleTarget) { - drawinglayer::primitive3d::appendPrimitive3DReferenceToPrimitive3DSequence(*o_pVisibleTarget, xReference); + o_pVisibleTarget->push_back(xReference); } } } @@ -91,12 +91,12 @@ void createSubPrimitive3DVector( if(pViewContactOfE3d) { - drawinglayer::primitive3d::Primitive3DSequence xPrimitive3DSeq(pViewContactOfE3d->getViewIndependentPrimitive3DSequence()); + drawinglayer::primitive3d::Primitive3DContainer xPrimitive3DSeq(pViewContactOfE3d->getViewIndependentPrimitive3DContainer()); - if(xPrimitive3DSeq.hasElements()) + if(!xPrimitive3DSeq.empty()) { // add to all target vector - drawinglayer::primitive3d::appendPrimitive3DSequenceToPrimitive3DSequence(o_rAllTarget, xPrimitive3DSeq); + o_rAllTarget.append(xPrimitive3DSeq); if(o_pVisibleTarget) { @@ -123,7 +123,7 @@ void createSubPrimitive3DVector( if(bVisible && o_pVisibleTarget) { // add to visible target vector - drawinglayer::primitive3d::appendPrimitive3DSequenceToPrimitive3DSequence(*o_pVisibleTarget, xPrimitive3DSeq); + o_pVisibleTarget->append(xPrimitive3DSeq); } } } @@ -165,7 +165,7 @@ void ViewContactOfE3dScene::createViewInformation3D(const basegfx::B3DRange& rCo // For historical reasons, the outmost scene's transformation is handles as part of the // view transformation. This means that the BoundRect of the contained 3D Objects is // without that transformation and makes it necessary to NOT add the first scene to the - // Primitive3DSequence of contained objects. + // Primitive3DContainer of contained objects. { aTransformation = GetE3dScene().GetTransform(); } @@ -277,8 +277,8 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3dScene::createSce if(nChildrenCount) { // create 3d scene primitive with visible content tested against rLayerVisibility - drawinglayer::primitive3d::Primitive3DSequence aAllSequence; - drawinglayer::primitive3d::Primitive3DSequence aVisibleSequence; + drawinglayer::primitive3d::Primitive3DContainer aAllSequence; + drawinglayer::primitive3d::Primitive3DContainer aVisibleSequence; const bool bTestLayerVisibility(nullptr != pLayerVisibility); const bool bTestSelectedVisibility(GetE3dScene().GetDrawOnlySelected()); const bool bTestVisibility(bTestLayerVisibility || bTestSelectedVisibility); @@ -297,20 +297,19 @@ drawinglayer::primitive2d::Primitive2DContainer ViewContactOfE3dScene::createSce bTestSelectedVisibility); } - const sal_uInt32 nAllSize(aAllSequence.hasElements() ? aAllSequence.getLength() : 0); - const sal_uInt32 nVisibleSize(aVisibleSequence.hasElements() ? aVisibleSequence.getLength() : 0); + const size_t nAllSize(!aAllSequence.empty() ? aAllSequence.size() : 0); + const size_t nVisibleSize(!aVisibleSequence.empty() ? aVisibleSequence.size() : 0); if((bTestVisibility && nVisibleSize) || nAllSize) { - // for getting the 3D range using getB3DRangeFromPrimitive3DSequence a ViewInformation3D + // for getting the 3D range using getB3DRangeFromPrimitive3DContainer a ViewInformation3D // needs to be given for evtl. decompositions. At the same time createViewInformation3D // currently is based on creating the target-ViewInformation3D using a given range. To // get the true range, use a neutral ViewInformation3D here. This leaves all matrices // on identity and the time on 0.0. const uno::Sequence< beans::PropertyValue > aEmptyProperties; const drawinglayer::geometry::ViewInformation3D aNeutralViewInformation3D(aEmptyProperties); - const basegfx::B3DRange aContentRange( - drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence(aAllSequence, aNeutralViewInformation3D)); + const basegfx::B3DRange aContentRange(aAllSequence.getB3DRange(aNeutralViewInformation3D)); // create 2d primitive 3dscene with generated sub-list from collector const drawinglayer::primitive2d::Primitive2DReference xReference( @@ -422,9 +421,9 @@ const drawinglayer::attribute::SdrLightingAttribute& ViewContactOfE3dScene::getS return maSdrLightingAttribute; } -drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dScene::getAllPrimitive3DSequence() const +drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3dScene::getAllPrimitive3DContainer() const { - drawinglayer::primitive3d::Primitive3DSequence aAllPrimitive3DSequence; + drawinglayer::primitive3d::Primitive3DContainer aAllPrimitive3DContainer; const sal_uInt32 nChildrenCount(GetObjectCount()); // add children recursively. Do NOT start with (*this), this would create @@ -433,26 +432,26 @@ drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dScene::getAllPrim // is seen as part of the ViewTransformation (see text in createViewInformation3D) for(sal_uInt32 a(0L); a < nChildrenCount; a++) { - createSubPrimitive3DVector(GetViewContact(a), aAllPrimitive3DSequence, nullptr, nullptr, false); + createSubPrimitive3DVector(GetViewContact(a), aAllPrimitive3DContainer, nullptr, nullptr, false); } - return aAllPrimitive3DSequence; + return aAllPrimitive3DContainer; } basegfx::B3DRange ViewContactOfE3dScene::getAllContentRange3D() const { - const drawinglayer::primitive3d::Primitive3DSequence xAllSequence(getAllPrimitive3DSequence()); + const drawinglayer::primitive3d::Primitive3DContainer xAllSequence(getAllPrimitive3DContainer()); basegfx::B3DRange aAllContentRange3D; - if(xAllSequence.hasElements()) + if(!xAllSequence.empty()) { - // for getting the 3D range using getB3DRangeFromPrimitive3DSequence a ViewInformation3D + // for getting the 3D range using getB3DRangeFromPrimitive3DContainer a ViewInformation3D // needs to be given for evtl. decompositions. Use a neutral ViewInformation3D here. This // leaves all matrices on identity and the time on 0.0. const uno::Sequence< beans::PropertyValue > aEmptyProperties; const drawinglayer::geometry::ViewInformation3D aNeutralViewInformation3D(aEmptyProperties); - aAllContentRange3D = drawinglayer::primitive3d::getB3DRangeFromPrimitive3DSequence(xAllSequence, aNeutralViewInformation3D); + aAllContentRange3D = xAllSequence.getB3DRange(aNeutralViewInformation3D); } return aAllContentRange3D; diff --git a/svx/source/sdr/contact/viewcontactofe3dsphere.cxx b/svx/source/sdr/contact/viewcontactofe3dsphere.cxx index b5f127195bd1..ca2af43f28a7 100644 --- a/svx/source/sdr/contact/viewcontactofe3dsphere.cxx +++ b/svx/source/sdr/contact/viewcontactofe3dsphere.cxx @@ -39,9 +39,9 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewContactOfE3dSphere::createViewIndependentPrimitive3DSequence() const + drawinglayer::primitive3d::Primitive3DContainer ViewContactOfE3dSphere::createViewIndependentPrimitive3DContainer() const { - drawinglayer::primitive3d::Primitive3DSequence xRetval; + drawinglayer::primitive3d::Primitive3DContainer xRetval; const SfxItemSet& rItemSet = GetE3dSphereObj().GetMergedItemSet(); const drawinglayer::attribute::SdrLineFillShadowAttribute3D aAttribute( drawinglayer::primitive2d::createNewSdrLineFillShadowAttribute(rItemSet, false)); @@ -74,7 +74,7 @@ namespace sdr new drawinglayer::primitive3d::SdrSpherePrimitive3D( aWorldTransform, aTextureSize, aAttribute, *pSdr3DObjectAttribute, nHorizontalSegments, nVerticalSegments)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; return xRetval; } diff --git a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx index 3ff49dfe446c..896a56a600a5 100644 --- a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx @@ -39,11 +39,11 @@ namespace sdr { } - drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::createPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const + drawinglayer::primitive3d::Primitive3DContainer ViewObjectContactOfE3d::createPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const { // get the view-independent Primitive from the viewContact const ViewContactOfE3d& rViewContactOfE3d(dynamic_cast< const ViewContactOfE3d& >(GetViewContact())); - drawinglayer::primitive3d::Primitive3DSequence xRetval(rViewContactOfE3d.getViewIndependentPrimitive3DSequence()); + drawinglayer::primitive3d::Primitive3DContainer xRetval(rViewContactOfE3d.getViewIndependentPrimitive3DContainer()); // handle ghosted if(isPrimitiveGhosted(rDisplayInfo)) @@ -58,7 +58,7 @@ namespace sdr xRetval, aBColorModifier)); - xRetval = drawinglayer::primitive3d::Primitive3DSequence(&xReference, 1); + xRetval = { xReference }; } return xRetval; @@ -69,22 +69,22 @@ namespace sdr const ViewContactOfE3d& rViewContact = static_cast< const ViewContactOfE3d& >(GetViewContact()); // get 3d primitive vector, isPrimitiveVisible() is done in 3d creator - return rViewContact.impCreateWithGivenPrimitive3DSequence(getPrimitive3DSequence(rDisplayInfo)); + return rViewContact.impCreateWithGivenPrimitive3DContainer(getPrimitive3DContainer(rDisplayInfo)); } - drawinglayer::primitive3d::Primitive3DSequence ViewObjectContactOfE3d::getPrimitive3DSequence(const DisplayInfo& rDisplayInfo) const + drawinglayer::primitive3d::Primitive3DContainer ViewObjectContactOfE3d::getPrimitive3DContainer(const DisplayInfo& rDisplayInfo) const { - drawinglayer::primitive3d::Primitive3DSequence xNewPrimitive3DSeq(createPrimitive3DSequence(rDisplayInfo)); + drawinglayer::primitive3d::Primitive3DContainer xNewPrimitive3DSeq(createPrimitive3DContainer(rDisplayInfo)); // local up-to-date checks. New list different from local one? - if(!drawinglayer::primitive3d::arePrimitive3DSequencesEqual(mxPrimitive3DSequence, xNewPrimitive3DSeq)) + if(mxPrimitive3DContainer != xNewPrimitive3DSeq) { // has changed, copy content - const_cast< ViewObjectContactOfE3d* >(this)->mxPrimitive3DSequence = xNewPrimitive3DSeq; + const_cast< ViewObjectContactOfE3d* >(this)->mxPrimitive3DContainer = xNewPrimitive3DSeq; } // return current Primitive2DContainer - return mxPrimitive3DSequence; + return mxPrimitive3DContainer; } } // end of namespace contact } // end of namespace sdr |