sw/source/core/doc/doclay.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
New commits: commit 1ad8f52476ee49f6a9d542cecd4e35e23146924b Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Sun Jan 14 19:44:36 2024 +0600 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Sun Jan 14 16:28:46 2024 +0100 Simplify a bit Change-Id: I68a094d99dee8b2e99b96e6e2ae675fe12174dc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162046 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx index ebbefd9738bd..fd2efff24893 100644 --- a/sw/source/core/doc/doclay.cxx +++ b/sw/source/core/doc/doclay.cxx @@ -553,12 +553,10 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso, const SwSortedObjs &rObjs = *pPage->GetSortedObjs(); for(SwAnchoredObject* pAnchoredObj : rObjs) { - SwFrameFormat *pFly; - if (bDrawAlso || pAnchoredObj->DynCastFlyFrame()) - pFly = pAnchoredObj->GetFrameFormat(); - else + if (!bDrawAlso && !pAnchoredObj->DynCastFlyFrame()) continue; + SwFrameFormat* pFly = pAnchoredObj->GetFrameFormat(); const SwFormatAnchor& rAnchor = pFly->GetAnchor(); if ((RndStdIds::FLY_AT_PARA != rAnchor.GetAnchorId()) && (RndStdIds::FLY_AT_FLY != rAnchor.GetAnchorId()) &&