sw/source/core/draw/dcontact.cxx | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
New commits: commit 1668111a2969201d17c75d0e8c7a8e47e0c7d01c Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Aug 13 19:30:48 2020 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Fri Aug 14 12:17:25 2020 +0200 rework this to make it more readable no logic change intended Change-Id: I755de2e37bec3843500920476fc23f013103f976 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100685 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 028e6b3df807..5384426f6e61 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -1831,14 +1831,20 @@ void SwDrawContact::ConnectToLayout( const SwFormatAnchor* pAnch ) { // append drawing object, if // (1) proposed anchor frame isn't a follow and + const bool bFollow = pFrame->IsContentFrame() && static_cast<SwContentFrame*>(pFrame)->IsFollow(); + if (bFollow) + continue; + // (2) drawing object isn't a control object to be anchored // in header/footer. - bool bAdd = ( !pFrame->IsContentFrame() || - !static_cast<SwContentFrame*>(pFrame)->IsFollow() ) && - ( !::CheckControlLayer( GetMaster() ) || - !pFrame->FindFooterOrHeader() ); + const bool bControlInHF = ::CheckControlLayer(GetMaster()) && pFrame->FindFooterOrHeader(); + if (bControlInHF) + continue; - if (bAdd && RndStdIds::FLY_AT_FLY != pAnch->GetAnchorId()) + bool bAdd; + if (RndStdIds::FLY_AT_FLY == pAnch->GetAnchorId()) + bAdd = true; + else { assert(pFrame->IsTextFrame()); bAdd = IsAnchoredObjShown(*static_cast<SwTextFrame*>(pFrame), *pAnch); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits