diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-05 15:56:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-02-06 12:47:32 +0100 |
commit | f9c2bcc8b761f5e21354c0fb7bca6aa432d11ec2 (patch) | |
tree | a40dbc3e6d1b7476ad93cee29f19590103c4e756 /include | |
parent | e1f479af4ddde90f9e80b5079ac759cb9f7743a1 (diff) |
simplify ImpXPolygon
just use a std::vector<std::pair<Point,PolyFlags>>
Change-Id: I85de832af9095a33bda1620781c3b231a345e07c
Reviewed-on: https://gerrit.libreoffice.org/49275
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/xpoly.hxx | 9 | ||||
-rw-r--r-- | include/tools/poly.hxx | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx index 2c6f848d00be..ffc95ab3f4d0 100644 --- a/include/svx/xpoly.hxx +++ b/include/svx/xpoly.hxx @@ -53,7 +53,8 @@ class SVX_DLLPUBLIC XPolygon final static bool CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2); public: - XPolygon( sal_uInt16 nSize=16 ); + XPolygon(); + XPolygon( sal_uInt16 nSize ); XPolygon( const XPolygon& rXPoly ); XPolygon( XPolygon&& rXPoly ); XPolygon( const tools::Polygon& rPoly ); @@ -64,10 +65,8 @@ public: ~XPolygon(); - sal_uInt16 GetSize() const; - - void SetPointCount( sal_uInt16 nPoints ); sal_uInt16 GetPointCount() const; + void SetPointCount( sal_uInt16 nPoints ); void Insert( sal_uInt16 nPos, const Point& rPt, PolyFlags eFlags ); void Insert( sal_uInt16 nPos, const XPolygon& rXPoly ); @@ -81,7 +80,7 @@ public: XPolygon& operator=( XPolygon&& rXPoly ); bool operator==( const XPolygon& rXPoly ) const; - PolyFlags GetFlags( sal_uInt16 nPos ) const; + PolyFlags GetFlags( sal_uInt16 nPos ) const; void SetFlags( sal_uInt16 nPos, PolyFlags eFlags ); bool IsControl(sal_uInt16 nPos) const; bool IsSmooth(sal_uInt16 nPos) const; diff --git a/include/tools/poly.hxx b/include/tools/poly.hxx index 1a0926ecfff3..259aeac21b9c 100644 --- a/include/tools/poly.hxx +++ b/include/tools/poly.hxx @@ -88,6 +88,7 @@ public: Polygon( sal_uInt16 nSize ); Polygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pFlagAry = nullptr ); + Polygon( std::vector< std::pair<Point, PolyFlags> > const & ); Polygon( const tools::Rectangle& rRect ); Polygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound ); |