diff options
Diffstat (limited to 'svx/source/stbctrls/zoomctrl.cxx')
-rw-r--r-- | svx/source/stbctrls/zoomctrl.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index cf9b42cbc833..ed92af23be34 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -116,17 +116,16 @@ void SvxZoomStatusBarControl::StateChanged( sal_uInt16, SfxItemState eState, GetStatusBar().SetItemText( GetId(), "" ); nValueSet = SvxZoomEnableFlags::NONE; } - else if ( dynamic_cast< const SfxUInt16Item* >(pState) != nullptr ) + else if ( auto pItem = dynamic_cast< const SfxUInt16Item* >(pState) ) { - const SfxUInt16Item* pItem = static_cast<const SfxUInt16Item*>(pState); nZoom = pItem->GetValue(); OUString aStr(unicode::formatPercent(nZoom, Application::GetSettings().GetUILanguageTag())); GetStatusBar().SetItemText( GetId(), aStr ); - if ( dynamic_cast<const SvxZoomItem*>( pState) != nullptr ) + if ( auto pZoomItem = dynamic_cast<const SvxZoomItem*>(pState) ) { - nValueSet = static_cast<const SvxZoomItem*>(pState)->GetValueSet(); + nValueSet = pZoomItem->GetValueSet(); } else { |