summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/ssfrm.cxx
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/core/layout/ssfrm.cxx
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/core/layout/ssfrm.cxx')
-rw-r--r--sw/source/core/layout/ssfrm.cxx28
1 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 5242c953c828..8fceca4e8bd9 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -33,24 +33,24 @@
#include <hints.hxx>
// No inline cause we need the function pointers
-sal_Int32 SwFrame::GetTopMargin() const
+long SwFrame::GetTopMargin() const
{ return getFramePrintArea().Top(); }
-sal_Int32 SwFrame::GetBottomMargin() const
+long SwFrame::GetBottomMargin() const
{ return getFrameArea().Height() -getFramePrintArea().Height() -getFramePrintArea().Top(); }
-sal_Int32 SwFrame::GetLeftMargin() const
+long SwFrame::GetLeftMargin() const
{ return getFramePrintArea().Left(); }
-sal_Int32 SwFrame::GetRightMargin() const
+long SwFrame::GetRightMargin() const
{ return getFrameArea().Width() - getFramePrintArea().Width() - getFramePrintArea().Left(); }
-sal_Int32 SwFrame::GetPrtLeft() const
+long SwFrame::GetPrtLeft() const
{ return getFrameArea().Left() + getFramePrintArea().Left(); }
-sal_Int32 SwFrame::GetPrtBottom() const
+long SwFrame::GetPrtBottom() const
{ return getFrameArea().Top() + getFramePrintArea().Height() + getFramePrintArea().Top(); }
-sal_Int32 SwFrame::GetPrtRight() const
+long SwFrame::GetPrtRight() const
{ return getFrameArea().Left() + getFramePrintArea().Width() + getFramePrintArea().Left(); }
-sal_Int32 SwFrame::GetPrtTop() const
+long SwFrame::GetPrtTop() const
{ return getFrameArea().Top() + getFramePrintArea().Top(); }
-bool SwFrame::SetMinLeft( sal_Int32 nDeadline )
+bool SwFrame::SetMinLeft( long nDeadline )
{
SwTwips nDiff = nDeadline - getFrameArea().Left();
if( nDiff > 0 )
@@ -66,7 +66,7 @@ bool SwFrame::SetMinLeft( sal_Int32 nDeadline )
return false;
}
-bool SwFrame::SetMaxBottom( sal_Int32 nDeadline )
+bool SwFrame::SetMaxBottom( long nDeadline )
{
SwTwips nDiff = getFrameArea().Top() + getFrameArea().Height() - nDeadline;
if( nDiff > 0 )
@@ -82,7 +82,7 @@ bool SwFrame::SetMaxBottom( sal_Int32 nDeadline )
return false;
}
-bool SwFrame::SetMaxRight( sal_Int32 nDeadline )
+bool SwFrame::SetMaxRight( long nDeadline )
{
SwTwips nDiff = getFrameArea().Left() + getFrameArea().Width() - nDeadline;
if( nDiff > 0 )
@@ -162,21 +162,21 @@ void SwFrame::MakeRightPos( const SwFrame* pUp, const SwFrame* pPrv, bool bNotif
}
}
-void SwFrame::SetTopBottomMargins( sal_Int32 nTop, sal_Int32 nBot )
+void SwFrame::SetTopBottomMargins( long nTop, long nBot )
{
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Top( nTop );
aPrt.Height( getFrameArea().Height() - nTop - nBot );
}
-void SwFrame::SetLeftRightMargins( sal_Int32 nLeft, sal_Int32 nRight)
+void SwFrame::SetLeftRightMargins( long nLeft, long nRight)
{
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left( nLeft );
aPrt.Width( getFrameArea().Width() - nLeft - nRight );
}
-void SwFrame::SetRightLeftMargins( sal_Int32 nRight, sal_Int32 nLeft)
+void SwFrame::SetRightLeftMargins( long nRight, long nLeft)
{
SwFrameAreaDefinition::FramePrintAreaWriteAccess aPrt(*this);
aPrt.Left( nLeft );