diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-27 09:43:22 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-27 12:59:23 +0000 |
commit | 850a8d27ca696f18ce0c529346f8bb8505499545 (patch) | |
tree | 5641e81912760029683e1c544e01af25eee23523 /drawinglayer | |
parent | 6c974272423ca19c94d8d5e182fec46836309d60 (diff) |
Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
Reviewed-on: https://gerrit.libreoffice.org/25534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
6 files changed, 11 insertions, 11 deletions
diff --git a/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgraphicprimitive2d.cxx index 7dc1eb3c8ec7..f90c9239de55 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 d2e9c882922c..e43839b19b48 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 87d3959cebf9..b51fc91f5b43 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 7ad6850e857e..8e9beba05218 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 82e1bbacd833..921359608e2a 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 67625c0b85a4..0d5c1186878c 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; |