diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2020-11-23 21:37:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-11-24 07:10:29 +0100 |
commit | 5ca88c4a1a97b95c829f6c7c570c4e5219e80e2e (patch) | |
tree | 2c66640aafc90448d32908a7c40960a21e596122 /svx/source/svdraw | |
parent | 356006712320c524515a959a022a0f2b02fa63bb (diff) |
static_cast after dynamic_cast
Change-Id: I196d4e9065961d6f4e3fef4475dd5f406e998447
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106451
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r-- | svx/source/svdraw/svdview.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index f266478927b8..f591334dea08 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -506,10 +506,9 @@ SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) co tools::Rectangle aBoundRect(pHitObj->GetCurrentBoundRect()); // Force to SnapRect when Fontwork - if( dynamic_cast<const SdrTextObj*>( pHitObj) != nullptr && static_cast<SdrTextObj*>(pHitObj)->IsFontwork()) - { - aBoundRect = pHitObj->GetSnapRect(); - } + if( auto pTextObj = dynamic_cast<const SdrTextObj*>(pHitObj) ) + if( pTextObj->IsFontwork() ) + aBoundRect = pHitObj->GetSnapRect(); sal_Int32 nTolerance(mnHitTolLog); bool bBoundRectHit(false); |