sw/source/core/unocore/unoobj2.cxx |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

New commits:
commit 2930d1b9c4e58cfb8c8de775b0370a46b7d953e5
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Wed Aug 2 11:58:29 2023 +0200
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Thu Aug 3 14:04:44 2023 +0200

    sw floattable: simplify collecting frames at node with layout
    
    See
    
<https://gerrit.libreoffice.org/c/core/+/155081/2#message-504c4b6d36580e30bf79498a4ca5e37573194dba>,
    one dynamic cast is enough.
    
    (cherry picked from commit f151ba5ebc8662d5459eacb1c5d6f01a4c826f26)
    
    Change-Id: I1f57b1b64fb501e522c949e013160df79ea55094
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155279
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/core/unocore/unoobj2.cxx 
b/sw/source/core/unocore/unoobj2.cxx
index beed66fe5eec..7fcb1255f1cf 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -127,16 +127,12 @@ struct FrameClientSortListLess
 
             if (nAnchorType == RndStdIds::FLY_AT_PARA)
             {
-                SwFlyFrame* pFly = pAnchoredObj->DynCastFlyFrame();
-                if (pFly)
+                auto pFlyAtContentFrame = 
dynamic_cast<SwFlyAtContentFrame*>(pAnchoredObj);
+                if (pFlyAtContentFrame && pFlyAtContentFrame->IsFollow())
                 {
-                    auto pFlyAtContentFrame = pFly->DynCastFlyAtContentFrame();
-                    if (pFlyAtContentFrame && pFlyAtContentFrame->IsFollow())
-                    {
-                        // We're collecting frame formats, ignore non-master 
fly frames to prevent
-                        // duplication.
-                        continue;
-                    }
+                    // We're collecting frame formats, ignore non-master fly 
frames to prevent
+                    // duplication.
+                    continue;
                 }
             }
 

Reply via email to