From da419ab6b28f0a20a62ea7fa13ab97a8ae946899 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 11 Dec 2015 11:53:57 +0200 Subject: loplugin:unreffun fallout from 58d8d8ac67aa9b907f1304a48efa0f7a473d9de4 "tdf#69977: uno::Sequence is expensive" Change-Id: Ib55de090c72dcfd8ad049746b693b383e70e8ca9 --- .../source/primitive2d/baseprimitive2d.cxx | 35 ---------------------- 1 file changed, 35 deletions(-) (limited to 'drawinglayer') diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx index 361cd22df805..3ed8fea21c91 100644 --- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx @@ -111,25 +111,6 @@ namespace drawinglayer namespace primitive2d { // convert helper stl vector of primitives to Primitive2DSequence - Primitive2DSequence Primitive2DContainerToPrimitive2DSequence(const Primitive2DContainer& rSource, bool bInvert) - { - const sal_uInt32 nSize(rSource.size()); - Primitive2DSequence aRetval; - - aRetval.realloc(nSize); - - for(sal_uInt32 a(0); a < nSize; a++) - { - aRetval[bInvert ? nSize - 1 - a : a] = rSource[a]; - } - - // all entries taken over to Uno References as owners. To avoid - // errors with users of this mechanism to delete pointers to BasePrimitive2D - // itself, clear given vector - const_cast< Primitive2DContainer& >(rSource).clear(); - - return aRetval; - } Primitive2DContainer Primitive2DContainer::maybeInvert(bool bInvert) const { const sal_uInt32 nSize(size()); @@ -193,22 +174,6 @@ namespace drawinglayer return aRetval; } - basegfx::B2DRange getB2DRangeFromPrimitive2DSequence(const Primitive2DContainer& rCandidate, const geometry::ViewInformation2D& aViewInformation) - { - basegfx::B2DRange aRetval; - - if(!rCandidate.empty()) - { - const sal_Int32 nCount(rCandidate.size()); - - for(sal_Int32 a(0L); a < nCount; a++) - { - aRetval.expand(getB2DRangeFromPrimitive2DReference(rCandidate[a], aViewInformation)); - } - } - - return aRetval; - } bool arePrimitive2DReferencesEqual(const Primitive2DReference& rxA, const Primitive2DReference& rxB) { -- cgit