sw/source/core/draw/dcontact.cxx | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
New commits: commit f8da93d33ddadb6f60c385b5ee93a55d303d916f Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Thu Aug 15 08:45:04 2024 +0200 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Thu Aug 15 11:51:05 2024 +0200 Simplify a bit Change-Id: I05a8aa354b68331712768b1d696736d69ce8dacb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171775 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index 4a025ad03b5b..9873143463e5 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -119,21 +119,13 @@ void setContextWritingMode(SdrObject* pObj, SwFrame const * pAnchor) */ SwFrameFormat *FindFrameFormat( SdrObject *pObj ) { - SwFrameFormat* pRetval = nullptr; - if (SwVirtFlyDrawObj* pFlyDrawObj = dynamic_cast<SwVirtFlyDrawObj*>(pObj)) - { - pRetval = pFlyDrawObj->GetFormat(); - } - else - { - SwContact* pContact = GetUserCall(pObj); - if ( pContact ) - { - pRetval = pContact->GetFormat(); - } - } - return pRetval; + return pFlyDrawObj->GetFormat(); + + if (SwContact* pContact = GetUserCall(pObj)) + return pContact->GetFormat(); + + return nullptr; } bool HasWrap( const SdrObject* pObj )