diff options
author | Pascal Junck <pjunck@openoffice.org> | 2004-11-03 10:15:48 +0000 |
---|---|---|
committer | Pascal Junck <pjunck@openoffice.org> | 2004-11-03 10:15:48 +0000 |
commit | dcbf01a0178a2f4545fb40f634746d88ee33505f (patch) | |
tree | ffc37d7aef8bd10e51205e4f35b3b1de7895a9bb /vcl/source/glyphs | |
parent | 641a704381557148da94a584cecec1de7c1f3f7f (diff) |
INTEGRATION: CWS aw019 (1.108.6); FILE MERGED
2004/10/21 16:00:12 aw 1.108.6.1: #i34831#
Diffstat (limited to 'vcl/source/glyphs')
-rw-r--r-- | vcl/source/glyphs/gcach_ftyp.cxx | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/vcl/source/glyphs/gcach_ftyp.cxx b/vcl/source/glyphs/gcach_ftyp.cxx index 7e8cd13809d8..5498e05210e1 100644 --- a/vcl/source/glyphs/gcach_ftyp.cxx +++ b/vcl/source/glyphs/gcach_ftyp.cxx @@ -2,9 +2,9 @@ * * $RCSfile: gcach_ftyp.cxx,v $ * - * $Revision: 1.108 $ + * $Revision: 1.109 $ * - * last change: $Author: hr $ $Date: 2004-10-13 08:53:31 $ + * last change: $Author: pjunck $ $Date: 2004-11-03 11:15:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1881,6 +1881,27 @@ void PolyArgs::ClosePolygon() DBG_ASSERT( (mpFlagAry[mnPoints]==POLY_NORMAL), "FTGlyphOutline: PolyFinishFS failed!" ); Polygon aPoly( mnPoints, mpPointAry, (bHasOffline ? mpFlagAry : NULL) ); + + // #i35928# + // This may be a invalid polygons, e.g. the last point is a control point. + // So close the polygon (and add the first point again) if the last point + // is a control point or different from first + const sal_uInt16 nPolySize(aPoly.GetSize()); + if(nPolySize) + { + if((aPoly.HasFlags() && POLY_CONTROL == aPoly.GetFlags(nPolySize - 1)) + || (aPoly.GetPoint(nPolySize - 1) != aPoly.GetPoint(0))) + { + aPoly.SetSize(nPolySize + 1); + aPoly.SetPoint(aPoly.GetPoint(nPolySize - 1), nPolySize); + + if(aPoly.HasFlags()) + { + aPoly.SetFlags(nPolySize, aPoly.GetFlags(nPolySize - 1)); + } + } + } + mrPolyPoly.Insert( aPoly ); mnPoints = 0; bHasOffline = false; |