summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/tabfrm.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-13 09:45:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-13 10:34:24 +0200
commitc93cdd4e2416c81ccc4b90fd96421d7e45cecd70 (patch)
tree7be3b0f61ffb1900ea3be238d1849be02fcb1bc6 /sw/source/core/layout/tabfrm.cxx
parente360269e8e217359e131ca4ae33a5668a2efab78 (diff)
static_cast after dynamic_cast
Change-Id: If1194bd3364fef8b2d0c26c22854745d0fb7b412 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/layout/tabfrm.cxx')
-rw-r--r--sw/source/core/layout/tabfrm.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 288ac0e760c8..103f8260037a 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2746,9 +2746,8 @@ bool SwTabFrame::CalcFlyOffsets( SwTwips& rUpper,
for ( size_t i = 0; i < pPage->GetSortedObjs()->size(); ++i )
{
SwAnchoredObject* pAnchoredObj = (*pPage->GetSortedObjs())[i];
- if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
+ if ( auto pFly = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) )
{
- SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
const SwRect aFlyRect = pFly->GetObjRectWithSpaces();
// #i26945# - correction of conditions,
// if Writer fly frame has to be considered:
@@ -4868,9 +4867,8 @@ static bool lcl_ArrangeLowers( SwLayoutFrame *pLay, long lYStart, bool bInva )
default: break;
}
}
- if ( dynamic_cast< const SwFlyFrame *>( pAnchoredObj ) != nullptr )
+ if ( auto pFly = dynamic_cast<SwFlyFrame *>( pAnchoredObj ) )
{
- SwFlyFrame *pFly = static_cast<SwFlyFrame*>(pAnchoredObj);
// OD 2004-05-18 #i28701# - no direct move of objects,
// which are anchored to-paragraph/to-character, if