summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/headless/svpframe.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx
index 20876ef2ff0a..0f6da8d2872f 100644
--- a/vcl/headless/svpframe.cxx
+++ b/vcl/headless/svpframe.cxx
@@ -18,6 +18,7 @@
*/
#include <comphelper/lok.hxx>
+#include <o3tl/safeint.hxx>
#include <vcl/syswin.hxx>
#include <sal/log.hxx>
@@ -237,17 +238,17 @@ void SvpSalFrame::SetPosSize( long nX, long nY, long nWidth, long nHeight, sal_u
if( (nFlags & SAL_FRAME_POSSIZE_WIDTH) != 0 )
{
maGeometry.nWidth = nWidth;
- if( m_nMaxWidth > 0 && maGeometry.nWidth > static_cast<unsigned int>(m_nMaxWidth) )
+ if( m_nMaxWidth > 0 && maGeometry.nWidth > o3tl::make_unsigned(m_nMaxWidth) )
maGeometry.nWidth = m_nMaxWidth;
- if( m_nMinWidth > 0 && maGeometry.nWidth < static_cast<unsigned int>(m_nMinWidth) )
+ if( m_nMinWidth > 0 && maGeometry.nWidth < o3tl::make_unsigned(m_nMinWidth) )
maGeometry.nWidth = m_nMinWidth;
}
if( (nFlags & SAL_FRAME_POSSIZE_HEIGHT) != 0 )
{
maGeometry.nHeight = nHeight;
- if( m_nMaxHeight > 0 && maGeometry.nHeight > static_cast<unsigned int>(m_nMaxHeight) )
+ if( m_nMaxHeight > 0 && maGeometry.nHeight > o3tl::make_unsigned(m_nMaxHeight) )
maGeometry.nHeight = m_nMaxHeight;
- if( m_nMinHeight > 0 && maGeometry.nHeight < static_cast<unsigned int>(m_nMinHeight) )
+ if( m_nMinHeight > 0 && maGeometry.nHeight < o3tl::make_unsigned(m_nMinHeight) )
maGeometry.nHeight = m_nMinHeight;
}
#ifndef IOS