diff options
Diffstat (limited to 'drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx')
-rw-r--r-- | drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx index 2993b1dd27c3..a7015ff8e578 100644 --- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx @@ -312,26 +312,26 @@ namespace // polygon is closed, one of the points is a member const sal_uInt32 nPointCount(rPoly.count()); - if(nPointCount) - { - basegfx::B2DPoint aCurrent(rPoly.getB2DPoint(0)); - const basegfx::B2DVector aVector(rEnd - rStart); + if(!nPointCount) + return false; - for(sal_uInt32 a(0); a < nPointCount; a++) - { - const sal_uInt32 nNextIndex((a + 1) % nPointCount); - const basegfx::B2DPoint aNext(rPoly.getB2DPoint(nNextIndex)); - const basegfx::B2DVector aEdgeVector(aNext - aCurrent); + basegfx::B2DPoint aCurrent(rPoly.getB2DPoint(0)); + const basegfx::B2DVector aVector(rEnd - rStart); - if(basegfx::utils::findCut( - rStart, aVector, - aCurrent, aEdgeVector) != CutFlagValue::NONE) - { - return true; - } + for(sal_uInt32 a(0); a < nPointCount; a++) + { + const sal_uInt32 nNextIndex((a + 1) % nPointCount); + const basegfx::B2DPoint aNext(rPoly.getB2DPoint(nNextIndex)); + const basegfx::B2DVector aEdgeVector(aNext - aCurrent); - aCurrent = aNext; + if(basegfx::utils::findCut( + rStart, aVector, + aCurrent, aEdgeVector) != CutFlagValue::NONE) + { + return true; } + + aCurrent = aNext; } return false; |