sw/source/core/layout/ftnfrm.cxx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
New commits: commit 2b8b6ced7c67e6a56f06b02e92f0555a796f3b16 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Mon Oct 16 20:05:42 2023 +0300 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Mon Oct 16 20:41:05 2023 +0200 Simplify a bit Change-Id: Ic621da194d92e3a4202c47ec4828272e8102a146 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158061 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 78d25949c91b..4baed772787b 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -2558,9 +2558,9 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const if( pBody ) { SwRectFnSet aRectFnSet(this); + nRet = aRectFnSet.GetHeight(pBody->getFrameArea()); if( IsInSct() ) { - nRet = 0; SwTwips nTmp = aRectFnSet.YDiff( aRectFnSet.GetPrtTop(*pBody), aRectFnSet.GetTop(getFrameArea()) ); const SwSectionFrame* pSect = FindSctFrame(); @@ -2594,12 +2594,11 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const } } } - if( nTmp < nRet ) - nRet = nTmp; + if( nTmp < 0 ) + nRet += nTmp; } else - nRet = - aRectFnSet.GetHeight(pPg->getFramePrintArea())/5; - nRet += aRectFnSet.GetHeight(pBody->getFrameArea()); + nRet -= aRectFnSet.GetHeight(pPg->getFramePrintArea())/5; if( nRet < 0 ) nRet = 0; }