summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/core/layout/pagechg.cxx2
-rw-r--r--vcl/source/outdev/map.cxx2
2 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/core/layout/pagechg.cxx b/sw/source/core/layout/pagechg.cxx
index f04216834771..43ed48e85ba1 100644
--- a/sw/source/core/layout/pagechg.cxx
+++ b/sw/source/core/layout/pagechg.cxx
@@ -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));
}
}
diff --git a/vcl/source/outdev/map.cxx b/vcl/source/outdev/map.cxx
index b8bc6c5b05a1..51174717f221 100644
--- a/vcl/source/outdev/map.cxx
+++ b/vcl/source/outdev/map.cxx
@@ -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;