[Libreoffice-commits] core.git: sw/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Aug 14 10:18:09 UTC 2020
sw/source/core/draw/dcontact.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 1668111a2969201d17c75d0e8c7a8e47e0c7d01c
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Aug 13 19:30:48 2020 +0100
Commit: Caolán McNamara <caolanm at 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 <caolanm at 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);
More information about the Libreoffice-commits
mailing list