diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-07 13:55:06 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-11-09 07:31:24 +0100 |
commit | 5ba447bdcd13ba3d7c27c8609f207910227e4ab6 (patch) | |
tree | 9a59e7058ef40be90867518590e35abb6c0615f5 /svx/source/stbctrls/pszctrl.cxx | |
parent | ea4a47d7d442d5d897cfa3a6e9f09ce3f1f233c5 (diff) |
new loplugin simplifydynamiccast
simplify dynamic_cast followed by static_cast
Change-Id: I965afcf05d1675094cfde53d3590a0fd00f26279
Reviewed-on: https://gerrit.libreoffice.org/44460
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/stbctrls/pszctrl.cxx')
-rw-r--r-- | svx/source/stbctrls/pszctrl.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/stbctrls/pszctrl.cxx b/svx/source/stbctrls/pszctrl.cxx index 1ad57366f88a..334670aabb11 100644 --- a/svx/source/stbctrls/pszctrl.cxx +++ b/svx/source/stbctrls/pszctrl.cxx @@ -299,24 +299,24 @@ void SvxPosSizeStatusBarControl::StateChanged( sal_uInt16 nSID, SfxItemState eSt SAL_WARN( "svx.stbcrtls","unknown slot id"); } } - else if ( dynamic_cast<const SfxPointItem*>( pState) != nullptr ) + else if ( auto pPointItem = dynamic_cast<const SfxPointItem*>( pState) ) { // show position - pImpl->aPos = static_cast<const SfxPointItem*>(pState)->GetValue(); + pImpl->aPos = pPointItem->GetValue(); pImpl->bPos = true; pImpl->bTable = false; } - else if ( dynamic_cast<const SvxSizeItem*>( pState) != nullptr ) + else if ( auto pSizeItem = dynamic_cast<const SvxSizeItem*>( pState) ) { // show size - pImpl->aSize = static_cast<const SvxSizeItem*>(pState)->GetSize(); + pImpl->aSize = pSizeItem->GetSize(); pImpl->bSize = true; pImpl->bTable = false; } - else if ( dynamic_cast<const SfxStringItem*>( pState) != nullptr ) + else if ( auto pStringItem = dynamic_cast<const SfxStringItem*>( pState) ) { // show string (table cel or different) - pImpl->aStr = static_cast<const SfxStringItem*>(pState)->GetValue(); + pImpl->aStr = pStringItem->GetValue(); pImpl->bTable = true; pImpl->bPos = false; pImpl->bSize = false; |