[Libreoffice-commits] core.git: drawinglayer/source include/drawinglayer
Noel Grandin
noel at peralex.com
Fri Dec 11 01:56:35 PST 2015
drawinglayer/source/primitive2d/baseprimitive2d.cxx | 35 -------------------
include/drawinglayer/primitive2d/baseprimitive2d.hxx | 3 -
2 files changed, 38 deletions(-)
New commits:
commit da419ab6b28f0a20a62ea7fa13ab97a8ae946899
Author: Noel Grandin <noel at peralex.com>
Date: Fri Dec 11 11:53:57 2015 +0200
loplugin:unreffun
fallout from 58d8d8ac67aa9b907f1304a48efa0f7a473d9de4
"tdf#69977: uno::Sequence is expensive"
Change-Id: Ib55de090c72dcfd8ad049746b693b383e70e8ca9
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 361cd22..3ed8fea 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)
{
diff --git a/include/drawinglayer/primitive2d/baseprimitive2d.hxx b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
index c21c59c..850fd2e 100644
--- a/include/drawinglayer/primitive2d/baseprimitive2d.hxx
+++ b/include/drawinglayer/primitive2d/baseprimitive2d.hxx
@@ -284,9 +284,6 @@ namespace drawinglayer
/// get B2DRange from a given Primitive2DReference
basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DReference(const Primitive2DReference& rCandidate, const geometry::ViewInformation2D& aViewInformation);
- /// get B2DRange from a given Primitive2DSequence
- basegfx::B2DRange DRAWINGLAYER_DLLPUBLIC getB2DRangeFromPrimitive2DSequence(const Primitive2DSequence& rCandidate, const geometry::ViewInformation2D& aViewInformation);
-
/** compare two Primitive2DReferences for equality, including trying to get implementations (BasePrimitive2D)
and using compare operator
*/
More information about the Libreoffice-commits
mailing list