summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-06-10 15:45:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-06-10 16:08:09 +0100
commitc44c569aeba043fad7ed1a3b7e676d9cde79bfb1 (patch)
tree41788623be190cc810fd8350ddbbbc0de3f76fed
parent2de2220f6bcf0d1bf0bb17ea1bd67d23d72baa26 (diff)
coverity#735983 Unchecked dynamic_cast
Change-Id: Id8a2f30e12115049ba107b2e2485ec7206123b08
-rw-r--r--sw/source/uibase/docvw/FrameControlsManager.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/docvw/FrameControlsManager.cxx b/sw/source/uibase/docvw/FrameControlsManager.cxx
index 2842a5d823a9..7cd0e7f53319 100644
--- a/sw/source/uibase/docvw/FrameControlsManager.cxx
+++ b/sw/source/uibase/docvw/FrameControlsManager.cxx
@@ -121,11 +121,11 @@ void SwFrameControlsManager::SetHeaderFooterControl( const SwPageFrm* pPageFrm,
Rectangle aPageRect = m_pEditWin->LogicToPixel( pPageFrm->Frm().SVRect() );
- SwHeaderFooterWin* pHFWin = dynamic_cast< SwHeaderFooterWin* >( pControl.get() );
- assert(pHFWin->IsHeader() == bHeader);
- pHFWin->SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
+ SwHeaderFooterWin& rHFWin = dynamic_cast<SwHeaderFooterWin&>(*pControl.get());
+ assert(rHFWin.IsHeader() == bHeader);
+ rHFWin.SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() );
- if ( !pHFWin->IsVisible() )
+ if (!rHFWin.IsVisible())
pControl->ShowAll( true );
}