tdf#119840 elide some dynamic_cast
Change-Id: Iafaedf26231bac142759d2bf667dfba083cf0122 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137503 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
c7a76952b6
commit
316e4c01f4
4 changed files with 7 additions and 4 deletions
|
@ -39,6 +39,7 @@ enum class SfxHintId {
|
|||
LanguageChanged,
|
||||
RedlineChanged,
|
||||
DocumentRepair,
|
||||
SvxViewChanged,
|
||||
|
||||
// VCL text hints
|
||||
TextParaInserted,
|
||||
|
|
|
@ -1261,7 +1261,7 @@ namespace accessibility
|
|||
bUpdatedBoundRectAndVisibleChildren = true;
|
||||
}
|
||||
}
|
||||
else if ( dynamic_cast<const SvxViewChangedHint*>( &rHint ) )
|
||||
else if (rHint.GetId() == SfxHintId::SvxViewChanged)
|
||||
{
|
||||
// just check visibility
|
||||
if (!bUpdatedBoundRectAndVisibleChildren)
|
||||
|
@ -1318,8 +1318,9 @@ namespace accessibility
|
|||
// notification sequence.
|
||||
maEventQueue.Append( *pSdrHint );
|
||||
}
|
||||
else if( const SvxViewChangedHint* pViewHint = dynamic_cast<const SvxViewChangedHint*>( &rHint ) )
|
||||
else if (rHint.GetId() == SfxHintId::SvxViewChanged)
|
||||
{
|
||||
const SvxViewChangedHint* pViewHint = static_cast<const SvxViewChangedHint*>(&rHint);
|
||||
// process visibility right away, if not within an
|
||||
// open EE notification frame. Otherwise, event
|
||||
// processing would be delayed until next EE
|
||||
|
|
|
@ -99,7 +99,7 @@ OutputDevice* SdrPaintView::GetFirstOutputDevice() const
|
|||
}
|
||||
|
||||
|
||||
SvxViewChangedHint::SvxViewChangedHint()
|
||||
SvxViewChangedHint::SvxViewChangedHint() : SfxHint(SfxHintId::SvxViewChanged)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -373,8 +373,9 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (const SvxViewChangedHint* pViewHint = dynamic_cast<const SvxViewChangedHint*>(&rHint))
|
||||
else if (rHint.GetId() == SfxHintId::SvxViewChanged)
|
||||
{
|
||||
const SvxViewChangedHint* pViewHint = static_cast<const SvxViewChangedHint*>(&rHint);
|
||||
Broadcast( *pViewHint );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue