From aa0e805a813b21f619986e2e82752031d82ea09c Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 4 Apr 2014 10:41:59 +0100 Subject: coverity#704770 Unchecked dynamic_cast Change-Id: Ib690d6ad50e89f6cf4b1046fde6bea2d669b971d --- sd/source/ui/unoidl/SdUnoOutlineView.cxx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sd') diff --git a/sd/source/ui/unoidl/SdUnoOutlineView.cxx b/sd/source/ui/unoidl/SdUnoOutlineView.cxx index 057aa3c9aeb9..1d0e947218b4 100644 --- a/sd/source/ui/unoidl/SdUnoOutlineView.cxx +++ b/sd/source/ui/unoidl/SdUnoOutlineView.cxx @@ -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(pSdrPage); - if (pSdrPage != NULL) - mrOutlineViewShell.SetCurrentPage(dynamic_cast(pSdrPage)); + if (pSdPage != NULL) + mrOutlineViewShell.SetCurrentPage(pSdPage); } - - - Reference< drawing::XDrawPage > SAL_CALL SdUnoOutlineView::getCurrentPage (void) throw(RuntimeException, std::exception) { -- cgit