filter/source/graphicfilter/icgm/actimpr.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit e39245e2c5000241078a557d3b49da254da7effd Author: Caolán McNamara <[email protected]> Date: Fri Dec 22 09:18:30 2017 +0000 ofz#4715 Integer-overflow Change-Id: I0ad24024db97e5e0aa9bed0d52f72f6fb6590513 Reviewed-on: https://gerrit.libreoffice.org/46954 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx index 9a0762905bab..7c382906fe0c 100644 --- a/filter/source/graphicfilter/icgm/actimpr.cxx +++ b/filter/source/graphicfilter/icgm/actimpr.cxx @@ -20,6 +20,7 @@ #include <sal/config.h> #include <o3tl/any.hxx> +#include <o3tl/safeint.hxx> #include <vcl/bitmapex.hxx> #include <com/sun/star/drawing/XDrawPagesSupplier.hpp> #include <com/sun/star/drawing/LineStyle.hpp> @@ -719,14 +720,14 @@ void CGMImpressOutAct::DrawText( awt::Point const & rTextPos, awt::Size const & { case TAV_HALF : { - aTextPos.Y -= static_cast<sal_Int32>( ( mpCGM->pElement->nCharacterHeight * 1.5 ) / 2 ); + aTextPos.Y = o3tl::saturating_add(aTextPos.X, static_cast<sal_Int32>((mpCGM->pElement->nCharacterHeight * -1.5) / 2)); } break; case TAV_BASE : case TAV_BOTTOM : case TAV_NORMAL : - aTextPos.Y -= static_cast<sal_Int32>( mpCGM->pElement->nCharacterHeight * 1.5 ); + aTextPos.Y = o3tl::saturating_add(aTextPos.Y, static_cast<sal_Int32>(mpCGM->pElement->nCharacterHeight * -1.5)); break; case TAV_TOP : break;
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
