coverity#704770 Unchecked dynamic_cast

Change-Id: Ib690d6ad50e89f6cf4b1046fde6bea2d669b971d
This commit is contained in:
Caolán McNamara
2014-04-04 10:41:59 +01:00
parent 9754ac4ee7
commit aa0e805a81

View File

@@ -100,26 +100,19 @@ void SAL_CALL SdUnoOutlineView::removeSelectionChangeListener (
(void)rxListener;
}
//----- XDrawView -------------------------------------------------------------
void SAL_CALL SdUnoOutlineView::setCurrentPage (
const Reference< drawing::XDrawPage >& xPage)
throw(RuntimeException, std::exception)
{
SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xPage );
SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : NULL;
SdPage *pSdPage = dynamic_cast<SdPage*>(pSdrPage);
if (pSdrPage != NULL)
mrOutlineViewShell.SetCurrentPage(dynamic_cast<SdPage*>(pSdrPage));
if (pSdPage != NULL)
mrOutlineViewShell.SetCurrentPage(pSdPage);
}
Reference< drawing::XDrawPage > SAL_CALL SdUnoOutlineView::getCurrentPage (void)
throw(RuntimeException, std::exception)
{