diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-06 13:00:06 +0500 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-04-06 16:09:54 +0200 |
commit | 07f287c58ca4bae4bdc641cc9139f9aaaff24374 (patch) | |
tree | ed54de01830d3b190ae72089e22ac97b3788a3c6 /sw/source | |
parent | 38ed8100872913c64941927bba665e4bd1a44c12 (diff) |
Simplify a bit
Change-Id: I4bfe875d0484bf77472301f9dea3fc4c6dacdbf4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165852
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/calcmove.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
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 ); } |