diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-02 09:41:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-02 12:24:00 +0100 |
commit | 068d4108e5ae41ca5bc2bcf22277e6235c6bdd0b (patch) | |
tree | 4139d3418c7c72d5126f64e59e192cac3e74c7ee /sd/source | |
parent | e763e13873adfe3c6abfa4c2dfd3ac3847e2d494 (diff) |
loplugin:redundantcast catch more dynamic_cast
Change-Id: Ia28e58217cefa306567b53688d851fa210b7821c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110287
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/sdpage.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/animations/CustomAnimationPane.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/presenter/PresenterPreviewCache.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/drviewse.cxx | 2 |
4 files changed, 3 insertions, 4 deletions
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx index 800b69808639..5f8280dd8f51 100644 --- a/sd/source/core/sdpage.cxx +++ b/sd/source/core/sdpage.cxx @@ -2380,7 +2380,6 @@ void SdPage::SetObjText(SdrTextObj* pObj, SdrOutliner* pOutliner, PresObjKind eO if ( !pObj ) return; - DBG_ASSERT( dynamic_cast< const SdrTextObj *>( pObj ) != nullptr, "SetObjText: No SdrTextObj!" ); ::Outliner* pOutl = pOutliner; if (!pOutliner) diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx index d9f86d628f6e..045522bc1ff4 100644 --- a/sd/source/ui/animations/CustomAnimationPane.cxx +++ b/sd/source/ui/animations/CustomAnimationPane.cxx @@ -160,7 +160,7 @@ CustomAnimationPane::CustomAnimationPane( Window* pParent, ViewShellBase& rBase, void CustomAnimationPane::initialize() { mxLBAnimation->connect_changed(LINK(this, CustomAnimationPane, AnimationSelectHdl)); - mxCustomAnimationList->setController( dynamic_cast<ICustomAnimationListController*> ( this ) ); + mxCustomAnimationList->setController( static_cast<ICustomAnimationListController*> ( this ) ); mxCustomAnimationList->set_size_request(mxCustomAnimationList->get_approximate_digit_width() * 15, mxCustomAnimationList->get_height_rows(8)); diff --git a/sd/source/ui/presenter/PresenterPreviewCache.cxx b/sd/source/ui/presenter/PresenterPreviewCache.cxx index c420cf5f9091..135fc45bf0f2 100644 --- a/sd/source/ui/presenter/PresenterPreviewCache.cxx +++ b/sd/source/ui/presenter/PresenterPreviewCache.cxx @@ -329,7 +329,7 @@ const SdrPage* PresenterPreviewCache::PresenterCacheContext::GetPage ( Reference<drawing::XDrawPage> xSlide (mxSlides->getByIndex(nSlideIndex), UNO_QUERY); const SdPage* pPage = SdPage::getImplementation(xSlide); - return dynamic_cast<const SdrPage*>(pPage); + return pPage; } void PresenterPreviewCache::PresenterCacheContext::CallListeners ( diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index bd4c3775300d..d537dbdbb77e 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -267,7 +267,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq) if(pDescriptorItem) { // get the form view - FmFormView* pFormView = dynamic_cast<FmFormView*>( mpDrawView.get() ); + FmFormView* pFormView = mpDrawView.get(); SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : nullptr; if(pPageView) |