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 | |
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')
-rw-r--r-- | sd/qa/unit/misc-tests.cxx | 4 | ||||
-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 |
5 files changed, 5 insertions, 6 deletions
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx index 078c9b19a19b..fca399a360a8 100644 --- a/sd/qa/unit/misc-tests.cxx +++ b/sd/qa/unit/misc-tests.cxx @@ -815,7 +815,7 @@ void SdMiscTest::testTdf130988() //emulate command .uno:ConvertInto3DLathe sd::ViewShell* pViewShell = xDocShRef->GetViewShell(); - E3dView* pView = dynamic_cast<E3dView*>(pViewShell->GetView()); + E3dView* pView = pViewShell->GetView(); pView->MarkNextObj(); pView->ConvertMarkedObjTo3D(false, basegfx::B2DPoint(8000.0, -3000.0), basegfx::B2DPoint(3000.0, -8000.0)); E3dScene* pObj = dynamic_cast<E3dScene*>(pView->GetMarkedObjectByIndex(0)); @@ -839,7 +839,7 @@ void SdMiscTest::testTdf131033() // It produces a rotation around a vertical axis, which is far away from the // generating shape. sd::ViewShell* pViewShell = xDocShRef->GetViewShell(); - E3dView* pView = dynamic_cast<E3dView*>(pViewShell->GetView()); + E3dView* pView = pViewShell->GetView(); pView->MarkNextObj(); pView->ConvertMarkedObjTo3D(false, basegfx::B2DPoint(11000.0, -5000.0), basegfx::B2DPoint(11000.0, -9000.0)); E3dScene* pObj = dynamic_cast<E3dScene*>(pView->GetMarkedObjectByIndex(0)); 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) |