summaryrefslogtreecommitdiff
path: root/include/svx/xpoly.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-02-20 18:54:13 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-02-21 20:07:46 +0100
commite07d741b61ddc8b13046ce6ea0c0921ce046a0cf (patch)
tree0e7f665fbdf0bce287ca69215edb4f9b2defba3a /include/svx/xpoly.hxx
parent34627ad7d03f93b89689b2e48a3985574d10f965 (diff)
Revert "simplify ImpXPolygon"
This reverts commit f9c2bcc8b761f5e21354c0fb7bca6aa432d11ec2. Drawing all sorts of curves and polygons in Draw causes various crashes in svx/source/svdraw/svdopath.cxx, apparently because in the past ImpXPolygon's pPointAry had a "buffer" of more elements (nSize) than it had nPoints, and the code heavily relied on that, assigning to such excess elements of pPointAry past nPoints (and presumably calling XPolygon::SetPointCount later?). Conflicts: svx/source/xoutdev/_xpoly.cxx (Reverted the mostly, if not completely, automatic changes there done by 924c0e34fdc36cd44100dafc2c68656ce32374e6 "loplugin:changetoolsgen in svx"; they will need to be re-done.) Change-Id: I6cb41fd218c3bdd0b3bbeb45f5b3d68649901a48 Reviewed-on: https://gerrit.libreoffice.org/50057 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/svx/xpoly.hxx')
-rw-r--r--include/svx/xpoly.hxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/svx/xpoly.hxx b/include/svx/xpoly.hxx
index ffc95ab3f4d0..2c6f848d00be 100644
--- a/include/svx/xpoly.hxx
+++ b/include/svx/xpoly.hxx
@@ -53,8 +53,7 @@ class SVX_DLLPUBLIC XPolygon final
static bool CheckAngles(sal_uInt16& nStart, sal_uInt16 nEnd, sal_uInt16& nA1, sal_uInt16& nA2);
public:
- XPolygon();
- XPolygon( sal_uInt16 nSize );
+ XPolygon( sal_uInt16 nSize=16 );
XPolygon( const XPolygon& rXPoly );
XPolygon( XPolygon&& rXPoly );
XPolygon( const tools::Polygon& rPoly );
@@ -65,8 +64,10 @@ 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 );
@@ -80,7 +81,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;