diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-27 09:43:22 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-27 12:59:23 +0000 |
commit | 850a8d27ca696f18ce0c529346f8bb8505499545 (patch) | |
tree | 5641e81912760029683e1c544e01af25eee23523 /sc/source/ui | |
parent | 6c974272423ca19c94d8d5e182fec46836309d60 (diff) |
Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
Reviewed-on: https://gerrit.libreoffice.org/25534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/app/drwtrans.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/seltrans.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/graphsh.cxx | 24 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 2 |
4 files changed, 15 insertions, 15 deletions
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx index d228d9f85072..e602286511ac 100644 --- a/sc/source/ui/app/drwtrans.cxx +++ b/sc/source/ui/app/drwtrans.cxx @@ -121,7 +121,7 @@ ScDrawTransferObj::ScDrawTransferObj( SdrModel* pClipModel, ScDocShell* pContain if (nSdrObjKind == OBJ_GRAF) { bGraphic = true; - if ( static_cast<SdrGrafObj*>(pObject)->GetGraphic().GetType() == GRAPHIC_BITMAP ) + if ( static_cast<SdrGrafObj*>(pObject)->GetGraphic().GetType() == GraphicType::Bitmap ) bGrIsBit = true; } diff --git a/sc/source/ui/app/seltrans.cxx b/sc/source/ui/app/seltrans.cxx index ead955f31c2d..35e7542ee646 100644 --- a/sc/source/ui/app/seltrans.cxx +++ b/sc/source/ui/app/seltrans.cxx @@ -92,7 +92,7 @@ ScSelectionTransferObj* ScSelectionTransferObj::CreateFromView( ScTabView* pView if ( nSdrObjKind == OBJ_GRAF ) { - if ( static_cast<SdrGrafObj*>(pObj)->GetGraphic().GetType() == GRAPHIC_BITMAP ) + if ( static_cast<SdrGrafObj*>(pObj)->GetGraphic().GetType() == GraphicType::Bitmap ) eMode = SC_SELTRANS_DRAW_BITMAP; else eMode = SC_SELTRANS_DRAW_GRAPHIC; diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx index 1632fd067d81..bf09e7500fe7 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 && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } @@ -111,7 +111,7 @@ void ScGraphicShell::ExecuteFilter( SfxRequest& rReq ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) { GraphicObject aFilterObj( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() ); @@ -145,7 +145,7 @@ void ScGraphicShell::GetExternalEditState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } @@ -162,7 +162,7 @@ void ScGraphicShell::ExecuteExternalEdit( SfxRequest& ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) { GraphicObject aGraphicObject( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() ); m_ExternalEdits.push_back( o3tl::make_unique<SdrExternalToolEdit>( @@ -183,7 +183,7 @@ void ScGraphicShell::GetCompressGraphicState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } @@ -200,7 +200,7 @@ void ScGraphicShell::ExecuteCompressGraphic( SfxRequest& ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) { SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(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 && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } @@ -245,7 +245,7 @@ void ScGraphicShell::ExecuteCropGraphic( SfxRequest& ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::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 && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) { GraphicObject aGraphicObject( static_cast<SdrGrafObj*>( pObj )->GetGraphicObject() ); { @@ -283,7 +283,7 @@ void ScGraphicShell::GetSaveGraphicState(SfxItemSet &rSet) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } @@ -300,7 +300,7 @@ void ScGraphicShell::ExecuteChangePicture(SfxRequest& /*rReq*/) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) { SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj); SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC)); @@ -335,7 +335,7 @@ void ScGraphicShell::GetChangePictureState(SfxItemSet &rSet) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index a1ec9e6a7ed1..089069736b8a 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -1173,7 +1173,7 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu GraphicObject aObject( *pGraphic ); if( pOut->GetPDFWriter() && - (aObject.GetType() == GRAPHIC_BITMAP || aObject.GetType() == GRAPHIC_DEFAULT) ) + (aObject.GetType() == GraphicType::Bitmap || aObject.GetType() == GraphicType::Default) ) { // For PDF export, every draw // operation for bitmaps takes a noticeable |