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 /sd | |
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 'sd')
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/app/sdxfer.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/slideshow/showwin.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/GraphicObjectBar.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 6 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 4 | ||||
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 2 | ||||
-rw-r--r-- | sd/source/ui/view/sdview3.cxx | 4 |
8 files changed, 13 insertions, 13 deletions
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 624d2908abd7..bdaefa8f7341 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -796,7 +796,7 @@ void SdExportTest::testLinkedGraphicRT() const GraphicObject& rGraphicObj = pObject->GetGraphicObject(true); CPPUNIT_ASSERT_MESSAGE( sFailedMessage.getStr(), !rGraphicObj.IsSwappedOut()); - CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), GRAPHIC_BITMAP, rGraphicObj.GetGraphic().GetType()); + CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType())); CPPUNIT_ASSERT_EQUAL_MESSAGE( sFailedMessage.getStr(), sal_uLong(864900), rGraphicObj.GetSizeBytes()); xDocShRef->DoClose(); diff --git a/sd/source/ui/app/sdxfer.cxx b/sd/source/ui/app/sdxfer.cxx index 52ed60cc2012..835434c049f0 100644 --- a/sd/source/ui/app/sdxfer.cxx +++ b/sd/source/ui/app/sdxfer.cxx @@ -416,7 +416,7 @@ void SdTransferable::AddSupportedFormats() AddFormat( SotClipboardFormatId::SVXB ); - if( mpGraphic->GetType() == GRAPHIC_BITMAP ) + if( mpGraphic->GetType() == GraphicType::Bitmap ) { AddFormat( SotClipboardFormatId::PNG ); AddFormat( SotClipboardFormatId::BITMAP ); diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index b1a104f984f2..67baa4f42d34 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -480,7 +480,7 @@ void ShowWindow::DrawPauseScene( bool bTimeoutOnly ) aFont.SetCharSet( aOldFont.GetCharSet() ); aFont.SetLanguage( aOldFont.GetLanguage() ); - if( !bTimeoutOnly && ( maLogo.GetType() != GRAPHIC_NONE ) ) + if( !bTimeoutOnly && ( maLogo.GetType() != GraphicType::NONE ) ) { Size aGrfSize; diff --git a/sd/source/ui/view/GraphicObjectBar.cxx b/sd/source/ui/view/GraphicObjectBar.cxx index 52f77cb429f7..57124390e9ec 100644 --- a/sd/source/ui/view/GraphicObjectBar.cxx +++ b/sd/source/ui/view/GraphicObjectBar.cxx @@ -105,7 +105,7 @@ void GraphicObjectBar::GetFilterState( SfxItemSet& rSet ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast< SdrGrafObj *>( pObj ) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) ) + if( pObj && dynamic_cast< SdrGrafObj *>( pObj ) != nullptr && ( static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) ) bEnable = true; } @@ -121,7 +121,7 @@ void GraphicObjectBar::ExecuteFilter( SfxRequest& rReq ) { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); - if( pObj && dynamic_cast< SdrGrafObj *>( pObj ) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GRAPHIC_BITMAP ) + if( pObj && dynamic_cast< SdrGrafObj *>( pObj ) != nullptr && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap ) { GraphicObject aFilterObj( static_cast<SdrGrafObj*>(pObj)->GetGraphicObject() ); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index bbfe30b33207..8704f87cd6ae 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -948,7 +948,7 @@ void DrawViewShell::FuTemporary(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() ); { @@ -967,7 +967,7 @@ void DrawViewShell::FuTemporary(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() ); m_ExternalEdits.push_back( @@ -988,7 +988,7 @@ void DrawViewShell::FuTemporary(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 ) { SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj); ScopedVclPtrInstance< CompressGraphicsDialog > dialog( GetParentWindow(), pGraphicObj, GetViewFrame()->GetBindings() ); diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index cd3162ec40e2..3f679b9e734a 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1341,14 +1341,14 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) switch(pSdrGrafObj->GetGraphicType()) { - case GRAPHIC_BITMAP : + case GraphicType::Bitmap : bFoundBitmap = true; if(pSdrGrafObj->isEmbeddedSvg()) { bFoundMetafile = true; } break; - case GRAPHIC_GDIMETAFILE : + case GraphicType::GdiMetafile : bFoundMetafile = true; break; default: diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index c7d803119a99..3baf250a4cb1 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -1003,7 +1003,7 @@ bool View::IsVectorizeAllowed() const if(pObj) { - if(GRAPHIC_BITMAP == pObj->GetGraphicType() && !pObj->isEmbeddedSvg()) + if(GraphicType::Bitmap == pObj->GetGraphicType() && !pObj->isEmbeddedSvg()) { bRet = true; } diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 95badc5a7966..58d79806ca64 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -193,7 +193,7 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo case MetaActionType::BMPSCALE: case MetaActionType::BMPEX: case MetaActionType::BMPEXSCALE: - if( aGraphic.GetType() != GRAPHIC_NONE ) + if( aGraphic.GetType() != GraphicType::NONE ) { bVector = true; } @@ -238,7 +238,7 @@ bool View::InsertMetaFile( TransferableDataHelper& rDataHelper, const Point& rPo } // it is not a vector metafile but it also has no graphic? - if( !bVector && (aGraphic.GetType() == GRAPHIC_NONE) ) + if( !bVector && (aGraphic.GetType() == GraphicType::NONE) ) bVector = true; // restrict movement to WorkArea |