diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-02-20 18:54:13 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-02-21 20:07:46 +0100 |
commit | e07d741b61ddc8b13046ce6ea0c0921ce046a0cf (patch) | |
tree | 0e7f665fbdf0bce287ca69215edb4f9b2defba3a /tools | |
parent | 34627ad7d03f93b89689b2e48a3985574d10f965 (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 'tools')
-rw-r--r-- | tools/inc/poly.h | 1 | ||||
-rw-r--r-- | tools/source/generic/poly.cxx | 22 |
2 files changed, 0 insertions, 23 deletions
diff --git a/tools/inc/poly.h b/tools/inc/poly.h index 3c7b0c923465..88da80ca1615 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -35,7 +35,6 @@ public: ImplPolygon() : mnPoints(0) {} ImplPolygon( sal_uInt16 nInitSize, bool bFlags = false ); ImplPolygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pInitFlags ); - ImplPolygon( std::vector< std::pair<Point, PolyFlags> > const & ); ImplPolygon( const ImplPolygon& rImplPoly ); ImplPolygon( const tools::Rectangle& rRect ); ImplPolygon( const tools::Rectangle& rRect, sal_uInt32 nHorzRound, sal_uInt32 nVertRound); diff --git a/tools/source/generic/poly.cxx b/tools/source/generic/poly.cxx index b88c411a927b..3c78b5a04bc8 100644 --- a/tools/source/generic/poly.cxx +++ b/tools/source/generic/poly.cxx @@ -100,24 +100,6 @@ ImplPolygon::ImplPolygon( sal_uInt16 nInitSize, const Point* pInitAry, const Pol mnPoints = nInitSize; } -ImplPolygon::ImplPolygon( std::vector< std::pair<Point, PolyFlags> > const & rPointsAndFlags ) -{ - auto nInitSize = rPointsAndFlags.size(); - if ( nInitSize ) - { - mxPointAry.reset(new Point[nInitSize]); - mxFlagAry.reset(new PolyFlags[nInitSize]); - int i = 0; - for (auto const & rPair : rPointsAndFlags) { - mxPointAry[i] = rPair.first; - mxFlagAry[i] = rPair.second; - ++i; - } - } - - mnPoints = nInitSize; -} - ImplPolygon::ImplPolygon( const tools::Rectangle& rRect ) { if ( !rRect.IsEmpty() ) @@ -886,10 +868,6 @@ Polygon::Polygon( sal_uInt16 nPoints, const Point* pPtAry, const PolyFlags* pFla { } -Polygon::Polygon( std::vector< std::pair<Point, PolyFlags> > const & rPointsAndFlags ) : mpImplPolygon(ImplPolygon(rPointsAndFlags)) -{ -} - Polygon::Polygon( const tools::Polygon& rPoly ) : mpImplPolygon(rPoly.mpImplPolygon) { } |