From ca8a4a7abc81a53a88fc0daa61447f9562f532f5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Tue, 6 Jun 2017 20:55:51 +0200 Subject: Eliminate dynamic_cast, use SfxPoolItem::IsVoidItem() Change-Id: I09dafffd64dd107e802d016494d884f32363521a --- svx/source/stbctrls/zoomsliderctrl.cxx | 2 +- svx/source/svdraw/svdibrow.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'svx') diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx index 3c871557c00c..be0b0721f260 100644 --- a/svx/source/stbctrls/zoomsliderctrl.cxx +++ b/svx/source/stbctrls/zoomsliderctrl.cxx @@ -168,7 +168,7 @@ SvxZoomSliderControl::~SvxZoomSliderControl() void SvxZoomSliderControl::StateChanged( sal_uInt16 /*nSID*/, SfxItemState eState, const SfxPoolItem* pState ) { - if ( (SfxItemState::DEFAULT != eState) || dynamic_cast( pState) != nullptr ) + if ( (SfxItemState::DEFAULT != eState) || pState->IsVoidItem() ) { GetStatusBar().SetItemText( GetId(), "" ); mxImpl->mbValuesSet = false; diff --git a/svx/source/svdraw/svdibrow.cxx b/svx/source/svdraw/svdibrow.cxx index 77bf2c1a3243..a83797f3c11a 100644 --- a/svx/source/svdraw/svdibrow.cxx +++ b/svx/source/svdraw/svdibrow.cxx @@ -920,7 +920,7 @@ void SdrItemBrowserControl::SetAttributes(const SfxItemSet* pSet, const SfxItemS if (eState!=SfxItemState::DISABLED) { const SfxPoolItem& rItem=pSet->Get(nWhich); sal_uInt16 nIndent=0; - if (dynamic_cast(&rItem) == nullptr && dynamic_cast(&rItem) == nullptr + if (!rItem.IsVoidItem() && dynamic_cast(&rItem) == nullptr && (!IsItemIneffective(nWhich,pSet,nIndent) || bDontHideIneffectiveItems)) { OUString aCommentStr; -- cgit