diff options
author | Jan Holesovsky <kendy@collabora.com> | 2016-07-14 10:54:21 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2016-07-14 11:29:48 +0200 |
commit | 53d18f277227c957d9c7370d423e4cd2a69649bf (patch) | |
tree | a7c5e685b8e6dc8029fd0105235721a3a9e7b3ad /sw | |
parent | b48f0eed566683b8e10e7494d5fb02f3dd42968d (diff) |
Simplify dynamic_cast followed by a static_cast.
Change-Id: Id4ab82db5e0ac95e26299730797a6eac0f925fb8
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/utlui/navipi.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 2d66ac1d083a..31827aec353d 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -972,21 +972,21 @@ void SwNavigationPI::Notify( SfxBroadcaster& rBrdc, const SfxHint& rHint ) { if(&rBrdc == m_pCreateView) { - if(dynamic_cast<const SfxSimpleHint*>(&rHint) && static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING) + const SfxSimpleHint* pHint = dynamic_cast<const SfxSimpleHint*>(&rHint); + if (pHint && pHint->GetId() == SFX_HINT_DYING) { m_pCreateView = nullptr; } } else { - if(dynamic_cast<const SfxEventHint*>(&rHint)) + if (const SfxEventHint* pHint = dynamic_cast<const SfxEventHint*>(&rHint)) { - if( m_pxObjectShell && - static_cast<const SfxEventHint&>( rHint).GetEventId() == SFX_EVENT_CLOSEAPP) + if (m_pxObjectShell && pHint->GetEventId() == SFX_EVENT_CLOSEAPP) { DELETEZ(m_pxObjectShell); } - else if(static_cast<const SfxEventHint&>( rHint).GetEventId() == SFX_EVENT_OPENDOC) + else if (pHint->GetEventId() == SFX_EVENT_OPENDOC) { SwView *pActView = GetCreateView(); |