sw/source/core/layout/calcmove.cxx | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
New commits: commit 07f287c58ca4bae4bdc641cc9139f9aaaff24374 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sat Apr 6 13:00:06 2024 +0500 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sat Apr 6 16:09:54 2024 +0200 Simplify a bit Change-Id: I4bfe875d0484bf77472301f9dea3fc4c6dacdbf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165852 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/layout/calcmove.cxx b/sw/source/core/layout/calcmove.cxx index e13fdf012143..428c1defe8c2 100644 --- a/sw/source/core/layout/calcmove.cxx +++ b/sw/source/core/layout/calcmove.cxx @@ -1312,7 +1312,7 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) // #i28701# - move master forward, if it has to move, // because of its object positioning. - if ( !static_cast<SwTextFrame*>(this)->IsFollow() ) + if (!IsFollow()) { sal_uInt32 nToPageNum = 0; const bool bMoveFwdByObjPos = SwLayouter::FrameMovedFwdByObjPos( @@ -1333,17 +1333,15 @@ void SwContentFrame::MakeAll(vcl::RenderContext* /*pRenderContext*/) MoveFwd( bMakePage, false ); } } - - // If a Follow sits next to its Master and doesn't fit, we know it can - // be moved right now. - if ( lcl_Prev( this ) && static_cast<SwTextFrame*>(this)->IsFollow() && IsMoveable() ) + else if (auto* prev = lcl_Prev(this); prev && IsMoveable()) { + // If a Follow sits next to its Master and doesn't fit, we know it can be moved right now. bMovedFwd = true; // If follow frame is in table, its master will be the last in the // current table cell. Thus, invalidate the printing area of the master. if ( IsInTab() ) { - lcl_Prev( this )->InvalidatePrt(); + prev->InvalidatePrt(); } MoveFwd( bMakePage, false ); }