summaryrefslogtreecommitdiff
path: root/sw/source/uibase/frmdlg
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-04-07 11:45:13 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-04-07 14:13:18 +0200
commitd36f7c5bd2115fcdd26ba8ff7b6a0446dea70bd4 (patch)
tree5ae4b15f3302a538ac55d714ba0529ca4c1de87a /sw/source/uibase/frmdlg
parent61d57bcebd1a246603cbcd9ad5e0a7df1a8d66cd (diff)
Revert "long->sal_Int32 in tools/gen.hxx"
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0. As discussed at <https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html> "long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with signed integer overflow, and the original plan was to redo it to consistently use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/> "sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed miserably on Windows, causing odd failures like not writing out Pictures/*.svm streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best approach is to just revert the original commit, at least for now. Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix Library_vclplug_qt5". Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae Reviewed-on: https://gerrit.libreoffice.org/52532 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source/uibase/frmdlg')
-rw-r--r--sw/source/uibase/frmdlg/frmmgr.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx
index 1813fe7e2115..1debb81ca787 100644
--- a/sw/source/uibase/frmdlg/frmmgr.cxx
+++ b/sw/source/uibase/frmdlg/frmmgr.cxx
@@ -516,24 +516,24 @@ void SwFlyFrameAttrMgr::DelAttr( sal_uInt16 nId )
void SwFlyFrameAttrMgr::SetLRSpace( long nLeft, long nRight )
{
- OSL_ENSURE( SAL_MAX_INT32 != nLeft && SAL_MAX_INT32 != nRight, "Which border to set?" );
+ OSL_ENSURE( LONG_MAX != nLeft && LONG_MAX != nRight, "Which border to set?" );
SvxLRSpaceItem aTmp( m_aSet.Get( RES_LR_SPACE ) );
- if( SAL_MAX_INT32 != nLeft )
+ if( LONG_MAX != nLeft )
aTmp.SetLeft( sal_uInt16(nLeft) );
- if( SAL_MAX_INT32 != nRight )
+ if( LONG_MAX != nRight )
aTmp.SetRight( sal_uInt16(nRight) );
m_aSet.Put( aTmp );
}
void SwFlyFrameAttrMgr::SetULSpace( long nTop, long nBottom )
{
- OSL_ENSURE(SAL_MAX_INT32 != nTop && SAL_MAX_INT32 != nBottom, "Which border to set?" );
+ OSL_ENSURE(LONG_MAX != nTop && LONG_MAX != nBottom, "Which border to set?" );
SvxULSpaceItem aTmp( m_aSet.Get( RES_UL_SPACE ) );
- if( SAL_MAX_INT32 != nTop )
+ if( LONG_MAX != nTop )
aTmp.SetUpper( sal_uInt16(nTop) );
- if( SAL_MAX_INT32 != nBottom )
+ if( LONG_MAX != nBottom )
aTmp.SetLower( sal_uInt16(nBottom) );
m_aSet.Put( aTmp );
}
@@ -591,7 +591,7 @@ void SwFlyFrameAttrMgr::SetRotation(sal_uInt16 nOld, sal_uInt16 nNew, const Size
void SwFlyFrameAttrMgr::SetSize( const Size& rSize )
{
SwFormatFrameSize aSize( GetFrameSize() );
- aSize.SetSize(Size(std::max<sal_Int32>(rSize.Width(), MINFLY), std::max<sal_Int32>(rSize.Height(), MINFLY)));
+ aSize.SetSize(Size(std::max(rSize.Width(), long(MINFLY)), std::max(rSize.Height(), long(MINFLY))));
m_aSet.Put( aSize );
}