Kaydet (Commit) 52ce5239 authored tarafından Michael Stahl's avatar Michael Stahl

vcl: assert when LogicToPixel overflows

Change-Id: I86d1c3e0c177c671b280c05b47312c79389884ed
üst d288ee63
......@@ -2177,7 +2177,7 @@ void SwRootFrm::CheckViewLayout( const SwViewOption* pViewOpt, const SwRect* pVi
pSh->SetFirstVisPageInvalid();
if (bOldCallbackActionEnabled)
{
pSh->InvalidateWindows( SwRect( 0, 0, LONG_MAX, LONG_MAX ) );
pSh->InvalidateWindows( SwRect( 0, 0, INT_MAX, INT_MAX ) );
pSh->GetDoc()->GetDocShell()->Broadcast(SfxSimpleHint(SFX_HINT_DOCCHANGED));
}
}
......
......@@ -381,6 +381,8 @@ static long ImplLogicToPixel( long n, long nDPI, long nMapNum, long nMapDenom,
}
}
else
#else
assert(n < std::numeric_limits<long>::max() / nMapNum); //detect overflows
#endif
{
sal_Int64 n64 = n;
......
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