svx/source/customshapes/EnhancedCustomShapeFontWork.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit db4d4bac22d73e93729261739cda06382883b8f8 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Oct 25 14:40:49 2017 +0100 ofz#3801 Divide-by-zero Change-Id: Ibb2f3e5508899541bc201240a7e9d5f26c750fa5 Reviewed-on: https://gerrit.libreoffice.org/43843 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index dc5693d0ff71..9d4faa31e5aa 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -691,6 +691,11 @@ void FitTextOutlinesToShapeOutlines( const tools::PolyPolygon& aOutlines2d, FWDa double fAngle = atan2( -fvx, -fvy ); double fL = hypot( fvx, fvy ); + if (fL == 0.0) + { + SAL_WARN("svx", "FitTextOutlinesToShapeOutlines div-by-zero, abandon fit"); + break; + } fvx = fvx / fL; fvy = fvy / fL; fL = aTextAreaIter->aBoundRect.GetHeight() / 2.0 + aTextAreaIter->aBoundRect.Top() - aParagraphIter->aBoundRect.Center().Y();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits