diff options
author | Noel Grandin <noel@peralex.com> | 2016-02-02 16:15:51 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-02-08 06:08:14 +0000 |
commit | b14224fe97b8a44232c9c1401d3a49771f46582e (patch) | |
tree | 8f9cf31cf4b51a0edbb43022499a6acd17d0945d /svx | |
parent | c474e610e453d0f38f7cc6cb9559ad7e7b5d69ca (diff) |
loplugin:unusedmethods
using an idea from dtardon:
<dtardon> noelgrandin, hi. could you try to run the unusedmethods clang
plugin with "make build-nocheck"? that would catch functions that are
only used in tests. e.g., i just removed the whole o3tl::range class,
which has not been used in many years, but htere was a test for it...
<noelgrandin> dtardon, interesting idea! Sure, I can do that.
Change-Id: I5653953a426a2186a1e43017212d87ffce520387
Reviewed-on: https://gerrit.libreoffice.org/22041
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/xpolyimp.hxx | 2 | ||||
-rw-r--r-- | svx/source/svdraw/svdlayer.cxx | 23 | ||||
-rw-r--r-- | svx/source/svdraw/svdmark.cxx | 26 | ||||
-rw-r--r-- | svx/source/xoutdev/_xpoly.cxx | 14 |
4 files changed, 0 insertions, 65 deletions
diff --git a/svx/inc/xpolyimp.hxx b/svx/inc/xpolyimp.hxx index a72981b23a06..64b6085ad12a 100644 --- a/svx/inc/xpolyimp.hxx +++ b/svx/inc/xpolyimp.hxx @@ -68,8 +68,6 @@ public: ImpXPolyPolygon() { nRefCount = 1; } ImpXPolyPolygon( const ImpXPolyPolygon& rImpXPolyPoly ); ~ImpXPolyPolygon(); - - bool operator==(const ImpXPolyPolygon& rImpXPolyPoly) const; }; diff --git a/svx/source/svdraw/svdlayer.cxx b/svx/source/svdraw/svdlayer.cxx index 7a7ae7790d79..f74cbb92bc03 100644 --- a/svx/source/svdraw/svdlayer.cxx +++ b/svx/source/svdraw/svdlayer.cxx @@ -43,14 +43,6 @@ void SetOfByte::operator&=(const SetOfByte& r2ndSet) } } -void SetOfByte::operator|=(const SetOfByte& r2ndSet) -{ - for(sal_uInt16 i(0); i < 32; i++) - { - aData[i] |= r2ndSet.aData[i]; - } -} - /** initialize this set with a uno sequence of sal_Int8 */ void SetOfByte::PutValue( const css::uno::Any & rAny ) @@ -182,21 +174,6 @@ const SdrLayerAdmin& SdrLayerAdmin::operator=(const SdrLayerAdmin& rSrcLayerAdmi return *this; } -bool SdrLayerAdmin::operator==(const SdrLayerAdmin& rCmpLayerAdmin) const -{ - if (pParent!=rCmpLayerAdmin.pParent || - aLayer.size()!=rCmpLayerAdmin.aLayer.size()) - return false; - bool bOk = true; - sal_uInt16 nCount=GetLayerCount(); - sal_uInt16 i=0; - while (bOk && i<nCount) { - bOk=*GetLayer(i)==*rCmpLayerAdmin.GetLayer(i); - i++; - } - return bOk; -} - void SdrLayerAdmin::SetModel(SdrModel* pNewModel) { if (pNewModel!=pModel) { diff --git a/svx/source/svdraw/svdmark.cxx b/svx/source/svdraw/svdmark.cxx index a17bc051e037..fc2ad8828119 100644 --- a/svx/source/svdraw/svdmark.cxx +++ b/svx/source/svdraw/svdmark.cxx @@ -195,32 +195,6 @@ SdrMark& SdrMark::operator=(const SdrMark& rMark) return *this; } -bool SdrMark::operator==(const SdrMark& rMark) const -{ - bool bRet(mpSelectedSdrObject == rMark.mpSelectedSdrObject && mpPageView == rMark.mpPageView && mbCon1 == rMark.mbCon1 && mbCon2 == rMark.mbCon2 && mnUser == rMark.mnUser); - - if((mpPoints != nullptr) != (rMark.mpPoints != nullptr)) - bRet = false; - - if((mpLines != nullptr) != (rMark.mpLines != nullptr)) - bRet = false; - - if((mpGluePoints != nullptr) != (rMark.mpGluePoints != nullptr)) - bRet = false; - - if(bRet && mpPoints && *mpPoints != *rMark.mpPoints) - bRet = false; - - if(bRet && mpLines && *mpLines != *rMark.mpLines) - bRet = false; - - if(bRet && mpGluePoints && *mpGluePoints != *rMark.mpGluePoints) - bRet = false; - - return bRet; -} - - static bool ImpSdrMarkListSorter(SdrMark* const& lhs, SdrMark* const& rhs) { diff --git a/svx/source/xoutdev/_xpoly.cxx b/svx/source/xoutdev/_xpoly.cxx index 3bdea7ef5a4e..881b6af78fad 100644 --- a/svx/source/xoutdev/_xpoly.cxx +++ b/svx/source/xoutdev/_xpoly.cxx @@ -897,20 +897,6 @@ ImpXPolyPolygon::~ImpXPolyPolygon() aXPolyList.clear(); } -bool ImpXPolyPolygon::operator==(const ImpXPolyPolygon& rImpXPolyPoly) const -{ - size_t nCount = aXPolyList.size(); - const XPolygonList& rCmpList = rImpXPolyPoly.aXPolyList; - if ( nCount != rCmpList.size() ) return false; - bool bEq=true; - for ( size_t i = nCount; i > 0 && bEq; ) - { - i--; - bEq = ( *aXPolyList[ i ] == *rCmpList[ i ] ); - } - return bEq; -} - XPolyPolygon::XPolyPolygon( sal_uInt16 /*nInitSize*/, sal_uInt16 /*nResize*/ ) { pImpXPolyPolygon = new ImpXPolyPolygon(); |