summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-04-04 10:41:59 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-04-04 12:14:20 +0100
commitaa0e805a813b21f619986e2e82752031d82ea09c (patch)
tree5085741505d3a015aff0c82131757b38c240d9ba /sd
parent9754ac4ee7047ab0f5fd8369aa617da210e3aed5 (diff)
coverity#704770 Unchecked dynamic_cast
Change-Id: Ib690d6ad50e89f6cf4b1046fde6bea2d669b971d
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/unoidl/SdUnoOutlineView.cxx13
1 files changed, 3 insertions, 10 deletions
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<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)
{