[Libreoffice-commits] core.git: 4 commits - basegfx/source include/basegfx unusedcode.easy

Miklos Vajna vmiklos at collabora.co.uk
Tue Apr 22 10:09:58 PDT 2014


 basegfx/source/polygon/b2dpolygontools.cxx      |   44 ------------------------
 basegfx/source/polygon/b2dpolypolygontools.cxx  |   18 ---------
 basegfx/source/polygon/b3dpolygontools.cxx      |   26 --------------
 basegfx/source/tools/canvastools.cxx            |   14 -------
 include/basegfx/numeric/ftools.hxx              |   11 ------
 include/basegfx/polygon/b2dpolygontools.hxx     |    4 --
 include/basegfx/polygon/b2dpolypolygontools.hxx |    5 --
 include/basegfx/polygon/b3dpolygontools.hxx     |    4 --
 include/basegfx/tools/canvastools.hxx           |    4 --
 unusedcode.easy                                 |    4 --
 10 files changed, 134 deletions(-)

New commits:
commit ff05b6b10094de3e27f9d200c0ccdbb2f6cc76c5
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Apr 22 19:07:02 2014 +0200

    Remove unused basegfx::tools::equal
    
    Change-Id: I2fb3121c711dfdd1e2081681864a6f4753960a81

diff --git a/basegfx/source/polygon/b2dpolygontools.cxx b/basegfx/source/polygon/b2dpolygontools.cxx
index 0e6b2b9..709a2f1 100644
--- a/basegfx/source/polygon/b2dpolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolygontools.cxx
@@ -3133,50 +3133,6 @@ namespace basegfx
             return aRetval;
         }
 
-
-        // comparators with tolerance for 2D Polygons
-
-        bool equal(const B2DPolygon& rCandidateA, const B2DPolygon& rCandidateB, const double& rfSmallValue)
-        {
-            const sal_uInt32 nPointCount(rCandidateA.count());
-
-            if(nPointCount != rCandidateB.count())
-                return false;
-
-            const bool bClosed(rCandidateA.isClosed());
-
-            if(bClosed != rCandidateB.isClosed())
-                return false;
-
-            const bool bAreControlPointsUsed(rCandidateA.areControlPointsUsed());
-
-            if(bAreControlPointsUsed != rCandidateB.areControlPointsUsed())
-                return false;
-
-            for(sal_uInt32 a(0); a < nPointCount; a++)
-            {
-                const B2DPoint aPoint(rCandidateA.getB2DPoint(a));
-
-                if(!aPoint.equal(rCandidateB.getB2DPoint(a), rfSmallValue))
-                    return false;
-
-                if(bAreControlPointsUsed)
-                {
-                    const basegfx::B2DPoint aPrev(rCandidateA.getPrevControlPoint(a));
-
-                    if(!aPrev.equal(rCandidateB.getPrevControlPoint(a), rfSmallValue))
-                        return false;
-
-                    const basegfx::B2DPoint aNext(rCandidateA.getNextControlPoint(a));
-
-                    if(!aNext.equal(rCandidateB.getNextControlPoint(a), rfSmallValue))
-                        return false;
-                }
-            }
-
-            return true;
-        }
-
         // snap points of horizontal or vertical edges to discrete values
         B2DPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolygon& rCandidate)
         {
diff --git a/basegfx/source/polygon/b3dpolygontools.cxx b/basegfx/source/polygon/b3dpolygontools.cxx
index 4dd7734..f3e42700c 100644
--- a/basegfx/source/polygon/b3dpolygontools.cxx
+++ b/basegfx/source/polygon/b3dpolygontools.cxx
@@ -734,32 +734,6 @@ namespace basegfx
             return false;
         }
 
-
-        // comparators with tolerance for 3D Polygons
-
-        bool equal(const B3DPolygon& rCandidateA, const B3DPolygon& rCandidateB, const double& rfSmallValue)
-        {
-            const sal_uInt32 nPointCount(rCandidateA.count());
-
-            if(nPointCount != rCandidateB.count())
-                return false;
-
-            const bool bClosed(rCandidateA.isClosed());
-
-            if(bClosed != rCandidateB.isClosed())
-                return false;
-
-            for(sal_uInt32 a(0); a < nPointCount; a++)
-            {
-                const B3DPoint aPoint(rCandidateA.getB3DPoint(a));
-
-                if(!aPoint.equal(rCandidateB.getB3DPoint(a), rfSmallValue))
-                    return false;
-            }
-
-            return true;
-        }
-
         // snap points of horizontal or vertical edges to discrete values
         B3DPolygon snapPointsOfHorizontalOrVerticalEdges(const B3DPolygon& rCandidate)
         {
diff --git a/include/basegfx/polygon/b2dpolygontools.hxx b/include/basegfx/polygon/b2dpolygontools.hxx
index 8fadce0..04f20d2d 100644
--- a/include/basegfx/polygon/b2dpolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolygontools.hxx
@@ -422,10 +422,6 @@ namespace basegfx
         */
         BASEGFX_DLLPUBLIC B2DPolygon createWaveline(const B2DPolygon& rCandidate, double fWaveWidth, double fWaveHeight);
 
-
-        // comparators with tolerance for 2D Polygons
-        BASEGFX_DLLPUBLIC bool equal(const B2DPolygon& rCandidateA, const B2DPolygon& rCandidateB, const double& rfSmallValue);
-
         /** snap some polygon coordinates to discrete coordinates
 
             This method allows to snap some polygon points to discrete (integer) values
diff --git a/include/basegfx/polygon/b3dpolygontools.hxx b/include/basegfx/polygon/b3dpolygontools.hxx
index 46198d3..0068515 100644
--- a/include/basegfx/polygon/b3dpolygontools.hxx
+++ b/include/basegfx/polygon/b3dpolygontools.hxx
@@ -113,10 +113,6 @@ namespace basegfx
         // and a line given by start and end point
         BASEGFX_DLLPUBLIC bool getCutBetweenLineAndPlane(const B3DVector& rPlaneNormal, const B3DPoint& rPlanePoint, const B3DPoint& rEdgeStart, const B3DPoint& rEdgeEnd, double& fCut);
 
-
-        // comparators with tolerance for 3D Polygons
-        BASEGFX_DLLPUBLIC bool equal(const B3DPolygon& rCandidateA, const B3DPolygon& rCandidateB, const double& rfSmallValue);
-
         /** snap some polygon coordinates to discrete coordinates
 
             This method allows to snap some polygon points to discrete (integer) values
diff --git a/unusedcode.easy b/unusedcode.easy
index 2b13857..3de349d 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -184,8 +184,6 @@ apitest::XText::testInsertRemoveTextContent()
 apitest::XTextContent::testAttach()
 apitest::XTextContent::testGetAnchor()
 apitest::XTextField::testGetPresentation()
-basegfx::tools::equal(basegfx::B2DPolygon const&, basegfx::B2DPolygon const&, double const&)
-basegfx::tools::equal(basegfx::B3DPolygon const&, basegfx::B3DPolygon const&, double const&)
 canvas::createSurfaceProxyManager(boost::shared_ptr<canvas::IRenderModule> const&)
 chart::opengl3D::Line::Line(unsigned int)
 chart::opengl3D::Rectangle::Rectangle(unsigned int)
commit 1d28f42838f6396f610d6a6d42eef8d3de6cf40f
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Apr 22 18:50:02 2014 +0200

    Remove unused basegfx::unotools::homMatrixFromMatrix
    
    Change-Id: I92afab7cfae885dce76b9ffff0d98b8b9a39d85f

diff --git a/basegfx/source/tools/canvastools.cxx b/basegfx/source/tools/canvastools.cxx
index a08a177..01f4e7d 100644
--- a/basegfx/source/tools/canvastools.cxx
+++ b/basegfx/source/tools/canvastools.cxx
@@ -391,20 +391,6 @@ namespace basegfx
             return output;
         }
 
-        ::basegfx::B2DHomMatrix& homMatrixFromMatrix( ::basegfx::B2DHomMatrix&  output,
-                                                      const geometry::Matrix2D& input )
-        {
-            // ensure last row is [0,0,1] (and optimized away)
-            output.identity();
-
-            output.set(0,0, input.m00);
-            output.set(0,1, input.m01);
-            output.set(1,0, input.m10);
-            output.set(1,1, input.m11);
-
-            return output;
-        }
-
         geometry::RealSize2D size2DFromB2DSize( const ::basegfx::B2DVector& rVec )
         {
             return geometry::RealSize2D( rVec.getX(),
diff --git a/include/basegfx/tools/canvastools.hxx b/include/basegfx/tools/canvastools.hxx
index 08ccb23..c678805 100644
--- a/include/basegfx/tools/canvastools.hxx
+++ b/include/basegfx/tools/canvastools.hxx
@@ -135,10 +135,6 @@ namespace basegfx
             matrixFromHomMatrix( ::com::sun::star::geometry::Matrix2D& matrix,
                                  const ::basegfx::B2DHomMatrix&        transform);
 
-        BASEGFX_DLLPUBLIC ::basegfx::B2DHomMatrix&
-            homMatrixFromMatrix( ::basegfx::B2DHomMatrix&                    transform,
-                                 const ::com::sun::star::geometry::Matrix2D& matrix );
-
         // Geometry conversions
 
 
diff --git a/unusedcode.easy b/unusedcode.easy
index 6da3715..2b13857 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -186,7 +186,6 @@ apitest::XTextContent::testGetAnchor()
 apitest::XTextField::testGetPresentation()
 basegfx::tools::equal(basegfx::B2DPolygon const&, basegfx::B2DPolygon const&, double const&)
 basegfx::tools::equal(basegfx::B3DPolygon const&, basegfx::B3DPolygon const&, double const&)
-basegfx::unotools::homMatrixFromMatrix(basegfx::B2DHomMatrix&, com::sun::star::geometry::Matrix2D const&)
 canvas::createSurfaceProxyManager(boost::shared_ptr<canvas::IRenderModule> const&)
 chart::opengl3D::Line::Line(unsigned int)
 chart::opengl3D::Rectangle::Rectangle(unsigned int)
commit 34fa29ed4c0fa73d3e07e62cb6ca2577ee115b35
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Apr 22 18:30:03 2014 +0200

    Remove unused basegfx::tools::containsOnlyHorizontalAndVerticalEdges
    
    Change-Id: I8a8b7a5b47cd9e566c1b3154a527c78a8fcbd7df

diff --git a/basegfx/source/polygon/b2dpolypolygontools.cxx b/basegfx/source/polygon/b2dpolypolygontools.cxx
index 35bc6ed..f904d64 100644
--- a/basegfx/source/polygon/b2dpolypolygontools.cxx
+++ b/basegfx/source/polygon/b2dpolypolygontools.cxx
@@ -497,24 +497,6 @@ namespace basegfx
             return aRetval;
         }
 
-        bool containsOnlyHorizontalAndVerticalEdges(const B2DPolyPolygon& rCandidate)
-        {
-            if(rCandidate.areControlPointsUsed())
-            {
-                return false;
-            }
-
-            for(sal_uInt32 a(0); a < rCandidate.count(); a++)
-            {
-                if(!containsOnlyHorizontalAndVerticalEdges(rCandidate.getB2DPolygon(a)))
-                {
-                    return false;
-                }
-            }
-
-            return true;
-        }
-
         B2DPolyPolygon createSevenSegmentPolyPolygon(sal_Char nNumber, bool bLitSegments)
         {
             // config here
diff --git a/include/basegfx/polygon/b2dpolypolygontools.hxx b/include/basegfx/polygon/b2dpolypolygontools.hxx
index e92fe5a..c21489a 100644
--- a/include/basegfx/polygon/b2dpolypolygontools.hxx
+++ b/include/basegfx/polygon/b2dpolypolygontools.hxx
@@ -287,11 +287,6 @@ namespace basegfx
         */
         BASEGFX_DLLPUBLIC B2DPolyPolygon snapPointsOfHorizontalOrVerticalEdges(const B2DPolyPolygon& rCandidate);
 
-        /** returns true if the Polygon only contains horizontal or vertical edges
-            so that it could be represented by RegionBands
-        */
-        BASEGFX_DLLPUBLIC bool containsOnlyHorizontalAndVerticalEdges(const B2DPolyPolygon& rCandidate);
-
         /// converters for com::sun::star::drawing::PointSequence
         BASEGFX_DLLPUBLIC B2DPolyPolygon UnoPointSequenceSequenceToB2DPolyPolygon(
             const com::sun::star::drawing::PointSequenceSequence& rPointSequenceSequenceSource,
diff --git a/unusedcode.easy b/unusedcode.easy
index 696482c..6da3715 100644
--- a/unusedcode.easy
+++ b/unusedcode.easy
@@ -184,7 +184,6 @@ apitest::XText::testInsertRemoveTextContent()
 apitest::XTextContent::testAttach()
 apitest::XTextContent::testGetAnchor()
 apitest::XTextField::testGetPresentation()
-basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon const&)
 basegfx::tools::equal(basegfx::B2DPolygon const&, basegfx::B2DPolygon const&, double const&)
 basegfx::tools::equal(basegfx::B3DPolygon const&, basegfx::B3DPolygon const&, double const&)
 basegfx::unotools::homMatrixFromMatrix(basegfx::B2DHomMatrix&, com::sun::star::geometry::Matrix2D const&)
commit 81bce2dc7e55dba5314b9388d6eb803aa998091a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Apr 22 17:36:50 2014 +0200

    Remove unused basegfx::copySign
    
    Change-Id: I8e5e429b0f0b0cfa2dc65b8e57649bfa722b40e0

diff --git a/include/basegfx/numeric/ftools.hxx b/include/basegfx/numeric/ftools.hxx
index 5477b36..b4ae0a4 100644
--- a/include/basegfx/numeric/ftools.hxx
+++ b/include/basegfx/numeric/ftools.hxx
@@ -148,17 +148,6 @@ namespace basegfx
      */
     BASEGFX_DLLPUBLIC double snapToNearestMultiple(double v, const double fStep);
 
-    /** return fValue with the sign of fSignCarrier, thus evtl. changed
-    */
-    inline double copySign(double fValue, double fSignCarrier)
-    {
-#ifdef WNT
-        return _copysign(fValue, fSignCarrier);
-#else
-        return copysign(fValue, fSignCarrier);
-#endif
-    }
-
     class BASEGFX_DLLPUBLIC fTools
     {
     public:


More information about the Libreoffice-commits mailing list