diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-04-14 12:26:03 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-04-15 10:17:00 +0200 |
commit | 0ba7674c7389db8f1cf7eb089dc1c89ed93be778 (patch) | |
tree | 58ac91883f992ba093ff704e60c994345dab18c1 /filter | |
parent | 21121b0cba765958f38176ba17be85b6bc3bcb58 (diff) |
ofz: Timeout 23s->4s
Change-Id: I10d48584e0ab0ce52cabe8077602f557b6392492
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133012
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/graphicfilter/icgm/class4.cxx | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/filter/source/graphicfilter/icgm/class4.cxx b/filter/source/graphicfilter/icgm/class4.cxx index 4ef817844570..af66ff26ae09 100644 --- a/filter/source/graphicfilter/icgm/class4.cxx +++ b/filter/source/graphicfilter/icgm/class4.cxx @@ -276,29 +276,21 @@ void CGM::ImplDoClass4() if ( mbFigure ) mpOutAct->CloseRegion(); - sal_uInt16 nPoints = 0; - std::unique_ptr<Point[]> pPoints(new Point[ 0x4000 ]); - + std::vector<Point> aPoints; tools::PolyPolygon aPolyPolygon; FloatPoint aFloatPoint; - sal_uInt32 nEdgeFlag; + while ( mnParaSize < mnElementSize ) { ImplGetPoint( aFloatPoint, true ); - nEdgeFlag = ImplGetUI16(); - pPoints[ nPoints++ ] = Point( static_cast<tools::Long>(aFloatPoint.X), static_cast<tools::Long>(aFloatPoint.Y) ); + sal_uInt32 nEdgeFlag = ImplGetUI16(); + aPoints.push_back(Point(static_cast<tools::Long>(aFloatPoint.X), static_cast<tools::Long>(aFloatPoint.Y))); if ( ( nEdgeFlag & 2 ) || ( mnParaSize == mnElementSize ) ) { - tools::Polygon aPolygon( nPoints ); - for ( sal_uInt16 i = 0; i < nPoints; i++ ) - { - aPolygon.SetPoint( pPoints[ i ], i ); - } - aPolyPolygon.Insert( aPolygon ); - nPoints = 0; + aPolyPolygon.Insert(tools::Polygon(aPoints.size(), aPoints.data())); + aPoints.clear(); } } - pPoints.reset(); mpOutAct->DrawPolyPolygon( aPolyPolygon ); } break; |