From c44c569aeba043fad7ed1a3b7e676d9cde79bfb1 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 10 Jun 2014 15:45:01 +0100 Subject: coverity#735983 Unchecked dynamic_cast Change-Id: Id8a2f30e12115049ba107b2e2485ec7206123b08 --- sw/source/uibase/docvw/FrameControlsManager.cxx | 8 ++++---- 1 file 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(*pControl.get()); + assert(rHFWin.IsHeader() == bHeader); + rHFWin.SetOffset( aOffset, aPageRect.Left(), aPageRect.Right() ); - if ( !pHFWin->IsVisible() ) + if (!rHFWin.IsVisible()) pControl->ShowAll( true ); } -- cgit