From 89d39bc100aabf5dccbe77c0b5c0c85736e85b39 Mon Sep 17 00:00:00 2001 From: Oliver Specht Date: Wed, 30 Sep 2015 16:10:07 +0200 Subject: tdf#94559: 4th step to remove rtti.hxx replaced use of PTR_CAST, IS_TYPE, ISA in idl, editeng, sc, sd, sw, sfx2, sot, starmath Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653 Reviewed-on: https://gerrit.libreoffice.org/19132 Tested-by: Jenkins Reviewed-by: Oliver Specht --- sc/source/ui/drawfunc/graphsh.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'sc/source/ui/drawfunc/graphsh.cxx') diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 94742a0a177c..b3145732e6e6 100644 --- a/sc/source/ui/drawfunc/graphsh.cxx +++ b/sc/source/ui/drawfunc/graphsh.cxx @@ -94,7 +94,7 @@ void ScGraphicShell::GetFilterState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast( pObj) != nullptr && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) bEnable = true; } @@ -111,7 +111,7 @@ void ScGraphicShell::ExecuteFilter( SfxRequest& rReq ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast( pObj) != nullptr && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { GraphicObject aFilterObj( static_cast(pObj)->GetGraphicObject() ); @@ -145,7 +145,7 @@ void ScGraphicShell::GetExternalEditState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast( pObj) != nullptr && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) bEnable = true; } @@ -162,7 +162,7 @@ void ScGraphicShell::ExecuteExternalEdit( SfxRequest& ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast( pObj) != nullptr && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { GraphicObject aGraphicObject( static_cast(pObj)->GetGraphicObject() ); m_ExternalEdits.push_back( std::unique_ptr( @@ -183,7 +183,7 @@ void ScGraphicShell::GetCompressGraphicState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast( pObj) != nullptr && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) bEnable = true; } @@ -200,7 +200,7 @@ void ScGraphicShell::ExecuteCompressGraphic( SfxRequest& ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast( pObj) != nullptr && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { SdrGrafObj* pGraphicObj = static_cast(pObj); ScopedVclPtrInstance< CompressGraphicsDialog > dialog( GetViewData()->GetDialogParent(), pGraphicObj, GetViewData()->GetBindings() ); @@ -228,7 +228,7 @@ void ScGraphicShell::GetCropGraphicState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && 0 != dynamic_cast( pObj) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) bEnable = true; } @@ -245,7 +245,7 @@ void ScGraphicShell::ExecuteCropGraphic( SfxRequest& ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast( pObj) != nullptr && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { pView->SetEditMode(SDREDITMODE_EDIT); pView->SetDragMode(SDRDRAG_CROP); @@ -262,7 +262,7 @@ void ScGraphicShell::ExecuteSaveGraphic(SfxRequest& /*rReq*/) if( rMarkList.GetMarkCount() == 1 ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast( pObj) != nullptr && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { GraphicObject aGraphicObject( static_cast( pObj )->GetGraphicObject() ); { @@ -283,7 +283,7 @@ void ScGraphicShell::GetSaveGraphicState(SfxItemSet &rSet) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast( pObj) != nullptr && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) bEnable = true; } @@ -300,7 +300,7 @@ void ScGraphicShell::ExecuteChangePicture(SfxRequest& /*rReq*/) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && 0 != dynamic_cast( pObj) && static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) { SdrGrafObj* pGraphicObj = static_cast(pObj); SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC)); @@ -335,7 +335,7 @@ void ScGraphicShell::GetChangePictureState(SfxItemSet &rSet) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && pObj->ISA( SdrGrafObj ) && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast( pObj) != nullptr && ( static_cast(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) bEnable = true; } -- cgit