[Libreoffice-commits] core.git: basic/source chart2/source cui/source drawinglayer/source editeng/source filter/source forms/source include/vcl oox/source sc/qa sc/source sd/qa sd/source sfx2/source slideshow/source svgio/source svtools/qa svtools/source svx/source sw/inc sw/qa sw/source vcl/source

Noel Grandin noel at peralex.com
Fri May 27 12:59:55 UTC 2016


 basic/source/runtime/stdobj1.cxx                             |    4 
 chart2/source/controller/main/ChartController_Tools.cxx      |    2 
 cui/source/dialogs/cuigrfflt.cxx                             |    4 
 cui/source/tabpages/grfpage.cxx                              |    4 
 cui/source/tabpages/tparea.cxx                               |    4 
 drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx   |    2 
 drawinglayer/source/primitive2d/graphicprimitive2d.cxx       |    2 
 drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx |    6 
 drawinglayer/source/primitive2d/mediaprimitive2d.cxx         |    2 
 drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx   |    2 
 drawinglayer/source/processor2d/vclprocessor2d.cxx           |    8 
 editeng/source/items/bulitem.cxx                             |    4 
 editeng/source/items/frmitems.cxx                            |    2 
 filter/source/graphicfilter/eps/eps.cxx                      |    2 
 filter/source/msfilter/escherex.cxx                          |   14 -
 filter/source/msfilter/msdffimp.cxx                          |   12 -
 filter/source/msfilter/svdfppt.cxx                           |    2 
 filter/source/svg/svgexport.cxx                              |    4 
 forms/source/component/imgprod.cxx                           |    8 
 include/vcl/graph.hxx                                        |   10 -
 oox/source/export/drawingml.cxx                              |    4 
 sc/qa/extras/sccondformats.cxx                               |   10 -
 sc/qa/unit/subsequent_export-test.cxx                        |    2 
 sc/source/filter/excel/xiescher.cxx                          |    6 
 sc/source/filter/excel/xipage.cxx                            |    2 
 sc/source/ui/app/drwtrans.cxx                                |    2 
 sc/source/ui/app/seltrans.cxx                                |    2 
 sc/source/ui/drawfunc/graphsh.cxx                            |   24 +-
 sc/source/ui/view/printfun.cxx                               |    2 
 sd/qa/unit/export-tests.cxx                                  |    2 
 sd/source/ui/app/sdxfer.cxx                                  |    2 
 sd/source/ui/slideshow/showwin.cxx                           |    2 
 sd/source/ui/view/GraphicObjectBar.cxx                       |    4 
 sd/source/ui/view/drviews2.cxx                               |    6 
 sd/source/ui/view/drviews7.cxx                               |    4 
 sd/source/ui/view/sdview.cxx                                 |    2 
 sd/source/ui/view/sdview3.cxx                                |    4 
 sfx2/source/appl/fileobj.cxx                                 |    4 
 slideshow/source/engine/shapes/gdimtftools.cxx               |    2 
 slideshow/source/engine/shapes/shapeimporter.cxx             |    4 
 svgio/source/svgreader/svgimagenode.cxx                      |    2 
 svtools/qa/unit/GraphicObjectTest.cxx                        |    6 
 svtools/source/graphic/descriptor.cxx                        |   16 -
 svtools/source/graphic/graphic.cxx                           |   10 -
 svtools/source/graphic/grfcache.cxx                          |   20 +-
 svtools/source/graphic/grfmgr.cxx                            |   14 -
 svtools/source/graphic/grfmgr2.cxx                           |    8 
 svtools/source/graphic/provider.cxx                          |    8 
 svtools/source/graphic/transformer.cxx                       |    2 
 svtools/source/misc/transfer.cxx                             |    2 
 svtools/source/misc/transfer2.cxx                            |    6 
 svx/source/dialog/_bmpmask.cxx                               |    4 
 svx/source/dialog/_contdlg.cxx                               |   14 -
 svx/source/dialog/contwnd.cxx                                |    2 
 svx/source/dialog/graphctl.cxx                               |    4 
 svx/source/dialog/grfflt.cxx                                 |    4 
 svx/source/gallery2/galmisc.cxx                              |    2 
 svx/source/gallery2/galobj.cxx                               |    4 
 svx/source/gallery2/galtheme.cxx                             |    4 
 svx/source/sdr/contact/viewcontactofgraphic.cxx              |    2 
 svx/source/sdr/primitive2d/sdrattributecreator.cxx           |    4 
 svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx      |    4 
 svx/source/svdraw/svddrgmt.cxx                               |    2 
 svx/source/svdraw/svdograf.cxx                               |   38 ++--
 svx/source/svdraw/svdxcgv.cxx                                |    4 
 svx/source/tbxctrls/grafctrl.cxx                             |    8 
 svx/source/unodraw/UnoGraphicExporter.cxx                    |    2 
 svx/source/unodraw/unobrushitemhelper.cxx                    |    2 
 svx/source/unodraw/unoshap2.cxx                              |    2 
 svx/source/xml/xmlgrhlp.cxx                                  |   24 +-
 svx/source/xoutdev/_xoutbmp.cxx                              |   10 -
 svx/source/xoutdev/xattrbmp.cxx                              |    4 
 sw/inc/editsh.hxx                                            |    2 
 sw/qa/extras/globalfilter/globalfilter.cxx                   |    2 
 sw/qa/extras/htmlimport/htmlimport.cxx                       |    4 
 sw/source/core/doc/notxtfrm.cxx                              |    8 
 sw/source/core/docnode/swbaslnk.cxx                          |    8 
 sw/source/core/edit/editsh.cxx                               |   10 -
 sw/source/core/frmedt/fecopy.cxx                             |    6 
 sw/source/core/graphic/ndgrf.cxx                             |   14 -
 sw/source/core/layout/fly.cxx                                |    2 
 sw/source/core/layout/paintfrm.cxx                           |    4 
 sw/source/filter/html/htmlflywriter.cxx                      |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx                  |    8 
 sw/source/filter/ww8/ww8graf.cxx                             |    2 
 sw/source/filter/ww8/ww8par4.cxx                             |    8 
 sw/source/filter/xml/xmlbrsh.cxx                             |    2 
 sw/source/ui/frmdlg/frmpage.cxx                              |    4 
 sw/source/ui/frmdlg/wrap.cxx                                 |    2 
 sw/source/uibase/dochdl/swdtflvr.cxx                         |    2 
 sw/source/uibase/shells/basesh.cxx                           |   18 -
 sw/source/uibase/shells/grfsh.cxx                            |   24 +-
 vcl/source/filter/graphicfilter.cxx                          |    8 
 vcl/source/gdi/graph.cxx                                     |    8 
 vcl/source/gdi/impgraph.cxx                                  |  104 +++++------
 vcl/source/gdi/pdfwriter_impl2.cxx                           |    2 
 96 files changed, 340 insertions(+), 340 deletions(-)

New commits:
commit 850a8d27ca696f18ce0c529346f8bb8505499545
Author: Noel Grandin <noel at peralex.com>
Date:   Fri May 27 09:43:22 2016 +0200

    Convert GRAPHIC to scoped enum
    
    Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
    Reviewed-on: https://gerrit.libreoffice.org/25534
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx
index 47e5dac..e06c99d 100644
--- a/basic/source/runtime/stdobj1.cxx
+++ b/basic/source/runtime/stdobj1.cxx
@@ -67,9 +67,9 @@ void SbStdPicture::PropType( SbxVariable* pVar, SbxArray*, bool bWrite )
     GraphicType eType = aGraphic.GetType();
     sal_Int16 nType = 0;
 
-    if( eType == GRAPHIC_BITMAP )
+    if( eType == GraphicType::Bitmap )
         nType = 1;
-    else if( eType != GRAPHIC_NONE )
+    else if( eType != GraphicType::NONE )
         nType = 2;
 
     pVar->PutInteger( nType );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 58af6a6..c3cc7a7 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -316,7 +316,7 @@ void ChartController::executeDispatch_Paste()
             }
         }
 
-        if( aGraphic.GetType() != GRAPHIC_NONE )
+        if( aGraphic.GetType() != GraphicType::NONE )
         {
             Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic());
             if( xGraphic.is())
diff --git a/cui/source/dialogs/cuigrfflt.cxx b/cui/source/dialogs/cuigrfflt.cxx
index bd694f2..1a8774b 100644
--- a/cui/source/dialogs/cuigrfflt.cxx
+++ b/cui/source/dialogs/cuigrfflt.cxx
@@ -99,7 +99,7 @@ void GraphicPreviewWindow::ScaleImageToFit()
         mpOrigGraphic->GetPrefMapMode()));
     Size aGrfSize(aSizePixel);
 
-    if( mpOrigGraphic->GetType() == GRAPHIC_BITMAP &&
+    if( mpOrigGraphic->GetType() == GraphicType::Bitmap &&
         aPreviewSize.Width() && aPreviewSize.Height() &&
         aGrfSize.Width() && aGrfSize.Height() )
     {
@@ -147,7 +147,7 @@ GraphicFilterDialog::GraphicFilterDialog(vcl::Window* pParent,
     , maSizePixel(LogicToPixel(rGraphic.GetPrefSize(),
         rGraphic.GetPrefMapMode()))
 {
-    bIsBitmap = rGraphic.GetType() == GRAPHIC_BITMAP;
+    bIsBitmap = rGraphic.GetType() == GraphicType::Bitmap;
 
     maTimer.SetTimeoutHdl( LINK( this, GraphicFilterDialog, ImplPreviewTimeoutHdl ) );
     maTimer.SetTimeout( 5 );
diff --git a/cui/source/tabpages/grfpage.cxx b/cui/source/tabpages/grfpage.cxx
index 1ffd0b4..e7cd0de 100644
--- a/cui/source/tabpages/grfpage.cxx
+++ b/cui/source/tabpages/grfpage.cxx
@@ -234,7 +234,7 @@ void SvxGrfCropPage::Reset( const SfxItemSet *rSet )
         if( pGrf )
         {
             aOrigSize = GetGrfOrigSize( *pGrf );
-            if (pGrf->GetType() == GRAPHIC_BITMAP && aOrigSize.Width() && aOrigSize.Height())
+            if (pGrf->GetType() == GraphicType::Bitmap && aOrigSize.Width() && aOrigSize.Height())
             {
                 Bitmap aBitmap = pGrf->GetBitmap();
                 aOrigPixelSize = aBitmap.GetSizePixel();
@@ -388,7 +388,7 @@ void SvxGrfCropPage::ActivatePage(const SfxItemSet& rSet)
         {
             m_pExampleWN->SetGraphic( *pGrf );
             aOrigSize = GetGrfOrigSize( *pGrf );
-            if (pGrf->GetType() == GRAPHIC_BITMAP && aOrigSize.Width() > 1 && aOrigSize.Height() > 1) {
+            if (pGrf->GetType() == GraphicType::Bitmap && aOrigSize.Width() > 1 && aOrigSize.Height() > 1) {
                 Bitmap aBitmap = pGrf->GetBitmap();
                 aOrigPixelSize = aBitmap.GetSizePixel();
             }
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 431e106..df35ae0 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -592,7 +592,7 @@ bool SvxAreaTabPage::FillItemSet( SfxItemSet* rAttrs )
             case drawing::FillStyle_BITMAP:
             {
                 //UUUU
-                if(mbDirectGraphicSet && GRAPHIC_NONE != maDirectGraphic.GetType())
+                if(mbDirectGraphicSet && GraphicType::NONE != maDirectGraphic.GetType())
                 {
                     const XFillBitmapItem aXBmpItem(maDirectName, maDirectGraphic);
                     rAttrs->Put(XFillStyleItem(drawing::FillStyle_BITMAP));
@@ -1447,7 +1447,7 @@ IMPL_LINK_NOARG_TYPED( SvxAreaTabPage, ClickImportHdl_Impl, Button*, void )
         const int nError(aDlg.GetGraphic(maDirectGraphic));
         LeaveWait();
 
-        if(!nError && GRAPHIC_NONE != maDirectGraphic.GetType())
+        if(!nError && GraphicType::NONE != maDirectGraphic.GetType())
         {
             // extract name from filename
             const INetURLObject aURL(aDlg.GetPath());
diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
index 7dc1eb3..f90c923 100644
--- a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx
@@ -46,7 +46,7 @@ namespace drawinglayer
             {
                 const Graphic& rGraphic = rAttribute.getGraphic();
 
-                if(GRAPHIC_BITMAP == rGraphic.GetType() || GRAPHIC_GDIMETAFILE == rGraphic.GetType())
+                if(GraphicType::Bitmap == rGraphic.GetType() || GraphicType::GdiMetafile == rGraphic.GetType())
                 {
                     const Size aSize(rGraphic.GetPrefSize());
 
diff --git a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
index d2e9c88..e43839b 100644
--- a/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitive2d.cxx
@@ -81,7 +81,7 @@ namespace drawinglayer
 
             const GraphicObject& rGraphicObject = getGraphicObject();
             Graphic aTransformedGraphic(rGraphicObject.GetGraphic());
-            const bool isBitmap(GRAPHIC_BITMAP == aTransformedGraphic.GetType() && !aTransformedGraphic.getSvgData().get());
+            const bool isBitmap(GraphicType::Bitmap == aTransformedGraphic.GetType() && !aTransformedGraphic.getSvgData().get());
             const bool isAdjusted(getGraphicAttr().IsAdjusted());
             const bool isDrawMode(GRAPHICDRAWMODE_STANDARD != getGraphicAttr().GetDrawMode());
 
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
index 87d3959..b51fc91 100644
--- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
+++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx
@@ -89,7 +89,7 @@ namespace
     animatedBitmapExPreparator::animatedBitmapExPreparator(const Graphic& rGraphic)
     :   maAnimation(rGraphic.GetAnimation())
     {
-        OSL_ENSURE(GRAPHIC_BITMAP == rGraphic.GetType() && rGraphic.IsAnimated(), "animatedBitmapExPreparator: graphic is not animated (!)");
+        OSL_ENSURE(GraphicType::Bitmap == rGraphic.GetType() && rGraphic.IsAnimated(), "animatedBitmapExPreparator: graphic is not animated (!)");
 
         // #128539# secure access to Animation, looks like there exist animated GIFs out there
         // with a step count of zero
@@ -196,7 +196,7 @@ namespace drawinglayer
 
             switch(rGraphic.GetType())
             {
-                case GRAPHIC_BITMAP :
+                case GraphicType::Bitmap :
                 {
                     if(rGraphic.IsAnimated())
                     {
@@ -268,7 +268,7 @@ namespace drawinglayer
                     break;
                 }
 
-                case GRAPHIC_GDIMETAFILE :
+                case GraphicType::GdiMetafile :
                 {
                     // create MetafilePrimitive2D
                     const GDIMetaFile& rMetafile = rGraphic.GetGDIMetaFile();
diff --git a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
index 7ad6850..8e9beba 100644
--- a/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/mediaprimitive2d.cxx
@@ -47,7 +47,7 @@ namespace drawinglayer
                     getBackgroundColor()));
             xRetval[0] = xRefBackground;
 
-            if(GRAPHIC_BITMAP == maSnapshot.GetType() || GRAPHIC_GDIMETAFILE == maSnapshot.GetType())
+            if(GraphicType::Bitmap == maSnapshot.GetType() || GraphicType::GdiMetafile == maSnapshot.GetType())
             {
                 const GraphicObject aGraphicObject(maSnapshot);
                 const GraphicAttr aGraphicAttr;
diff --git a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
index 82e1bba..9213596 100644
--- a/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/polypolygonprimitive2d.cxx
@@ -450,7 +450,7 @@ namespace drawinglayer
                 const GraphicType aType(rGraphic.GetType());
 
                 // is there a bitmap or a metafile (do we have content)?
-                if(GRAPHIC_BITMAP == aType || GRAPHIC_GDIMETAFILE == aType)
+                if(GraphicType::Bitmap == aType || GraphicType::GdiMetafile == aType)
                 {
                     const Size aPrefSize(rGraphic.GetPrefSize());
 
diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx
index 67625c0..0d5c118 100644
--- a/drawinglayer/source/processor2d/vclprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx
@@ -442,7 +442,7 @@ namespace drawinglayer
                 //
                 // when graphic is animated, force decomposition to use the correct graphic, else
                 // fill style will not be animated
-                if(GRAPHIC_BITMAP == rFillGraphicAttribute.getGraphic().GetType()
+                if(GraphicType::Bitmap == rFillGraphicAttribute.getGraphic().GetType()
                     && !rFillGraphicAttribute.getGraphic().getSvgData().get()
                     && !rFillGraphicAttribute.getGraphic().IsAnimated())
                 {
@@ -666,12 +666,12 @@ namespace drawinglayer
                 // color (e.g. shadow)
                 switch(rFillGraphicAttribute.getGraphic().GetType())
                 {
-                    case GRAPHIC_GDIMETAFILE:
+                    case GraphicType::GdiMetafile:
                     {
                         // metafiles are potentially transparent, cannot optimize, not done
                         break;
                     }
-                    case GRAPHIC_BITMAP:
+                    case GraphicType::Bitmap:
                     {
                         if(!rFillGraphicAttribute.getGraphic().IsTransparent() && !rFillGraphicAttribute.getGraphic().IsAlpha())
                         {
@@ -738,7 +738,7 @@ namespace drawinglayer
                         }
                         break;
                     }
-                    default: //GRAPHIC_NONE, GRAPHIC_DEFAULT
+                    default: //GraphicType::NONE, GraphicType::Default
                     {
                         // empty graphic, we are done
                         bDone = true;
diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index ab3f87d..36c7b35 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -271,7 +271,7 @@ SvStream& SvxBulletItem::Store( SvStream& rStrm, sal_uInt16 /*nItemVersion*/ ) c
 {
     // Correction for empty bitmap
     if( ( nStyle == SvxBulletStyle::BMP ) &&
-        ( !pGraphicObject || ( GRAPHIC_NONE == pGraphicObject->GetType() ) || ( GRAPHIC_DEFAULT == pGraphicObject->GetType() ) ) )
+        ( !pGraphicObject || ( GraphicType::NONE == pGraphicObject->GetType() ) || ( GraphicType::Default == pGraphicObject->GetType() ) ) )
     {
         if( pGraphicObject )
         {
@@ -364,7 +364,7 @@ const GraphicObject& SvxBulletItem::GetGraphicObject() const
 
 void SvxBulletItem::SetGraphicObject( const GraphicObject& rGraphicObject )
 {
-    if( ( GRAPHIC_NONE == rGraphicObject.GetType() ) || ( GRAPHIC_DEFAULT == rGraphicObject.GetType() ) )
+    if( ( GraphicType::NONE == rGraphicObject.GetType() ) || ( GraphicType::Default == rGraphicObject.GetType() ) )
     {
         if( pGraphicObject )
         {
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 00a41e2..f976697 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3829,7 +3829,7 @@ const GraphicObject* SvxBrushItem::GetGraphicObject(OUString const & referer) co
         }
 
         // tdf#94088 when we got a graphic, set it
-        if(bGraphicLoaded && GRAPHIC_NONE != aGraphic.GetType())
+        if(bGraphicLoaded && GraphicType::NONE != aGraphic.GetType())
         {
             pImpl->pGraphicObject = new GraphicObject;
             pImpl->pGraphicObject->SetGraphic( aGraphic );
diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx
index 57859e5..c22e469 100644
--- a/filter/source/graphicfilter/eps/eps.cxx
+++ b/filter/source/graphicfilter/eps/eps.cxx
@@ -394,7 +394,7 @@ bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Filter
     // global default value setting
     StackMember*    pGS;
 
-    if (rGraphic.GetType() == GRAPHIC_GDIMETAFILE)
+    if (rGraphic.GetType() == GraphicType::GdiMetafile)
         pMTF = &rGraphic.GetGDIMetaFile();
     else if (rGraphic.GetGDIMetaFile().GetActionSize())
         pMTF = pAMTF = new GDIMetaFile( rGraphic.GetGDIMetaFile() );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index fe04bc9..00f3447 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -1457,7 +1457,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
                 {
                     aGraphicObject = aGraphic;
                     aUniqueId = aGraphicObject.GetUniqueID();
-                    bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+                    bIsGraphicMtf = aGraphicObject.GetType() == GraphicType::GdiMetafile;
                 }
             }
         }
@@ -1474,7 +1474,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
                     Graphic     aGraphic( aBitmapEx );
                     aGraphicObject = aGraphic;
                     aUniqueId = aGraphicObject.GetUniqueID();
-                    bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+                    bIsGraphicMtf = aGraphicObject.GetType() == GraphicType::GdiMetafile;
                 }
             }
         }
@@ -1507,7 +1507,7 @@ bool EscherPropertyContainer::CreateGraphicProperties(
                 aGraphicObject = lclDrawHatch( aHatch, aBackColor, bFillBackground, aRect );
                 aUniqueId = aGraphicObject.GetUniqueID();
                 eBitmapMode = css::drawing::BitmapMode_REPEAT;
-                bIsGraphicMtf = aGraphicObject.GetType() == GRAPHIC_GDIMETAFILE;
+                bIsGraphicMtf = aGraphicObject.GetType() == GraphicType::GdiMetafile;
             }
         }
 
@@ -3992,7 +3992,7 @@ EscherBlibEntry::EscherBlibEntry( sal_uInt32 nPictureOffset, const GraphicObject
     sal_uInt32      nLen = static_cast<sal_uInt32>(rId.getLength());
     const sal_Char* pData = rId.getStr();
     GraphicType     eType( rObject.GetType() );
-    if ( nLen && pData && ( eType != GRAPHIC_NONE ) )
+    if ( nLen && pData && ( eType != GraphicType::NONE ) )
     {
         mnIdentifier[ 0 ] = rtl_crc32( 0,pData, nLen );
         mnIdentifier[ 1 ] = 0;
@@ -4293,11 +4293,11 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
         if ( !bUseNativeGraphic )
         {
             GraphicType eGraphicType = aGraphic.GetType();
-            if ( ( eGraphicType == GRAPHIC_BITMAP ) || ( eGraphicType == GRAPHIC_GDIMETAFILE ) )
+            if ( ( eGraphicType == GraphicType::Bitmap ) || ( eGraphicType == GraphicType::GdiMetafile ) )
             {
                 sal_uInt32 nErrCode;
                 if ( !aGraphic.IsAnimated() )
-                    nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GRAPHIC_BITMAP ) ? ConvertDataFormat::PNG  : ConvertDataFormat::EMF );
+                    nErrCode = GraphicConverter::Export( aStream, aGraphic, ( eGraphicType == GraphicType::Bitmap ) ? ConvertDataFormat::PNG  : ConvertDataFormat::EMF );
                 else
                 {   // to store a animation, a gif has to be included into the msOG chunk of a png  #I5583#
                     GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
@@ -4325,7 +4325,7 @@ sal_uInt32 EscherGraphicProvider::GetBlibID( SvStream& rPicOutStrm, const OStrin
                 }
                 if ( nErrCode == ERRCODE_NONE )
                 {
-                    p_EscherBlibEntry->meBlibType = ( eGraphicType == GRAPHIC_BITMAP ) ? PNG : EMF;
+                    p_EscherBlibEntry->meBlibType = ( eGraphicType == GraphicType::Bitmap ) ? PNG : EMF;
                     aStream.Seek( STREAM_SEEK_TO_END );
                     p_EscherBlibEntry->mnSize = aStream.Tell();
                     pGraphicAry = static_cast<sal_uInt8 const *>(aStream.GetData());
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index cf802ec..9753f6e 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3820,7 +3820,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
             {
                 sal_uInt32 nTransColor = GetPropertyValue( DFF_Prop_pictureTransparent, 0 );
 
-                if ( aGraf.GetType() == GRAPHIC_BITMAP )
+                if ( aGraf.GetType() == GraphicType::Bitmap )
                 {
                     BitmapEx    aBitmapEx( aGraf.GetBitmapEx() );
                     Bitmap      aBitmap( aBitmapEx.GetBitmap() );
@@ -3910,7 +3910,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
                     }
                     switch ( aGraf.GetType() )
                     {
-                        case GRAPHIC_BITMAP :
+                        case GraphicType::Bitmap :
                         {
                             BitmapEx    aBitmapEx( aGraf.GetBitmapEx() );
                             if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
@@ -3924,7 +3924,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons
                         }
                         break;
 
-                        case GRAPHIC_GDIMETAFILE :
+                        case GraphicType::GdiMetafile :
                         {
                             GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() );
                             if ( nBrightness || nContrast || ( nGamma != 0x10000 ) )
@@ -6259,7 +6259,7 @@ bool SvxMSDffManager::GetBLIP( sal_uLong nIdx_, Graphic& rData, Rectangle* pVisA
             to get the Graphic via GraphicObject */
             GraphicObject aGraphicObject( iter->second );
             rData = aGraphicObject.GetGraphic();
-            if ( rData.GetType() != GRAPHIC_NONE )
+            if ( rData.GetType() != GraphicType::NONE )
                 bOk = true;
             else
                 aEscherBlipCache.erase(iter);
@@ -6470,7 +6470,7 @@ bool SvxMSDffManager::GetBLIPDirect( SvStream& rBLIPStream, Graphic& rData, Rect
             //
             // For pict graphics we will furthermore scale the metafile, because font scaling leads to error if the
             // dxarray is empty (this has been solved in wmf/emf but not for pict)
-            if( bMtfBLIP && ( GRFILTER_OK == nRes ) && ( rData.GetType() == GRAPHIC_GDIMETAFILE ) && ( ( nInst & 0xFFFE ) == 0x542 ) )
+            if( bMtfBLIP && ( GRFILTER_OK == nRes ) && ( rData.GetType() == GraphicType::GdiMetafile ) && ( ( nInst & 0xFFFE ) == 0x542 ) )
             {
                 if ( ( aMtfSize100.Width() >= 1000 ) && ( aMtfSize100.Height() >= 1000 ) )
                 {   // #75956#, scaling does not work properly, if the graphic is less than 1cm
@@ -6793,7 +6793,7 @@ bool SvxMSDffManager::ConvertToOle2( SvStream& rStm, sal_uInt32 nReadLen,
                 sal_uInt16 sz[4];
                 rStm.Read( sz, 8 );
                 Graphic aGraphic;
-                if( ERRCODE_NONE == GraphicConverter::Import( rStm, aGraphic ) && aGraphic.GetType() )
+                if( ERRCODE_NONE == GraphicConverter::Import( rStm, aGraphic ) && aGraphic.GetType() != GraphicType::NONE )
                 {
                     const GDIMetaFile& rMtf = aGraphic.GetGDIMetaFile();
                     MakeContentStream( rDest, rMtf );
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 39d15be..4ce59e4 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -614,7 +614,7 @@ void SdrEscherImport::ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd,
 
 void SdrEscherImport::RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraphic )
 {
-    if ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+    if ( rGraphic.GetType() == GraphicType::GdiMetafile )
     {
         sal_uInt16 nX, nGlobalColorsCount, nFillColorsCount;
 
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 96cb1fb..61529da 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1969,9 +1969,9 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< XDrawPage > & rxPag
         {
             Graphic aGraphic( SdrExchangeView::GetObjGraphic( pObj->GetModel(), pObj ) );
 
-            if( aGraphic.GetType() != GRAPHIC_NONE )
+            if( aGraphic.GetType() != GraphicType::NONE )
             {
-                if( aGraphic.GetType() == GRAPHIC_BITMAP )
+                if( aGraphic.GetType() == GraphicType::Bitmap )
                 {
                     GDIMetaFile    aMtf;
                     const Point    aNullPt;
diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx
index e279cde..ad635ab 100644
--- a/forms/source/component/imgprod.cxx
+++ b/forms/source/component/imgprod.cxx
@@ -259,7 +259,7 @@ void ImageProducer::setImage( css::uno::Reference< css::io::XInputStream > & rIn
 
 void ImageProducer::NewDataAvailable()
 {
-    if( ( GRAPHIC_NONE == mpGraphic->GetType() ) || mpGraphic->GetContext() )
+    if( ( GraphicType::NONE == mpGraphic->GetType() ) || mpGraphic->GetContext() )
         startProduction();
 }
 
@@ -271,17 +271,17 @@ void ImageProducer::startProduction() throw(css::uno::RuntimeException, std::exc
         bool bNotifyEmptyGraphics = false;
 
         // valid stream or filled graphic? => update consumers
-        if( mpStm || ( mpGraphic->GetType() != GRAPHIC_NONE ) )
+        if( mpStm || ( mpGraphic->GetType() != GraphicType::NONE ) )
         {
             // if we already have a graphic, we don't have to import again;
             // graphic is cleared if a new Stream is set
-            if( ( mpGraphic->GetType() == GRAPHIC_NONE ) || mpGraphic->GetContext() )
+            if( ( mpGraphic->GetType() == GraphicType::NONE ) || mpGraphic->GetContext() )
             {
                 if ( ImplImportGraphic( *mpGraphic ) )
                     maDoneHdl.Call( mpGraphic );
             }
 
-            if( mpGraphic->GetType() != GRAPHIC_NONE )
+            if( mpGraphic->GetType() != GraphicType::NONE )
                 ImplUpdateData( *mpGraphic );
             else
                 bNotifyEmptyGraphics = true;
diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx
index da73cc6..10efa5a 100644
--- a/include/vcl/graph.hxx
+++ b/include/vcl/graph.hxx
@@ -34,12 +34,12 @@
 #include <basegfx/vector/b2dsize.hxx>
 
 
-enum GraphicType
+enum class GraphicType
 {
-    GRAPHIC_NONE,
-    GRAPHIC_BITMAP,
-    GRAPHIC_GDIMETAFILE,
-    GRAPHIC_DEFAULT
+    NONE,
+    Bitmap,
+    GdiMetafile,
+    Default
 };
 
 namespace com { namespace sun { namespace star { namespace graphic { class XGraphic;} } } }
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 880351d..b4af055 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -884,9 +884,9 @@ OUString DrawingML::WriteImage( const Graphic& rGraphic , bool bRelPathToMedia )
         default:
         {
             GraphicType aType = rGraphic.GetType();
-            if ( aType == GRAPHIC_BITMAP || aType == GRAPHIC_GDIMETAFILE)
+            if ( aType == GraphicType::Bitmap || aType == GraphicType::GdiMetafile)
             {
-                if ( aType == GRAPHIC_BITMAP )
+                if ( aType == GraphicType::Bitmap )
                 {
                     (void)GraphicConverter::Export( aStream, rGraphic, ConvertDataFormat::PNG );
                     sMediaType = "image/png";
diff --git a/sc/qa/extras/sccondformats.cxx b/sc/qa/extras/sccondformats.cxx
index 9f1f8c7..135d78c 100644
--- a/sc/qa/extras/sccondformats.cxx
+++ b/sc/qa/extras/sccondformats.cxx
@@ -143,7 +143,7 @@ void ScConditionalFormatTest::testUndoAnchor()
 
     const GraphicObject& rGraphicObj = pObject->GetGraphicObject(true);
     CPPUNIT_ASSERT(!rGraphicObj.IsSwappedOut());
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_BITMAP, rGraphicObj.GetGraphic().GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
     CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
 
     // Get the document controller
@@ -177,14 +177,14 @@ void ScConditionalFormatTest::testUndoAnchor()
 
     // Check anchor type
     CPPUNIT_ASSERT(oldType == ScDrawLayer::GetAnchorType(*pObject) );
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_BITMAP, rGraphicObj.GetGraphic().GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
     CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
 
     pUndoMgr->Redo();
 
     // Check anchor type
     CPPUNIT_ASSERT(newType == ScDrawLayer::GetAnchorType(*pObject) );
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_BITMAP, rGraphicObj.GetGraphic().GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
     CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
 
     ScDrawLayer::SetPageAnchored(*pObject);
@@ -202,14 +202,14 @@ void ScConditionalFormatTest::testUndoAnchor()
 
     // Check anchor type
     CPPUNIT_ASSERT(oldType == ScDrawLayer::GetAnchorType(*pObject) );
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_BITMAP, rGraphicObj.GetGraphic().GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
     CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
 
     pUndoMgr->Redo();
 
     // Check anchor type
     CPPUNIT_ASSERT(newType == ScDrawLayer::GetAnchorType(*pObject) );
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_BITMAP, rGraphicObj.GetGraphic().GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::Bitmap), int(rGraphicObj.GetGraphic().GetType()));
     CPPUNIT_ASSERT_EQUAL(sal_uLong(864900), rGraphicObj.GetSizeBytes());
 
     xComponent->dispose();
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 294ede0..1e27fc7 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -2730,7 +2730,7 @@ void ScExportTest::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());
 
         xDocSh2->DoClose();
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 27139cc..6d54218 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -2948,13 +2948,13 @@ SdrObjectPtr XclImpPictureObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, con
     // XclImpPictureObj instance but there are so many layers of indirection I
     // don't see an easy way. This way at least ensures that we can
     // avoid a 'blank' shape that can result from a failed control import
-    if ( !xSdrObj && IsOcxControl() && maGraphic.GetType() == GRAPHIC_NONE )
+    if ( !xSdrObj && IsOcxControl() && maGraphic.GetType() == GraphicType::NONE )
     {
         const_cast< XclImpPictureObj* >( this )->maGraphic =
                 SdrOle2Obj::GetEmptyOLEReplacementGraphic();
     }
     // no OLE - create a plain picture from IMGDATA record data
-    if( !xSdrObj && (maGraphic.GetType() != GRAPHIC_NONE) )
+    if( !xSdrObj && (maGraphic.GetType() != GraphicType::NONE) )
     {
         xSdrObj.reset( new SdrGrafObj( maGraphic, rAnchorRect ) );
         ConvertRectStyle( *xSdrObj );
@@ -3441,7 +3441,7 @@ SdrObjectPtr XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicOb
                     aGraphic = rPicObj.GetGraphic();
                     aVisArea = rPicObj.GetVisArea();
                 }
-                if( aGraphic.GetType() != GRAPHIC_NONE )
+                if( aGraphic.GetType() != GraphicType::NONE )
                 {
                     ErrCode nError = ERRCODE_NONE;
                     namespace cssea = ::com::sun::star::embed::Aspects;
diff --git a/sc/source/filter/excel/xipage.cxx b/sc/source/filter/excel/xipage.cxx
index 379493f..9089828 100644
--- a/sc/source/filter/excel/xipage.cxx
+++ b/sc/source/filter/excel/xipage.cxx
@@ -166,7 +166,7 @@ void XclImpPageSettings::ReadPrintGridLines( XclImpStream& rStrm )
 void XclImpPageSettings::ReadImgData( XclImpStream& rStrm )
 {
     Graphic aGraphic = XclImpDrawing::ReadImgData( GetRoot(), rStrm );
-    if( aGraphic.GetType() != GRAPHIC_NONE )
+    if( aGraphic.GetType() != GraphicType::NONE )
         maData.mxBrushItem.reset( new SvxBrushItem( aGraphic, GPOS_TILED, ATTR_BACKGROUND ) );
 }
 
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index d228d9f..e602286 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 ead955f..35e7542 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 1632fd0..bf09e75 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 a1ec9e6..0890697 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
diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx
index 624d290..bdaefa8 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 52ed60c..835434c 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 b1a104f..67baa4f 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 52f77cb..5712439 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 bbfe30b..8704f87 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 cd3162e..3f679b9 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 c7d8031..3baf250 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 95badc5..58d7980 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
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index c56bba5..1460787 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -141,7 +141,7 @@ bool SvFileObject::GetData( css::uno::Any & rData,
                 }
 
                 if( SotClipboardFormatId::SVXB != nFmt )
-                    nFmt = (bLoadError || GRAPHIC_BITMAP == aGrf.GetType())
+                    nFmt = (bLoadError || GraphicType::Bitmap == aGrf.GetType())
                                 ? SotClipboardFormatId::BITMAP
                                 : SotClipboardFormatId::GDIMETAFILE;
 
@@ -149,7 +149,7 @@ bool SvFileObject::GetData( css::uno::Any & rData,
                 switch ( nFmt )
                 {
                 case SotClipboardFormatId::SVXB:
-                    if( GRAPHIC_NONE != aGrf.GetType() )
+                    if( GraphicType::NONE != aGrf.GetType() )
                     {
                         aMemStm.SetVersion( SOFFICE_FILEFORMAT_50 );
                         WriteGraphic( aMemStm, aGrf );
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index ae5997d..eb63351 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -133,7 +133,7 @@ public:
 
         Graphic aGraphic( mxGraphic );
 
-        if( aGraphic.GetType() == GRAPHIC_BITMAP ||
+        if( aGraphic.GetType() == GraphicType::Bitmap ||
             (bForeignSource &&
              hasUnsupportedActions(aGraphic.GetGDIMetaFile()) ) )
         {
diff --git a/slideshow/source/engine/shapes/shapeimporter.cxx b/slideshow/source/engine/shapes/shapeimporter.cxx
index 5546d16..d8c9418 100644
--- a/slideshow/source/engine/shapes/shapeimporter.cxx
+++ b/slideshow/source/engine/shapes/shapeimporter.cxx
@@ -103,8 +103,8 @@ bool importShapeGraphic(
         o_rGraphic = GraphicObject( aOldString );
 
 
-        if( GRAPHIC_DEFAULT == o_rGraphic.GetType()
-            || GRAPHIC_NONE == o_rGraphic.GetType() )
+        if( GraphicType::Default == o_rGraphic.GetType()
+            || GraphicType::NONE == o_rGraphic.GetType() )
         {
             // even the GrfMgr does not seem to know this graphic
             return false;
diff --git a/svgio/source/svgreader/svgimagenode.cxx b/svgio/source/svgreader/svgimagenode.cxx
index 47c8023..53cc564 100644
--- a/svgio/source/svgreader/svgimagenode.cxx
+++ b/svgio/source/svgreader/svgimagenode.cxx
@@ -165,7 +165,7 @@ namespace svgio
             basegfx::B2DRange& rViewBox,
             BitmapEx& rBitmapEx)
         {
-            if(GRAPHIC_BITMAP == rGraphic.GetType())
+            if(GraphicType::Bitmap == rGraphic.GetType())
             {
                 if(rGraphic.getSvgData().get())
                 {
diff --git a/svtools/qa/unit/GraphicObjectTest.cxx b/svtools/qa/unit/GraphicObjectTest.cxx
index d1ee3c2..2266442 100644
--- a/svtools/qa/unit/GraphicObjectTest.cxx
+++ b/svtools/qa/unit/GraphicObjectTest.cxx
@@ -233,11 +233,11 @@ void GraphicObjectTest::testSizeBasedAutoSwap()
 
 void GraphicObjectTest::testTdf88836()
 {
-    // Construction with empty bitmap -> type should be GRAPHIC_NONE
+    // Construction with empty bitmap -> type should be GraphicType::NONE
     Graphic aGraphic = Bitmap();
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_NONE, aGraphic.GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE), int(aGraphic.GetType()));
     aGraphic = Graphic(BitmapEx());
-    CPPUNIT_ASSERT_EQUAL(GRAPHIC_NONE, aGraphic.GetType());
+    CPPUNIT_ASSERT_EQUAL(int(GraphicType::NONE), int(aGraphic.GetType()));
 }
 
 void GraphicObjectTest::testTdf88935()
diff --git a/svtools/source/graphic/descriptor.cxx b/svtools/source/graphic/descriptor.cxx
index 1703fde..9e320ea 100644
--- a/svtools/source/graphic/descriptor.cxx
+++ b/svtools/source/graphic/descriptor.cxx
@@ -57,7 +57,7 @@ namespace unographic {
 GraphicDescriptor::GraphicDescriptor() :
     ::comphelper::PropertySetHelper( createPropertySetInfo(), SAL_NO_ACQUIRE ),
     mpGraphic( nullptr ),
-    meType( GRAPHIC_NONE ),
+    meType( GraphicType::NONE ),
     mnBitsPerPixel ( 0 ),
     mbTransparent ( false ),
     mbAlpha( false ),
@@ -100,7 +100,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
 
     mpGraphic = nullptr;
     maMimeType.clear();
-    meType = GRAPHIC_NONE;
+    meType = GraphicType::NONE;
     mnBitsPerPixel = 0;
     mbTransparent = false;
 
@@ -144,7 +144,7 @@ void GraphicDescriptor::implCreate( SvStream& rIStm, const OUString* pURL )
 
         if( graphic::GraphicType::EMPTY != cType )
         {
-            meType = ( ( graphic::GraphicType::PIXEL == cType ) ? GRAPHIC_BITMAP : GRAPHIC_GDIMETAFILE );
+            meType = ( ( graphic::GraphicType::PIXEL == cType ) ? GraphicType::Bitmap : GraphicType::GdiMetafile );
             maMimeType = OUString( pMimeType, strlen(pMimeType), RTL_TEXTENCODING_ASCII_US );
             maSizePixel = aDescriptor.GetSizePixel();
             maSize100thMM = aDescriptor.GetSize_100TH_MM();
@@ -306,8 +306,8 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
             {
                 const GraphicType eType( mpGraphic ? mpGraphic->GetType() : meType );
 
-                *pValues <<= ( ( eType == GRAPHIC_BITMAP ? graphic::GraphicType::PIXEL :
-                                ( eType == GRAPHIC_GDIMETAFILE ? graphic::GraphicType::VECTOR :
+                *pValues <<= ( ( eType == GraphicType::Bitmap ? graphic::GraphicType::PIXEL :
+                                ( eType == GraphicType::GdiMetafile ? graphic::GraphicType::VECTOR :
                                 graphic::GraphicType::EMPTY ) ) );
             }
             break;
@@ -347,7 +347,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
                             aMimeType = OUString::createFromAscii( pMimeType );
                     }
 
-                    if( aMimeType.isEmpty() && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
+                    if( aMimeType.isEmpty() && ( mpGraphic->GetType() != GraphicType::NONE ) )
                         aMimeType = MIMETYPE_VCLGRAPHIC;
                 }
                 else
@@ -363,7 +363,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
 
                 if( mpGraphic )
                 {
-                    if( mpGraphic->GetType() == GRAPHIC_BITMAP )
+                    if( mpGraphic->GetType() == GraphicType::Bitmap )
                     {
                         const Size aSizePix( mpGraphic->GetBitmapEx().GetSizePixel() );
                         aAWTSize = awt::Size( aSizePix.Width(), aSizePix.Height() );
@@ -401,7 +401,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
 
                 if( mpGraphic )
                 {
-                    if( mpGraphic->GetType() == GRAPHIC_BITMAP )
+                    if( mpGraphic->GetType() == GraphicType::Bitmap )
                         nBitsPerPixel = mpGraphic->GetBitmapEx().GetBitmap().GetBitCount();
                 }
                 else
diff --git a/svtools/source/graphic/graphic.cxx b/svtools/source/graphic/graphic.cxx
index 207f0de..3739d3b 100644
--- a/svtools/source/graphic/graphic.cxx
+++ b/svtools/source/graphic/graphic.cxx
@@ -161,8 +161,8 @@ uno::Sequence< sal_Int8 > SAL_CALL Graphic::getImplementationId()
 {
     ::sal_Int8 cRet = graphic::GraphicType::EMPTY;
 
-    if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
-        cRet = ( ( mpGraphic->GetType() == GRAPHIC_BITMAP ) ? graphic::GraphicType::PIXEL : graphic::GraphicType::VECTOR );
+    if( mpGraphic && ( mpGraphic->GetType() != GraphicType::NONE ) )
+        cRet = ( ( mpGraphic->GetType() == GraphicType::Bitmap ) ? graphic::GraphicType::PIXEL : graphic::GraphicType::VECTOR );
 
     return cRet;
 }
@@ -176,7 +176,7 @@ awt::Size SAL_CALL Graphic::getSize(  ) throw (uno::RuntimeException, std::excep
     SolarMutexGuard aGuard;
 
     ::Size aVclSize;
-    if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
+    if( mpGraphic && ( mpGraphic->GetType() != GraphicType::NONE ) )
         aVclSize = mpGraphic->GetSizePixel();
 
     return awt::Size( aVclSize.Width(), aVclSize.Height() );
@@ -187,7 +187,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getDIB(  ) throw (uno::RuntimeExce
 {
     SolarMutexGuard aGuard;
 
-    if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
+    if( mpGraphic && ( mpGraphic->GetType() != GraphicType::NONE ) )
     {
         SvMemoryStream aMem;
 
@@ -205,7 +205,7 @@ uno::Sequence< ::sal_Int8 > SAL_CALL Graphic::getMaskDIB(  ) throw (uno::Runtime
 {
     SolarMutexGuard aGuard;
 
-    if( mpGraphic && ( mpGraphic->GetType() != GRAPHIC_NONE ) )
+    if( mpGraphic && ( mpGraphic->GetType() != GraphicType::NONE ) )
     {
         SvMemoryStream aMem;
 
diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index 18e75d5..3a37dbb 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -69,7 +69,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
 
     switch( rGraphic.GetType() )
     {
-        case GRAPHIC_BITMAP:
+        case GraphicType::Bitmap:
         {
             if(rGraphic.getSvgData().get())
             {
@@ -102,7 +102,7 @@ GraphicID::GraphicID( const GraphicObject& rObj )
         }
         break;
 
-        case GRAPHIC_GDIMETAFILE:
+        case GraphicType::GdiMetafile:
         {
             const GDIMetaFile& rMtf = rGraphic.GetGDIMetaFile();
 
@@ -227,7 +227,7 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
 
         switch( rGraphic.GetType() )
         {
-            case GRAPHIC_BITMAP:
+            case GraphicType::Bitmap:
             {
                 if(rGraphic.getSvgData().get())
                 {
@@ -244,7 +244,7 @@ bool GraphicCacheEntry::ImplInit( const GraphicObject& rObj )
             }
             break;
 
-            case GRAPHIC_GDIMETAFILE:
+            case GraphicType::GdiMetafile:
             {
                 mpMtf = new GDIMetaFile( rGraphic.GetGDIMetaFile() );
             }
@@ -273,7 +273,7 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute )
     const MapMode       aPrefMapMode( rSubstitute.GetPrefMapMode() );
     const Link<Animation*,void> aAnimationNotifyHdl( rSubstitute.GetAnimationNotifyHdl() );
     const GraphicType   eOldType = rSubstitute.GetType();
-    const bool          bDefaultType = ( rSubstitute.GetType() == GRAPHIC_DEFAULT );
+    const bool          bDefaultType = ( rSubstitute.GetType() == GraphicType::Default );
 
     if( rSubstitute.IsLink() && ( GFX_LINK_TYPE_NONE == maGfxLink.GetType() ) )
         maGfxLink = rSubstitute.GetLink();
@@ -299,7 +299,7 @@ void GraphicCacheEntry::ImplFillSubstitute( Graphic& rSubstitute )
         rSubstitute.Clear();
     }
 
-    if( eOldType != GRAPHIC_NONE )
+    if( eOldType != GraphicType::NONE )
     {
         rSubstitute.SetPrefSize( aPrefSize );
         rSubstitute.SetPrefMapMode( aPrefMapMode );
@@ -759,9 +759,9 @@ sal_uLong GraphicDisplayCacheEntry::GetNeededSize( OutputDevice* pOut, const Poi
     const GraphicType   eType = rGraphic.GetType();
 
     bool canCacheAsBitmap = false;
-    if( GRAPHIC_BITMAP == eType )
+    if( GraphicType::Bitmap == eType )
         canCacheAsBitmap = true;
-    else if( GRAPHIC_GDIMETAFILE == eType )
+    else if( GraphicType::GdiMetafile == eType )
         canCacheAsBitmap = IsCacheableAsBitmap( rGraphic.GetGDIMetaFile(), pOut, rSz );
     else
         return 0;
@@ -847,9 +847,9 @@ void GraphicCache::AddGraphicObject(
     if(  !rObj.IsSwappedOut()
       && (  pID
          || (    pCopyObj
-            && ( pCopyObj->GetType() != GRAPHIC_NONE )
+            && ( pCopyObj->GetType() != GraphicType::NONE )
             )
-         || ( rObj.GetType() != GRAPHIC_NONE )
+         || ( rObj.GetType() != GraphicType::NONE )
          )
       )
     {
diff --git a/svtools/source/graphic/grfmgr.cxx b/svtools/source/graphic/grfmgr.cxx
index 064b77a..42b2799 100644
--- a/svtools/source/graphic/grfmgr.cxx
+++ b/svtools/source/graphic/grfmgr.cxx
@@ -249,7 +249,7 @@ void GraphicObject::ImplAutoSwapIn()
                                 if( pIStm )
                                 {
                                     ReadGraphic( *pIStm, maGraphic );
-                                    mbAutoSwapped = ( maGraphic.GetType() != GRAPHIC_NONE );
+                                    mbAutoSwapped = ( maGraphic.GetType() != GraphicType::NONE );
                                 }
                             }
                         }
@@ -266,7 +266,7 @@ void GraphicObject::ImplAutoSwapIn()
                 }
                 else
                 {
-                    DBG_ASSERT( ( GRAPHIC_NONE == meType ) || ( GRAPHIC_DEFAULT == meType ),
+                    DBG_ASSERT( ( GraphicType::NONE == meType ) || ( GraphicType::Default == meType ),
                                 "GraphicObject::ImplAutoSwapIn: could not get stream to swap in graphic! (=>KA)" );
                 }
             }
@@ -285,7 +285,7 @@ bool GraphicObject::ImplGetCropParams( OutputDevice* pOut, Point& rPt, Size& rSz
 {
     bool bRet = false;
 
-    if( GetType() != GRAPHIC_NONE )
+    if( GetType() != GraphicType::NONE )
     {
         tools::Polygon aClipPoly( Rectangle( rPt, rSz ) );
         const sal_uInt16 nRot10 = pAttr->GetRotation() % 3600;
@@ -728,7 +728,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
     Size aCropLeftTop;
     Size aCropRightBottom;
 
-    if( GRAPHIC_GDIMETAFILE == eType )
+    if( GraphicType::GdiMetafile == eType )
     {
         GDIMetaFile aMtf( aTransGraphic.GetGDIMetaFile() );
 
@@ -797,7 +797,7 @@ Graphic GraphicObject::GetTransformedGraphic( const Size& rDestSize, const MapMo
 
         aTransGraphic = aMtf;
     }
-    else if( GRAPHIC_BITMAP == eType )
+    else if( GraphicType::Bitmap == eType )
     {
         BitmapEx aBitmapEx( aTransGraphic.GetBitmapEx() );
         Rectangle aCropRect;
@@ -953,7 +953,7 @@ Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const /
     {
         if( aAttr.IsSpecialDrawMode() || aAttr.IsAdjusted() || aAttr.IsMirrored() || aAttr.IsRotated() || aAttr.IsTransparent() )
         {
-            if( GetType() == GRAPHIC_BITMAP )
+            if( GetType() == GraphicType::Bitmap )
             {
                 if( IsAnimated() )
                 {
@@ -978,7 +978,7 @@ Graphic GraphicObject::GetTransformedGraphic( const GraphicAttr* pAttr ) const /
         }
         else
         {
-            if( ( GetType() == GRAPHIC_BITMAP ) && IsAnimated() )
+            if( ( GetType() == GraphicType::Bitmap ) && IsAnimated() )
             {
                 Animation aAnimation( maGraphic.GetAnimation() );
                 aAnimation.SetLoopCount( mnAnimationLoopCount );
diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx
index 1f934f7..457d71f 100644
--- a/svtools/source/graphic/grfmgr2.cxx
+++ b/svtools/source/graphic/grfmgr2.cxx
@@ -92,7 +92,7 @@ bool GraphicManager::DrawObj( OutputDevice* pOut, const Point& rPt, const Size&
 
     rCached = false;
 
-    if( ( rObj.GetType() == GRAPHIC_BITMAP ) || ( rObj.GetType() == GRAPHIC_GDIMETAFILE ) )
+    if( ( rObj.GetType() == GraphicType::Bitmap ) || ( rObj.GetType() == GraphicType::GdiMetafile ) )
     {
         // create output and fill cache
 
@@ -245,7 +245,7 @@ bool GraphicManager::ImplDraw( OutputDevice* pOut, const Point& rPt,
 
     if( rGraphic.IsSupportedGraphic() && !rObj.IsSwappedOut() )
     {
-        if( GRAPHIC_BITMAP == rGraphic.GetType() )
+        if( GraphicType::Bitmap == rGraphic.GetType() )
         {
             const BitmapEx aSrcBmpEx( rGraphic.GetBitmapEx() );
 
@@ -1891,7 +1891,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice* pOut, const Rectangle& rArea, c
 
     // #i42643# Casting to Int64, to avoid integer overflow for
     // huge-DPI output devices
-    if( GetGraphic().GetType() == GRAPHIC_BITMAP &&
+    if( GetGraphic().GetType() == GraphicType::Bitmap &&
         static_cast<sal_Int64>(rSizePixel.Width()) * rSizePixel.Height() <
         static_cast<sal_Int64>(nTileCacheSize1D)*nTileCacheSize1D )
     {
@@ -1996,7 +1996,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel,
     int     nX, nY;
 
     // #107607# Use logical coordinates for metafile playing, too
-    bool    bDrawInPixel( rOut.GetConnectMetaFile() == nullptr && GRAPHIC_BITMAP == GetType() );
+    bool    bDrawInPixel( rOut.GetConnectMetaFile() == nullptr && GraphicType::Bitmap == GetType() );
     bool    bRet = false;
 
     // #105229# Switch off mapping (converting to logic and back to
diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx
index 57ed103..321818f 100644
--- a/svtools/source/graphic/provider.cxx
+++ b/svtools/source/graphic/provider.cxx
@@ -478,7 +478,7 @@ uno::Reference< ::graphic::XGraphic > SAL_CALL GraphicProvider::queryGraphic( co
 
             if( ( rFilter.ImportGraphic( aVCLGraphic, aPath, *pIStm,
                                          GRFILTER_FORMAT_DONTKNOW, nullptr, GraphicFilterImportFlags::NONE, pExtHeader ) == GRFILTER_OK ) &&
-                ( aVCLGraphic.GetType() != GRAPHIC_NONE ) )
+                ( aVCLGraphic.GetType() != GraphicType::NONE ) )
             {
                 ::unographic::Graphic* pUnoGraphic = new ::unographic::Graphic;
 
@@ -602,7 +602,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
         else if (aName == "ImageResolution")
             aValue >>= nImageResolution;
     }
-    if ( rGraphic.GetType() == GRAPHIC_BITMAP )
+    if ( rGraphic.GetType() == GraphicType::Bitmap )
     {
         if(rGraphic.getSvgData().get())
         {
@@ -623,7 +623,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal
             ImplApplyBitmapScaling( rGraphic, nPixelWidth, nPixelHeight );
         }
     }
-    else if ( ( rGraphic.GetType() == GRAPHIC_GDIMETAFILE ) && nImageResolution )
+    else if ( ( rGraphic.GetType() == GraphicType::GdiMetafile ) && nImageResolution )
     {
         ScopedVclPtrInstance< VirtualDevice > aDummyVDev;
         GDIMetaFile aMtf( rGraphic.GetGDIMetaFile() );
@@ -812,7 +812,7 @@ void SAL_CALL GraphicProvider::storeGraphic( const uno::Reference< ::graphic::XG
                 const uno::Reference< XInterface >  xIFace( rxGraphic, uno::UNO_QUERY );
                 const ::Graphic*                    pGraphic = ::unographic::Graphic::getImplementation( xIFace );
 
-                if( pGraphic && ( pGraphic->GetType() != GRAPHIC_NONE ) )
+                if( pGraphic && ( pGraphic->GetType() != GraphicType::NONE ) )
                 {
                     ::Graphic aGraphic( *pGraphic );
                     ImplApplyFilterData( aGraphic, aFilterDataSeq );
diff --git a/svtools/source/graphic/transformer.cxx b/svtools/source/graphic/transformer.cxx
index fbfdfa3..0de58a3 100644
--- a/svtools/source/graphic/transformer.cxx
+++ b/svtools/source/graphic/transformer.cxx
@@ -81,7 +81,7 @@ uno::Reference< graphic::XGraphic > SAL_CALL GraphicTransformer::colorChange(
     BitmapColor aColorTo( static_cast< sal_uInt8 >( nColorTo ), static_cast< sal_uInt8 >( nColorTo >> 8 ), static_cast< sal_uInt8 >( nColorTo  >> 16 ) );
     const sal_uInt8 cIndexFrom = aColorFrom.GetBlueOrIndex();
 
-    if ( aGraphic.GetType() == GRAPHIC_BITMAP || aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+    if ( aGraphic.GetType() == GraphicType::Bitmap || aGraphic.GetType() == GraphicType::GdiMetafile )
     {
         BitmapEx    aBitmapEx( aGraphic.GetBitmapEx() );
         Bitmap      aBitmap( aBitmapEx.GetBitmap() );
diff --git a/svtools/source/misc/transfer.cxx b/svtools/source/misc/transfer.cxx
index f21d861..18305d8 100644
--- a/svtools/source/misc/transfer.cxx
+++ b/svtools/source/misc/transfer.cxx
@@ -709,7 +709,7 @@ bool TransferableHelper::SetGDIMetaFile( const GDIMetaFile& rMtf, const DataFlav
 
 bool TransferableHelper::SetGraphic( const Graphic& rGraphic, const DataFlavor& )
 {
-    if( rGraphic.GetType() != GRAPHIC_NONE )
+    if( rGraphic.GetType() != GraphicType::NONE )
     {
         SvMemoryStream aMemStm( 65535, 65535 );
 
diff --git a/svtools/source/misc/transfer2.cxx b/svtools/source/misc/transfer2.cxx
index 782b804..5b7a3da 100644
--- a/svtools/source/misc/transfer2.cxx
+++ b/svtools/source/misc/transfer2.cxx
@@ -462,7 +462,7 @@ void TransferDataContainer::CopyImageMap( const ImageMap& rImgMap )
 void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
 {
     GraphicType nType = rGrf.GetType();
-    if( GRAPHIC_NONE != nType )
+    if( GraphicType::NONE != nType )
     {
         if( !pImpl->pGrf )
             pImpl->pGrf = new Graphic( rGrf );
@@ -471,12 +471,12 @@ void TransferDataContainer::CopyGraphic( const Graphic& rGrf )
 
         AddFormat( SotClipboardFormatId::SVXB );
 
-        if( GRAPHIC_BITMAP == nType )
+        if( GraphicType::Bitmap == nType )
         {
             AddFormat( SotClipboardFormatId::PNG );
             AddFormat( SotClipboardFormatId::BITMAP );
         }
-        else if( GRAPHIC_GDIMETAFILE == nType )
+        else if( GraphicType::GdiMetafile == nType )
         {
             AddFormat( SotClipboardFormatId::GDIMETAFILE );
         }
diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx
index e9a7e4c..f947e7a 100644
--- a/svx/source/dialog/_bmpmask.cxx
+++ b/svx/source/dialog/_bmpmask.cxx
@@ -1016,7 +1016,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
 
     switch( rGraphic.GetType() )
     {
-        case GRAPHIC_BITMAP:
+        case GraphicType::Bitmap:
         {
             if( rGraphic.IsAnimated() )
             {
@@ -1081,7 +1081,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic )
         }
         break;
 
-        case GRAPHIC_GDIMETAFILE:
+        case GraphicType::GdiMetafile:
         {
             GDIMetaFile aMtf( aGraphic.GetGDIMetaFile() );
 
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index 0965114..b27af8a 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -108,7 +108,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
     Bitmap  aBmp;
     XOutFlags nContourFlags = XOutFlags::ContourHorz;
 
-    if ( rGraphic.GetType() == GRAPHIC_BITMAP )
+    if ( rGraphic.GetType() == GraphicType::Bitmap )
     {
         if( rGraphic.IsAnimated() )
         {
@@ -148,7 +148,7 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
             nContourFlags |= XOutFlags::ContourEdgeDetect;
         }
     }
-    else if( rGraphic.GetType() != GRAPHIC_NONE )
+    else if( rGraphic.GetType() != GraphicType::NONE )
     {
         const Graphic   aTmpGrf( rGraphic.GetGDIMetaFile().GetMonochromeMtf( Color( COL_BLACK ) ) );
         ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -352,7 +352,7 @@ void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic )
 
 void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
 {
-    DBG_ASSERT(  m_pContourWnd->GetGraphic().GetType() != GRAPHIC_NONE, "Graphic must've been set first!" );
+    DBG_ASSERT(  m_pContourWnd->GetGraphic().GetType() != GraphicType::NONE, "Graphic must've been set first!" );
 
     tools::PolyPolygon aPolyPoly( rPolyPoly );
     const MapMode   aMap100( MAP_100TH_MM );
@@ -423,12 +423,12 @@ void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicL
 
 bool SvxSuperContourDlg::IsUndoPossible() const
 {
-    return aUndoGraphic.GetType() != GRAPHIC_NONE;
+    return aUndoGraphic.GetType() != GraphicType::NONE;
 }
 
 bool SvxSuperContourDlg::IsRedoPossible() const
 {
-    return aRedoGraphic.GetType() != GRAPHIC_NONE;
+    return aRedoGraphic.GetType() != GraphicType::NONE;
 }
 
 // Click handler for ToolBox
@@ -613,7 +613,7 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void )
     const bool          bPipette = m_pTbx1->IsItemChecked(mnPipetteId);
     const bool          bWorkplace = m_pTbx1->IsItemChecked(mnWorkSpaceId);
     const bool          bDontHide = !( bPipette || bWorkplace );
-    const bool          bBitmap = pWnd->GetGraphic().GetType() == GRAPHIC_BITMAP;
+    const bool          bBitmap = pWnd->GetGraphic().GetType() == GraphicType::Bitmap;
 
     m_pTbx1->EnableItem(mnApplyId, bDontHide && bExecState && pWnd->IsChanged());
 
@@ -690,7 +690,7 @@ IMPL_LINK_TYPED( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void
 
         EnterWait();
 
-        if( aGraphic.GetType() == GRAPHIC_BITMAP )
+        if( aGraphic.GetType() == GraphicType::Bitmap )
         {
             Bitmap      aBmp( aGraphic.GetBitmap() );
             const long  nTol = static_cast<long>(m_pMtfTolerance->GetValue() * 255L / 100L);
diff --git a/svx/source/dialog/contwnd.cxx b/svx/source/dialog/contwnd.cxx
index 6b56001..e0faf2d 100644
--- a/svx/source/dialog/contwnd.cxx
+++ b/svx/source/dialog/contwnd.cxx
@@ -230,7 +230,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle& r
     rTarget.DrawRect( Rectangle( Point(), GetGraphicSize() ) );
     rTarget.Pop();
 
-    if (rGraphic.GetType() != GRAPHIC_NONE)
+    if (rGraphic.GetType() != GraphicType::NONE)
         rGraphic.Draw(&rTarget, Point(), GetGraphicSize());
 
     if (aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom())
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 8dca9a9..fac0708 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -173,7 +173,7 @@ void GraphCtrl::InitSdrModel()
 void GraphCtrl::SetGraphic( const Graphic& rGraphic, bool bNewModel )
 {
     // If possible we dither bitmaps for the display
-    if ( !bAnim && ( rGraphic.GetType() == GRAPHIC_BITMAP )  )
+    if ( !bAnim && ( rGraphic.GetType() == GraphicType::Bitmap )  )
     {
         if ( rGraphic.IsTransparent() )
         {
@@ -251,7 +251,7 @@ void GraphCtrl::Paint( vcl::RenderContext& rRenderContext, const Rectangle& rRec
 {
     // #i72889# used splitted repaint to be able to paint an own background
     // even to the buffered view
-    const bool bGraphicValid(GRAPHIC_NONE != aGraphic.GetType());
+    const bool bGraphicValid(GraphicType::NONE != aGraphic.GetType());
 
     if (bSdrMode)
     {
diff --git a/svx/source/dialog/grfflt.cxx b/svx/source/dialog/grfflt.cxx
index 7451f07..ce305c6 100644
--- a/svx/source/dialog/grfflt.cxx
+++ b/svx/source/dialog/grfflt.cxx
@@ -35,7 +35,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
     const Graphic&  rGraphic = rFilterObject.GetGraphic();
     sal_uIntPtr         nRet = SVX_GRAPHICFILTER_UNSUPPORTED_GRAPHICTYPE;
 
-    if( rGraphic.GetType() == GRAPHIC_BITMAP )
+    if( rGraphic.GetType() == GraphicType::Bitmap )
     {
         SfxViewFrame*   pViewFrame = SfxViewFrame::Current();
         SfxObjectShell* pShell = pViewFrame ? pViewFrame->GetObjectShell() : nullptr;
@@ -262,7 +262,7 @@ sal_uIntPtr SvxGraphicFilter::ExecuteGrfFilterSlot( SfxRequest& rReq, GraphicObj
             break;
         }
 
-        if( aGraphic.GetType() != GRAPHIC_NONE )
+        if( aGraphic.GetType() != GraphicType::NONE )
         {
             rFilterObject.SetGraphic( aGraphic );
             nRet = SVX_GRAPHICFILTER_ERRCODE_NONE;
diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx
index 0b71adc..f7c86ab8 100644
--- a/svx/source/gallery2/galmisc.cxx
+++ b/svx/source/gallery2/galmisc.cxx
@@ -494,7 +494,7 @@ void GalleryTransferable::AddSupportedFormats()
         {
             AddFormat( SotClipboardFormatId::SVXB );
 
-            if( mpGraphicObject->GetType() == GRAPHIC_GDIMETAFILE )
+            if( mpGraphicObject->GetType() == GraphicType::GdiMetafile )
             {
                 AddFormat( SotClipboardFormatId::GDIMETAFILE );
                 AddFormat( SotClipboardFormatId::BITMAP );
diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx
index 81393ea..d83c1e7 100644
--- a/svx/source/gallery2/galobj.cxx
+++ b/svx/source/gallery2/galobj.cxx
@@ -93,7 +93,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
 {
     bool bRet = false;
 
-    if( rGraphic.GetType() == GRAPHIC_BITMAP )
+    if( rGraphic.GetType() == GraphicType::Bitmap )
     {
         BitmapEx    aBmpEx( rGraphic.GetBitmapEx() );
         Size        aBmpSize( aBmpEx.GetSizePixel() );
@@ -144,7 +144,7 @@ bool SgaObject::CreateThumb( const Graphic& rGraphic )
             }
         }
     }
-    else if( rGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+    else if( rGraphic.GetType() == GraphicType::GdiMetafile )
     {
         const Size aPrefSize( rGraphic.GetPrefSize() );
         const double fFactor  = (double)aPrefSize.Width() / (double)aPrefSize.Height();
diff --git a/svx/source/gallery2/galtheme.cxx b/svx/source/gallery2/galtheme.cxx
index bd3ea97..507d990 100644
--- a/svx/source/gallery2/galtheme.cxx
+++ b/svx/source/gallery2/galtheme.cxx
@@ -843,7 +843,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo
 {
     bool bRet = false;
 
-    if( rGraphic.GetType() != GRAPHIC_NONE )
+    if( rGraphic.GetType() != GraphicType::NONE )
     {
         ConvertDataFormat nExportFormat = ConvertDataFormat::Unknown;
         const GfxLink     aGfxLink( ( (Graphic&) rGraphic ).GetLink() );
@@ -872,7 +872,7 @@ bool GalleryTheme::InsertGraphic( const Graphic& rGraphic, sal_uIntPtr nInsertPo
         }
         else
         {
-            if( rGraphic.GetType() == GRAPHIC_BITMAP )
+            if( rGraphic.GetType() == GraphicType::Bitmap )
             {
                 if( rGraphic.IsAnimated() )
                     nExportFormat = ConvertDataFormat::GIF;
diff --git a/svx/source/sdr/contact/viewcontactofgraphic.cxx b/svx/source/sdr/contact/viewcontactofgraphic.cxx
index e76f47d..ba098897 100644
--- a/svx/source/sdr/contact/viewcontactofgraphic.cxx
+++ b/svx/source/sdr/contact/viewcontactofgraphic.cxx
@@ -426,7 +426,7 @@ namespace sdr
                 return true;
 
             // draft when no graphic
-            if(GRAPHIC_NONE == rGraphicObject.GetType() || GRAPHIC_DEFAULT == rGraphicObject.GetType())
+            if(GraphicType::NONE == rGraphicObject.GetType() || GraphicType::Default == rGraphicObject.GetType())
                return true;
 
             return false;
diff --git a/svx/source/sdr/primitive2d/sdrattributecreator.cxx b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
index 79fdbf9..0452910 100644
--- a/svx/source/sdr/primitive2d/sdrattributecreator.cxx
+++ b/svx/source/sdr/primitive2d/sdrattributecreator.cxx
@@ -629,7 +629,7 @@ namespace drawinglayer
         {
             Graphic aGraphic(static_cast<const XFillBitmapItem&>(rSet.Get(XATTR_FILLBITMAP)).GetGraphicObject().GetGraphic());
 
-            if(!(GRAPHIC_BITMAP == aGraphic.GetType() || GRAPHIC_GDIMETAFILE == aGraphic.GetType()))
+            if(!(GraphicType::Bitmap == aGraphic.GetType() || GraphicType::GdiMetafile == aGraphic.GetType()))
             {
                 // no content if not bitmap or metafile
                 OSL_ENSURE(false, "No fill graphic in SfxItemSet (!)");
@@ -641,7 +641,7 @@ namespace drawinglayer
             if(!aPrefSize.Width() || !aPrefSize.Height())
             {
                 // if there is no logical size, create a size from pixel size and set MapMode accordingly
-                if(GRAPHIC_BITMAP == aGraphic.GetType())
+                if(GraphicType::Bitmap == aGraphic.GetType())
                 {
                     aGraphic.SetPrefSize(aGraphic.GetBitmapEx().GetSizePixel());
                     aGraphic.SetPrefMapMode(MAP_PIXEL);
diff --git a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
index 235c0a6..276f68d 100644
--- a/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
+++ b/svx/source/sdr/primitive2d/sdrolecontentprimitive2d.cxx
@@ -51,14 +51,14 @@ namespace drawinglayer
                 }
             }
 #ifdef _WIN32 // Little point in displaying the "broken OLE" graphic on OSes that don't have real OLE, maybe?
-            if(GRAPHIC_NONE == aGraphic.GetType())
+            if(GraphicType::NONE == aGraphic.GetType())
             {
                 // no source, use fallback resource empty OLE graphic
                 aGraphic = SdrOle2Obj::GetEmptyOLEReplacementGraphic();
                 bScaleContent = true;
             }
 #endif
-            if(GRAPHIC_NONE != aGraphic.GetType())
+            if(GraphicType::NONE != aGraphic.GetType())
             {
                 const GraphicObject aGraphicObject(aGraphic);
                 const GraphicAttr aGraphicAttr;
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index fc96f3d..2a636e1 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -3787,7 +3787,7 @@ bool SdrDragCrop::EndSdrDrag(bool /*bCopy*/)
     // This part of code handles the case where pSdrObject is SdrGrafObj
 
     SdrGrafObj* pObj = dynamic_cast<SdrGrafObj*>( pSdrObject );
-    if( !pObj || (pObj->GetGraphicType() == GRAPHIC_NONE) || (pObj->GetGraphicType() == GRAPHIC_DEFAULT) )
+    if( !pObj || (pObj->GetGraphicType() == GraphicType::NONE) || (pObj->GetGraphicType() == GraphicType::Default) )
         return false;
 
     const GraphicObject& rGraphicObject = pObj->GetGraphicObject();
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index c67599d..6655c4f 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -481,14 +481,14 @@ Graphic SdrGrafObj::GetTransformedGraphic( SdrGrafObjTransformsAttrs nTransformF
     const Size      aDestSize( GetLogicRect().GetSize() );
     const bool      bMirror = bool( nTransformFlags & SdrGrafObjTransformsAttrs::MIRROR );
     const bool      bRotate = bool( nTransformFlags & SdrGrafObjTransformsAttrs::ROTATE ) &&
-        ( aGeo.nRotationAngle && aGeo.nRotationAngle != 18000 ) && ( GRAPHIC_NONE != eType );
+        ( aGeo.nRotationAngle && aGeo.nRotationAngle != 18000 ) && ( GraphicType::NONE != eType );
 
     // Need cropping info earlier
     const_cast<SdrGrafObj*>(this)->ImpSetAttrToGrafInfo();
     GraphicAttr aActAttr;
 
     if( SdrGrafObjTransformsAttrs::NONE != nTransformFlags &&
-        GRAPHIC_NONE != eType )
+        GraphicType::NONE != eType )
     {
         // Actually transform the graphic only in this case.
         // Cropping always happens, though.
@@ -595,8 +595,8 @@ void SdrGrafObj::ForceSwapIn() const
         pGraphic->FireSwapInRequest();
 
     if( pGraphic->IsSwappedOut() ||
-        ( pGraphic->GetType() == GRAPHIC_NONE ) ||
-        ( pGraphic->GetType() == GRAPHIC_DEFAULT ) )
+        ( pGraphic->GetType() == GraphicType::NONE ) ||
+        ( pGraphic->GetType() == GraphicType::Default ) )
     {
         Graphic aDefaultGraphic;
         aDefaultGraphic.SetDefaultType();
@@ -659,7 +659,7 @@ bool SdrGrafObj::IsLinkedGraphic() const
 
 void SdrGrafObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
-    bool bNoPresGrf = ( pGraphic->GetType() != GRAPHIC_NONE ) && !bEmptyPresObj;
+    bool bNoPresGrf = ( pGraphic->GetType() != GraphicType::NONE ) && !bEmptyPresObj;
 
     rInfo.bResizeFreeAllowed = aGeo.nRotationAngle % 9000 == 0 ||
                                aGeo.nRotationAngle % 18000 == 0 ||
@@ -733,7 +733,7 @@ OUString SdrGrafObj::TakeObjNameSingul() const
     {
         switch( pGraphic->GetType() )
         {
-            case GRAPHIC_BITMAP:
+            case GraphicType::Bitmap:
             {
                 const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || static_cast<const SdrGrafTransparenceItem&>( GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
                                      ( IsLinkedGraphic() ? STR_ObjNameSingulGRAFBMPTRANSLNK : STR_ObjNameSingulGRAFBMPTRANS ) :
@@ -743,11 +743,11 @@ OUString SdrGrafObj::TakeObjNameSingul() const
             }
             break;
 
-            case GRAPHIC_GDIMETAFILE:
+            case GraphicType::GdiMetafile:
                 sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNameSingulGRAFMTFLNK : STR_ObjNameSingulGRAFMTF));
             break;
 
-            case GRAPHIC_NONE:
+            case GraphicType::NONE:
                 sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNameSingulGRAFNONELNK : STR_ObjNameSingulGRAFNONE));
             break;
 
@@ -786,7 +786,7 @@ OUString SdrGrafObj::TakeObjNamePlural() const
     {
         switch( pGraphic->GetType() )
         {
-            case GRAPHIC_BITMAP:
+            case GraphicType::Bitmap:
             {
                 const sal_uInt16 nId = ( ( pGraphic->IsTransparent() || static_cast<const SdrGrafTransparenceItem&>( GetObjectItem( SDRATTR_GRAFTRANSPARENCE ) ).GetValue() ) ?
                                      ( IsLinkedGraphic() ? STR_ObjNamePluralGRAFBMPTRANSLNK : STR_ObjNamePluralGRAFBMPTRANS ) :
@@ -796,11 +796,11 @@ OUString SdrGrafObj::TakeObjNamePlural() const
             }
             break;
 
-            case GRAPHIC_GDIMETAFILE:
+            case GraphicType::GdiMetafile:
                 sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFMTFLNK : STR_ObjNamePluralGRAFMTF));
             break;
 
-            case GRAPHIC_NONE:
+            case GraphicType::NONE:
                 sName.append(ImpGetResStr(IsLinkedGraphic() ? STR_ObjNamePluralGRAFNONELNK : STR_ObjNamePluralGRAFNONE));
             break;
 
@@ -1027,12 +1027,12 @@ void SdrGrafObj::StartAnimation( OutputDevice* /*pOutDev*/, const Point& /*rPoin
 
 bool SdrGrafObj::HasGDIMetaFile() const
 {
-    return( pGraphic->GetType() == GRAPHIC_GDIMETAFILE );
+    return( pGraphic->GetType() == GraphicType::GdiMetafile );
 }
 
 bool SdrGrafObj::isEmbeddedSvg() const
 {
-    return GRAPHIC_BITMAP == GetGraphicType() && GetGraphic().getSvgData().get();
+    return GraphicType::Bitmap == GetGraphicType() && GetGraphic().getSvgData().get();
 }
 
 GDIMetaFile SdrGrafObj::getMetafileFromEmbeddedSvg() const
@@ -1073,16 +1073,16 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
         // use the old converter path over the MetaFile mechanism. Create Metafile from Svg
         // primitives here pretty directly
         aMtf = getMetafileFromEmbeddedSvg();
-        aGraphicType = GRAPHIC_GDIMETAFILE;
+        aGraphicType = GraphicType::GdiMetafile;
     }
-    else if(GRAPHIC_GDIMETAFILE == aGraphicType)
+    else if(GraphicType::GdiMetafile == aGraphicType)
     {
         aMtf = GetTransformedGraphic(SdrGrafObjTransformsAttrs::COLOR|SdrGrafObjTransformsAttrs::MIRROR).GetGDIMetaFile();
     }
 
     switch(aGraphicType)
     {
-        case GRAPHIC_GDIMETAFILE:
+        case GraphicType::GdiMetafile:
         {
             // Sort into group and return ONLY those objects that can be created from the MetaFile.
             ImpSdrGDIMetaFileImport aFilter(*GetModel(), GetLayer(), maRect);
@@ -1168,7 +1168,7 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
 
             break;
         }
-        case GRAPHIC_BITMAP:
+        case GraphicType::Bitmap:
         {
             // create basic object and add fill
             pRetval = SdrRectObj::DoConvertToPolyObj(bBezier, bAddText);
@@ -1188,8 +1188,8 @@ SdrObject* SdrGrafObj::DoConvertToPolyObj(bool bBezier, bool bAddText ) const
             }
             break;
         }
-        case GRAPHIC_NONE:
-        case GRAPHIC_DEFAULT:
+        case GraphicType::NONE:
+        case GraphicType::Default:
         {
             pRetval = SdrRectObj::DoConvertToPolyObj(bBezier, bAddText);
             break;
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index c50cd7f..6e7cc85 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -455,7 +455,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked) const
                 SdrObject*  pGrafObjTmp = GetMarkedObjectByIndex( 0 );
                 SdrGrafObj* pGrafObj = dynamic_cast<SdrGrafObj*>( pGrafObjTmp  );
 
-                if( pGrafObj && ( pGrafObj->GetGraphicType() == GRAPHIC_BITMAP ) )
+                if( pGrafObj && ( pGrafObj->GetGraphicType() == GraphicType::Bitmap ) )
                 {
                     aBmp = pGrafObj->GetTransformedGraphic().GetBitmapEx();
                 }
@@ -630,7 +630,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject*
         }
 
         // if graphic could not be retrieved => go the hard way and create a MetaFile
-        if( ( GRAPHIC_NONE == aRet.GetType() ) || ( GRAPHIC_DEFAULT == aRet.GetType() ) )
+        if( ( GraphicType::NONE == aRet.GetType() ) || ( GraphicType::Default == aRet.GetType() ) )
         {
             ScopedVclPtrInstance< VirtualDevice > pOut;
             GDIMetaFile     aMtf;
diff --git a/svx/source/tbxctrls/grafctrl.cxx b/svx/source/tbxctrls/grafctrl.cxx
index 27b23b8..c4a10e7 100644
--- a/svx/source/tbxctrls/grafctrl.cxx
+++ b/svx/source/tbxctrls/grafctrl.cxx
@@ -657,8 +657,8 @@ void SvxGrafAttrHelper::ExecuteGrafAttr( SfxRequest& rReq, SdrView& rView )
                 SdrGrafObj* pObj = static_cast<SdrGrafObj*>( rMarkList.GetMark( 0 )->GetMarkedSdrObj() );
 
                 if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) !=  nullptr &&
-                    ( pObj->GetGraphicType() != GRAPHIC_NONE ) &&
-                    ( pObj->GetGraphicType() != GRAPHIC_DEFAULT ) )
+                    ( pObj->GetGraphicType() != GraphicType::NONE ) &&
+                    ( pObj->GetGraphicType() != GraphicType::Default ) )
                 {
                     SfxItemSet          aGrfAttr( rPool, SDRATTR_GRAFCROP, SDRATTR_GRAFCROP, 0 );
                     const SfxMapUnit    eOldMetric = rPool.GetMetric( 0 );
@@ -833,8 +833,8 @@ void SvxGrafAttrHelper::GetGrafAttrState( SfxItemSet& rSet, SdrView& rView )
         SdrGrafObj* pGrafObj = dynamic_cast< SdrGrafObj* >( rMarkList.GetMark( i )->GetMarkedSdrObj() );
 
         if( !pGrafObj ||
-            ( pGrafObj->GetGraphicType() == GRAPHIC_NONE ) ||
-            ( pGrafObj->GetGraphicType() == GRAPHIC_DEFAULT  ))
+            ( pGrafObj->GetGraphicType() == GraphicType::NONE ) ||
+            ( pGrafObj->GetGraphicType() == GraphicType::Default  ))
         {
             bEnableColors = bEnableTransparency = bEnableCrop = false;
             break;
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index 061ca7a..8dd270a 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -834,7 +834,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
                 if( pObj && dynamic_cast<const SdrGrafObj*>( pObj) != nullptr && !static_cast<SdrGrafObj*>(pObj)->HasText() )
                 {
                     aGraphic = static_cast<SdrGrafObj*>(pObj)->GetTransformedGraphic();
-                    if ( aGraphic.GetType() == GRAPHIC_BITMAP )
+                    if ( aGraphic.GetType() == GraphicType::Bitmap )
                     {
                         Size aSizePixel( aGraphic.GetSizePixel() );
                         if( rSettings.mnWidth && rSettings.mnHeight &&
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index fef98fb..ca484bc 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -292,7 +292,7 @@ SvxBrushItem getSvxBrushItemFromSourceSet(const SfxItemSet& rSourceSet, sal_uInt
             const XFillBitmapItem& rBmpItm = static_cast< const XFillBitmapItem& >(rSourceSet.Get(XATTR_FILLBITMAP, bSearchInParents));
             const Graphic aGraphic(rBmpItm.GetGraphicObject().GetGraphic());
 
-            // continue idependent of evtl. GRAPHIC_NONE as aGraphic.GetType(), we still need to rescue positions
+            // continue idependent of evtl. GraphicType::NONE as aGraphic.GetType(), we still need to rescue positions
             SvxGraphicPosition aSvxGraphicPosition(GPOS_NONE);
             const XFillBmpStretchItem& rStretchItem = static_cast< const XFillBmpStretchItem& >(rSourceSet.Get(XATTR_FILLBMP_STRETCH, bSearchInParents));
             const XFillBmpTileItem& rTileItem = static_cast< const XFillBmpTileItem& >(rSourceSet.Get(XATTR_FILLBMP_TILE, bSearchInParents));
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index 246ec62..1bf2fa4 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -1567,7 +1567,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte
     {
         const Graphic& rGraphic = static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphic();
 
-        if(rGraphic.GetType() != GRAPHIC_GDIMETAFILE)
+        if(rGraphic.GetType() != GraphicType::GdiMetafile)
         {
             // pack object in a bitmap
             Reference< css::awt::XBitmap >  xBitmap( VCLUnoHelper::CreateBitmap(static_cast< SdrGrafObj*>( mpObj.get() )->GetGraphic().GetBitmapEx()) );
diff --git a/svx/source/xml/xmlgrhlp.cxx b/svx/source/xml/xmlgrhlp.cxx
index 28f6b47..a7bbd74 100644
--- a/svx/source/xml/xmlgrhlp.cxx
+++ b/svx/source/xml/xmlgrhlp.cxx
@@ -102,7 +102,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
 
     maTmp.EnableKillingFile();
 
-    if( aGrfObject.GetType() != GRAPHIC_NONE )
+    if( aGrfObject.GetType() != GraphicType::NONE )
     {
         SvStream* pStm = ::utl::UcbStreamHelper::CreateStream( maTmp.GetURL(), StreamMode::WRITE | StreamMode::TRUNC );
 
@@ -119,7 +119,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
             }
             else
             {
-                if( aGraphic.GetType() == GRAPHIC_BITMAP )
+                if( aGraphic.GetType() == GraphicType::Bitmap )
                 {
                     GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
                     OUString          aFormat;
@@ -131,7 +131,7 @@ SvXMLGraphicInputStream::SvXMLGraphicInputStream( const OUString& rGraphicId )
 
                     bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStm, rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
                 }
-                else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+                else if( aGraphic.GetType() == GraphicType::GdiMetafile )
                 {
                     pStm->SetVersion( SOFFICE_FILEFORMAT_8 );
                     pStm->SetCompressMode( SvStreamCompressFlags::ZBITMAP );
@@ -277,7 +277,7 @@ void SAL_CALL SvXMLGraphicOutputStream::closeOutput()
 
 const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
 {
-    if( mbClosed && ( maGrfObj.GetType() == GRAPHIC_NONE ) && mpOStm )
+    if( mbClosed && ( maGrfObj.GetType() == GraphicType::NONE ) && mpOStm )
     {
         Graphic aGraphic;
 
@@ -335,7 +335,7 @@ const GraphicObject& SvXMLGraphicOutputStream::GetGraphicObject()
         }
 
         maGrfObj = aGraphic;
-        if( maGrfObj.GetType() != GRAPHIC_NONE )
+        if( maGrfObj.GetType() != GraphicType::NONE )
         {
             delete mpOStm;
             mpOStm = nullptr;
@@ -516,7 +516,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
     GraphicObject   aGrfObject( OUStringToOString(rGraphicId, RTL_TEXTENCODING_ASCII_US) );
     bool        bRet = false;
 
-    if( aGrfObject.GetType() != GRAPHIC_NONE )
+    if( aGrfObject.GetType() != GraphicType::NONE )
     {
         SvxGraphicHelperStream_Impl aStream( ImplGetGraphicStream( rPictureStorageName, rPictureStreamName ) );
         if( aStream.xStream.is() )
@@ -566,7 +566,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
                 pStream->Write( aGfxLink.GetData(), aGfxLink.GetDataSize() );
             else
             {
-                if( aGraphic.GetType() == GRAPHIC_BITMAP )
+                if( aGraphic.GetType() == GraphicType::Bitmap )
                 {
                     GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
                     OUString          aFormat;
@@ -579,7 +579,7 @@ bool SvXMLGraphicHelper::ImplWriteGraphic( const OUString& rPictureStorageName,
                     bRet = ( rFilter.ExportGraphic( aGraphic, "", *pStream,
                                                      rFilter.GetExportFormatNumberForShortName( aFormat ) ) == 0 );
                 }
-                else if( aGraphic.GetType() == GRAPHIC_GDIMETAFILE )
+                else if( aGraphic.GetType() == GraphicType::GdiMetafile )
                 {
                     pStream->SetVersion( SOFFICE_FILEFORMAT_8 );
                     pStream->SetCompressMode( SvStreamCompressFlags::ZBITMAP );
@@ -639,7 +639,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
         {
             const GraphicObject aObj( ImplReadGraphic( aPictureStorageName, aPictureStreamName ) );
 
-            if( aObj.GetType() != GRAPHIC_NONE )
+            if( aObj.GetType() != GraphicType::NONE )
             {
                 maGrfObjs.push_back( aObj );
                 OUString aBaseURL(  XML_GRAPHICOBJECT_URL_BASE  );
@@ -655,7 +655,7 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
         {
             const OString aAsciiObjectID(OUStringToOString(aPictureStreamName, RTL_TEXTENCODING_ASCII_US));
             const GraphicObject aGrfObject( aAsciiObjectID );
-            if( aGrfObject.GetType() != GRAPHIC_NONE )
+            if( aGrfObject.GetType() != GraphicType::NONE )
             {
                 OUString        aStreamName( aPictureStreamName );
                 Graphic         aGraphic( (Graphic&) aGrfObject.GetGraphic() );
@@ -699,14 +699,14 @@ void SvXMLGraphicHelper::ImplInsertGraphicURL( const OUString& rURLStr, sal_uInt
                 }
                 else
                 {
-                    if( aGrfObject.GetType() == GRAPHIC_BITMAP )
+                    if( aGrfObject.GetType() == GraphicType::Bitmap )
                     {
                         if( aGrfObject.IsAnimated() )
                             aExtension = ".gif";
                         else
                             aExtension = ".png";
                     }
-                    else if( aGrfObject.GetType() == GRAPHIC_GDIMETAFILE )
+                    else if( aGrfObject.GetType() == GraphicType::GdiMetafile )
                     {
                         // SJ: first check if this metafile is just a eps file, then we will store the eps instead of svm
                         GDIMetaFile& rMtf( (GDIMetaFile&)aGraphic.GetGDIMetaFile() );
diff --git a/svx/source/xoutdev/_xoutbmp.cxx b/svx/source/xoutdev/_xoutbmp.cxx
index 8750a2d..3cad60b 100644
--- a/svx/source/xoutdev/_xoutbmp.cxx
+++ b/svx/source/xoutdev/_xoutbmp.cxx
@@ -119,7 +119,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
                                  const OUString& rFilterName, const XOutFlags nFlags,
                                  const Size* pMtfSize_100TH_MM )
 {
-    if( rGraphic.GetType() != GRAPHIC_NONE )
+    if( rGraphic.GetType() != GraphicType::NONE )
     {
         INetURLObject   aURL( rFileName );
         Graphic         aGraphic;
@@ -177,7 +177,7 @@ sal_uInt16 XOutBitmap::WriteGraphic( const Graphic& rGraphic, OUString& rFileNam
             if( ( nFlags & XOutFlags::UseNativeIfPossible ) &&
                 !( nFlags & XOutFlags::MirrorHorz ) &&
                 !( nFlags & XOutFlags::MirrorVert ) &&
-                ( rGraphic.GetType() != GRAPHIC_GDIMETAFILE ) && rGraphic.IsLink() )
+                ( rGraphic.GetType() != GraphicType::GdiMetafile ) && rGraphic.IsLink() )
             {
                 // try to write native link
                 const GfxLink aGfxLink( ( (Graphic&) rGraphic ).GetLink() );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list