Kaydet (Commit) aa0e805a authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#704770 Unchecked dynamic_cast

Change-Id: Ib690d6ad50e89f6cf4b1046fde6bea2d669b971d
üst 9754ac4e
...@@ -100,26 +100,19 @@ void SAL_CALL SdUnoOutlineView::removeSelectionChangeListener ( ...@@ -100,26 +100,19 @@ void SAL_CALL SdUnoOutlineView::removeSelectionChangeListener (
(void)rxListener; (void)rxListener;
} }
//----- XDrawView ------------------------------------------------------------- //----- XDrawView -------------------------------------------------------------
void SAL_CALL SdUnoOutlineView::setCurrentPage ( void SAL_CALL SdUnoOutlineView::setCurrentPage (
const Reference< drawing::XDrawPage >& xPage) const Reference< drawing::XDrawPage >& xPage)
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xPage ); SvxDrawPage* pDrawPage = SvxDrawPage::getImplementation( xPage );
SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : NULL; SdrPage *pSdrPage = pDrawPage ? pDrawPage->GetSdrPage() : NULL;
SdPage *pSdPage = dynamic_cast<SdPage*>(pSdrPage);
if (pSdrPage != NULL) if (pSdPage != NULL)
mrOutlineViewShell.SetCurrentPage(dynamic_cast<SdPage*>(pSdrPage)); mrOutlineViewShell.SetCurrentPage(pSdPage);
} }
Reference< drawing::XDrawPage > SAL_CALL SdUnoOutlineView::getCurrentPage (void) Reference< drawing::XDrawPage > SAL_CALL SdUnoOutlineView::getCurrentPage (void)
throw(RuntimeException, std::exception) throw(RuntimeException, std::exception)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment