basegfx/inc/basegfx/polygon/b2dpolygontools.hxx | 10 -- basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx | 27 ------- basegfx/source/polygon/b2dpolygontools.cxx | 37 ---------- basegfx/source/polygon/b2dpolypolygontools.cxx | 26 ------- svl/inc/svl/listeneriter.hxx | 7 - svl/source/notify/listeneriter.cxx | 74 -------------------- unusedcode.easy | 9 -- 7 files changed, 190 deletions(-)
New commits: commit af79fcb204efeafb48659ed4a97433b7e2cc2f84 Author: Elton Chung <el...@layerjet.com> Date: Sun Feb 19 15:41:32 2012 +0800 Remove unused code diff --git a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx index d86abb3..1bee9b3 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolygontools.hxx @@ -130,12 +130,6 @@ namespace basegfx // if 0.0 it is calculated using getLength(...) BASEGFX_DLLPUBLIC B2DPolygon getSnippetAbsolute(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLength = 0.0); - // get a snippet from given polygon for relative distances. The polygon is assumed - // to be opened (not closed). fFrom and fTo need to be in range [0.0 .. 1.0], where - // fTo >= fFrom. If length is given, it is assumed the correct polygon length, - // if 0.0 it is calculated using getLength(...) - BASEGFX_DLLPUBLIC B2DPolygon getSnippetRelative(const B2DPolygon& rCandidate, double fFrom = 0.0, double fTo = 1.0, double fLength = 0.0); - // Continuity check for point with given index BASEGFX_DLLPUBLIC B2VectorContinuity getContinuityInPoint(const B2DPolygon& rCandidate, sal_uInt32 nIndex); @@ -351,10 +345,6 @@ namespace basegfx // by several trivial sub-segments BASEGFX_DLLPUBLIC B2DPolygon createSimplifiedPolygon(const B2DPolygon&); - // calculate the distance to the given endless ray and return. The relative position on the edge is returned in Cut. - // That position may be less than 0.0 or more than 1.0 - BASEGFX_DLLPUBLIC double getDistancePointToEndlessRay(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut); - // calculate the smallest distance to given edge and return. The relative position on the edge is returned in Cut. // That position is in the range [0.0 .. 1.0] and the returned distance is adapted accordingly to the start or end // point of the edge diff --git a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx index 37d2cb5..6962596 100644 --- a/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx +++ b/basegfx/inc/basegfx/polygon/b2dpolypolygontools.hxx @@ -78,19 +78,6 @@ namespace basegfx // in bWithBorder flag. It is assumed that the orientations of the given polygon are correct. BASEGFX_DLLPUBLIC bool isInside(const B2DPolyPolygon& rCandidate, const B2DPoint& rPoint, bool bWithBorder = false); - /** get range of PolyPolygon. Control points are included. - - For detailed description look at getRangeWithControlPoints(const B2DPolygon&). - This method just expands by the range of every sub-Polygon. - - @param rCandidate - The B2DPolyPolygon eventually containing bezier segments - - @return - The outer range including control points - */ - BASEGFX_DLLPUBLIC B2DRange getRangeWithControlPoints(const B2DPolyPolygon& rCandidate); - /** Get the range of a polyPolygon For detailed description look at getRange(const B2DPolygon&). @@ -241,20 +228,6 @@ namespace basegfx // #i76891# Try to remove existing curve segments if they are simply edges BASEGFX_DLLPUBLIC B2DPolyPolygon simplifyCurveSegments(const B2DPolyPolygon& rCandidate); - /** split each edge of a polyPolygon in exactly nSubEdges equidistant edges - - @param rCandidate - The source polyPolygon. If too small (no edges), nSubEdges too small (<2) - or neither bHandleCurvedEdgesnor bHandleStraightEdges it will just be returned. - Else for each edge nSubEdges will be created. Closed state is preserved. - - @param nSubEdges - @param bHandleCurvedEdges - @param bHandleStraightEdges - Please take a look at reSegmentPolygonEdges description, these are the same. - */ - BASEGFX_DLLPUBLIC B2DPolyPolygon reSegmentPolyPolygonEdges(const B2DPolyPolygon& rCandidate, sal_uInt32 nSubEdges, bool bHandleCurvedEdges, bool bHandleStraightEdges); - ////////////////////////////////////////////////////////////////////// // comparators with tolerance for 2D PolyPolygons BASEGFX_DLLPUBLIC bool equal(const B2DPolyPolygon& rCandidateA, const B2DPolyPolygon& rCandidateB, const double& rfSmallValue); diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx index c8d2b37..2104a53 100644 --- a/basegfx/source/polygon/b2dpolygontools.cxx +++ b/basegfx/source/polygon/b2dpolygontools.cxx @@ -978,19 +978,6 @@ namespace basegfx } } - B2DPolygon getSnippetRelative(const B2DPolygon& rCandidate, double fFrom, double fTo, double fLength) - { - // get length if not given - if(fTools::equalZero(fLength)) - { - fLength = getLength(rCandidate); - } - - // multiply distances with real length to get absolute position and - // use getSnippetAbsolute - return getSnippetAbsolute(rCandidate, fFrom * fLength, fTo * fLength, fLength); - } - CutFlagValue findCut( const B2DPolygon& rCandidate, sal_uInt32 nIndex1, sal_uInt32 nIndex2, @@ -2499,30 +2486,6 @@ namespace basegfx return aRetval; } - double getDistancePointToEndlessRay(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut) - { - if(rPointA.equal(rPointB)) - { - rCut = 0.0; - const B2DVector aVector(rTestPoint - rPointA); - return aVector.getLength(); - } - else - { - // get the relative cut value on line vector (Vector1) for cut with perpendicular through TestPoint - const B2DVector aVector1(rPointB - rPointA); - const B2DVector aVector2(rTestPoint - rPointA); - const double fDividend((aVector2.getX() * aVector1.getX()) + (aVector2.getY() * aVector1.getY())); - const double fDivisor((aVector1.getX() * aVector1.getX()) + (aVector1.getY() * aVector1.getY())); - - rCut = fDividend / fDivisor; - - const B2DPoint aCutPoint(rPointA + rCut * aVector1); - const B2DVector aVector(rTestPoint - aCutPoint); - return aVector.getLength(); - } - } - double getSmallestDistancePointToEdge(const B2DPoint& rPointA, const B2DPoint& rPointB, const B2DPoint& rTestPoint, double& rCut) { if(rPointA.equal(rPointB)) diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx index e372f72..c49f6a8 100644 --- a/basegfx/source/polygon/b2dpolypolygontools.cxx +++ b/basegfx/source/polygon/b2dpolypolygontools.cxx @@ -238,20 +238,6 @@ namespace basegfx } } - B2DRange getRangeWithControlPoints(const B2DPolyPolygon& rCandidate) - { - B2DRange aRetval; - const sal_uInt32 nPolygonCount(rCandidate.count()); - - for(sal_uInt32 a(0L); a < nPolygonCount; a++) - { - B2DPolygon aCandidate = rCandidate.getB2DPolygon(a); - aRetval.expand(tools::getRangeWithControlPoints(aCandidate)); - } - - return aRetval; - } - B2DRange getRange(const B2DPolyPolygon& rCandidate) { B2DRange aRetval; @@ -526,18 +512,6 @@ namespace basegfx } } - B2DPolyPolygon reSegmentPolyPolygonEdges(const B2DPolyPolygon& rCandidate, sal_uInt32 nSubEdges, bool bHandleCurvedEdges, bool bHandleStraightEdges) - { - B2DPolyPolygon aRetval; - - for(sal_uInt32 a(0L); a < rCandidate.count(); a++) - { - aRetval.append(reSegmentPolygonEdges(rCandidate.getB2DPolygon(a), nSubEdges, bHandleCurvedEdges, bHandleStraightEdges)); - } - - return aRetval; - } - ////////////////////////////////////////////////////////////////////// // comparators with tolerance for 2D PolyPolygons diff --git a/unusedcode.easy b/unusedcode.easy index b982690..b4778fd 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -639,17 +639,13 @@ basegfx::tools::findCut(basegfx::B2DPolygon const&, unsigned int, basegfx::B2DPo basegfx::tools::findCut(basegfx::B2DPolygon const&, unsigned int, unsigned int, unsigned short, double*, double*) basegfx::tools::getArea(basegfx::B3DPolygon const&) basegfx::tools::getCutBetweenLineAndPolygon(basegfx::B3DPolygon const&, basegfx::B3DPoint const&, basegfx::B3DPoint const&, double&) -basegfx::tools::getDistancePointToEndlessRay(basegfx::B2DPoint const&, basegfx::B2DPoint const&, basegfx::B2DPoint const&, double&) basegfx::tools::getIndexOfPredecessor(unsigned int, basegfx::B3DPolygon const&) basegfx::tools::getPositionRelative(basegfx::B3DPolygon const&, double, double) basegfx::tools::getPositiveOrientedNormal(basegfx::B3DPolygon const&) -basegfx::tools::getRangeWithControlPoints(basegfx::B2DPolyPolygon const&) -basegfx::tools::getSnippetRelative(basegfx::B2DPolygon const&, double, double, double) basegfx::tools::isInEpsilonRange(basegfx::B3DPolygon const&, basegfx::B3DPoint const&, double) basegfx::tools::isInside(basegfx::B3DPolygon const&, basegfx::B3DPolygon const&, bool) basegfx::tools::isPolyPolygonEqualRectangle(basegfx::B2DPolyPolygon const&, basegfx::B2DRange const&) basegfx::tools::liangBarskyClip2D(basegfx::B2DPoint&, basegfx::B2DPoint&, basegfx::B2DRange const&) -basegfx::tools::reSegmentPolyPolygonEdges(basegfx::B2DPolyPolygon const&, unsigned int, bool, bool) basegfx::tools::rotateAroundPoint(basegfx::B2DPolyPolygon const&, basegfx::B2DPoint const&, double) basegfx::tools::setContinuity(basegfx::B2DPolyPolygon const&, basegfx::B2VectorContinuity) basegfx::tools::solveCrossovers(basegfx::B2DPolygon const&) commit cae6ca15d6327a7ff0471c7b15dbefcdc86b0e8c Author: Elton Chung <el...@layerjet.com> Date: Sun Feb 19 14:58:41 2012 +0800 Remove unused code diff --git a/svl/inc/svl/listeneriter.hxx b/svl/inc/svl/listeneriter.hxx index 0dcdec8..5959bb1 100644 --- a/svl/inc/svl/listeneriter.hxx +++ b/svl/inc/svl/listeneriter.hxx @@ -48,7 +48,6 @@ class SVL_DLLPUBLIC SvtListenerIter // at the same time. static SvtListenerIter *pListenerIters; SvtListenerIter *pNxtIter; - TypeId aSrchId; // fuer First/Next - suche diesen Type SVL_DLLPRIVATE static void RemoveListener( SvtListenerBase& rDel, SvtListenerBase* pNext ); @@ -61,18 +60,12 @@ public: SvtBroadcaster& GetBroadcaster() { return rRoot; } SvtListener* GoNext(); // to the next - SvtListener* GoPrev(); // to the previous SvtListener* GoStart(); // to the start of the list - SvtListener* GoEnd(); // to the end of the list - SvtListener* GoRoot(); // to the root SvtListener* GetCurr() const; // returns the current int IsChanged() const { return pDelNext != pAkt; } - - SvtListener* First( TypeId nType ); - SvtListener* Next(); }; diff --git a/svl/source/notify/listeneriter.cxx b/svl/source/notify/listeneriter.cxx index 846189d..edce9e9 100644 --- a/svl/source/notify/listeneriter.cxx +++ b/svl/source/notify/listeneriter.cxx @@ -96,18 +96,6 @@ SvtListener* SvtListenerIter::GoNext() return pAkt ? pAkt->GetListener() : 0; } - -SvtListener* SvtListenerIter::GoPrev() -{ - if( pDelNext == pAkt ) - pAkt = pAkt->GetLeft(); - else - pAkt = pDelNext->GetLeft(); - pDelNext = pAkt; - return pAkt ? pAkt->GetListener() : 0; -} - - SvtListener* SvtListenerIter::GoStart() // zum Anfang des Baums { pAkt = rRoot.pRoot; @@ -118,68 +106,6 @@ SvtListener* SvtListenerIter::GoStart() // zum Anfang des Baums return pAkt ? pAkt->GetListener() : 0; } - -SvtListener* SvtListenerIter::GoEnd() // zum End des Baums -{ - pAkt = pDelNext; - if( !pAkt ) - pAkt = rRoot.pRoot; - if( pAkt ) - while( pAkt->GetRight() ) - pAkt = pAkt->GetRight(); - pDelNext = pAkt; - return pAkt ? pAkt->GetListener() : 0; -} - - - -SvtListener* SvtListenerIter::First( TypeId nType ) -{ - aSrchId = nType; - GoStart(); - if( pAkt ) - do { - if( pAkt->GetListener()->IsA( aSrchId ) ) - break; - - if( pDelNext == pAkt ) - { - pAkt = pAkt->GetRight(); - pDelNext = pAkt; - } - else - pAkt = pDelNext; - - } while( pAkt ); - return pAkt ? pAkt->GetListener() : 0; -} - - -SvtListener* SvtListenerIter::Next() -{ - do { - // erstmal zum naechsten - if( pDelNext == pAkt ) - { - pAkt = pAkt->GetRight(); - pDelNext = pAkt; - } - else - pAkt = pDelNext; - - if( pAkt && pAkt->GetListener()->IsA( aSrchId ) ) - break; - } while( pAkt ); - return pAkt ? pAkt->GetListener() : 0; -} - - -SvtListener* SvtListenerIter::GoRoot() // wieder ab Root anfangen -{ - pDelNext = pAkt = rRoot.pRoot; - return pAkt ? pAkt->GetListener() : 0; -} - SvtListener* SvtListenerIter::GetCurr() const // returns the current { return pDelNext ? pDelNext->GetListener() : 0; diff --git a/unusedcode.easy b/unusedcode.easy index fc86475..b982690 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -252,11 +252,6 @@ SvpSalInstance::CancelEvent(SalFrame const*, void*, unsigned short) SvtBroadcaster::Forward(SvtBroadcaster&, SfxHint const&) SvtIconChoiceCtrl::SvtIconChoiceCtrl(Window*, ResId const&) SvtIconWindow_Impl::GetSelectedIconText() const -SvtListenerIter::First(void* (*)()) -SvtListenerIter::GoEnd() -SvtListenerIter::GoPrev() -SvtListenerIter::GoRoot() -SvtListenerIter::Next() SvtScriptedTextHelper::GetText() const SvtScriptedTextHelper::GetTextHeight() const SvtScriptedTextHelper::GetTextWidth() const _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits