Kaydet (Commit) e39245e2 authored tarafından Caolán McNamara's avatar Caolán McNamara

ofz#4715 Integer-overflow

Change-Id: I0ad24024db97e5e0aa9bed0d52f72f6fb6590513
Reviewed-on: https://gerrit.libreoffice.org/46954Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 5f4a49d7
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment