diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-21 19:15:22 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-23 09:20:31 +0000 |
commit | 5c5209c2d9f2626d2c024493a7f9cde9577e6261 (patch) | |
tree | a989f18da3fc45114e07f630bc3acd2221098996 /drawinglayer | |
parent | fde4ccb0752f4a34b995ee3b0937098c3d189c1b (diff) |
Convert GradientStyle to scoped enum
Change-Id: I1da151dd25648e363ba88bf88caa3e820f0ee424
Reviewed-on: https://gerrit.libreoffice.org/25270
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
6 files changed, 30 insertions, 30 deletions
diff --git a/drawinglayer/source/attribute/fillgradientattribute.cxx b/drawinglayer/source/attribute/fillgradientattribute.cxx index c91e40c48ea3..5cc76e359b99 100644 --- a/drawinglayer/source/attribute/fillgradientattribute.cxx +++ b/drawinglayer/source/attribute/fillgradientattribute.cxx @@ -60,7 +60,7 @@ namespace drawinglayer } ImpFillGradientAttribute() - : meStyle(GRADIENTSTYLE_LINEAR), + : meStyle(GradientStyle::Linear), mfBorder(0.0), mfOffsetX(0.0), mfOffsetY(0.0), diff --git a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx index b9e41326c666..4fba3c8c24b8 100644 --- a/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/fillgradientprimitive2d.cxx @@ -64,7 +64,7 @@ namespace drawinglayer switch(getFillGradient().getStyle()) { - case attribute::GRADIENTSTYLE_LINEAR: + case attribute::GradientStyle::Linear: { texture::GeoTexSvxGradientLinear aGradient( getDefinitionRange(), @@ -77,7 +77,7 @@ namespace drawinglayer aGradient.appendTransformationsAndColors(rEntries, rOuterColor); break; } - case attribute::GRADIENTSTYLE_AXIAL: + case attribute::GradientStyle::Axial: { texture::GeoTexSvxGradientAxial aGradient( getDefinitionRange(), @@ -90,7 +90,7 @@ namespace drawinglayer aGradient.appendTransformationsAndColors(rEntries, rOuterColor); break; } - case attribute::GRADIENTSTYLE_RADIAL: + case attribute::GradientStyle::Radial: { texture::GeoTexSvxGradientRadial aGradient( getDefinitionRange(), @@ -103,7 +103,7 @@ namespace drawinglayer aGradient.appendTransformationsAndColors(rEntries, rOuterColor); break; } - case attribute::GRADIENTSTYLE_ELLIPTICAL: + case attribute::GradientStyle::Elliptical: { texture::GeoTexSvxGradientElliptical aGradient( getDefinitionRange(), @@ -117,7 +117,7 @@ namespace drawinglayer aGradient.appendTransformationsAndColors(rEntries, rOuterColor); break; } - case attribute::GRADIENTSTYLE_SQUARE: + case attribute::GradientStyle::Square: { texture::GeoTexSvxGradientSquare aGradient( getDefinitionRange(), @@ -131,7 +131,7 @@ namespace drawinglayer aGradient.appendTransformationsAndColors(rEntries, rOuterColor); break; } - case attribute::GRADIENTSTYLE_RECT: + case attribute::GradientStyle::Rect: { texture::GeoTexSvxGradientRect aGradient( getDefinitionRange(), @@ -252,13 +252,13 @@ namespace drawinglayer switch(getFillGradient().getStyle()) { - case attribute::GRADIENTSTYLE_RADIAL: - case attribute::GRADIENTSTYLE_ELLIPTICAL: + case attribute::GradientStyle::Radial: + case attribute::GradientStyle::Elliptical: { aUnitPolygon = basegfx::tools::createPolygonFromCircle(basegfx::B2DPoint(0.0, 0.0), 1.0); break; } - default: // GRADIENTSTYLE_LINEAR, attribute::GRADIENTSTYLE_AXIAL, attribute::GRADIENTSTYLE_SQUARE, attribute::GRADIENTSTYLE_RECT + default: // GradientStyle::Linear, attribute::GradientStyle::Axial, attribute::GradientStyle::Square, attribute::GradientStyle::Rect { aUnitPolygon = basegfx::tools::createPolygonFromRect(basegfx::B2DRange(-1.0, -1.0, 1.0, 1.0)); break; diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index 3f118a9e435c..70647cf11733 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -848,38 +848,38 @@ namespace aEnd = interpolate(aBlack, aEnd, (double)nEndIntens * 0.01); } - drawinglayer::attribute::GradientStyle aGradientStyle(drawinglayer::attribute::GRADIENTSTYLE_RECT); + drawinglayer::attribute::GradientStyle aGradientStyle(drawinglayer::attribute::GradientStyle::Rect); switch(rGradient.GetStyle()) { case GradientStyle_LINEAR : { - aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_LINEAR; + aGradientStyle = drawinglayer::attribute::GradientStyle::Linear; break; } case GradientStyle_AXIAL : { - aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_AXIAL; + aGradientStyle = drawinglayer::attribute::GradientStyle::Axial; break; } case GradientStyle_RADIAL : { - aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RADIAL; + aGradientStyle = drawinglayer::attribute::GradientStyle::Radial; break; } case GradientStyle_ELLIPTICAL : { - aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_ELLIPTICAL; + aGradientStyle = drawinglayer::attribute::GradientStyle::Elliptical; break; } case GradientStyle_SQUARE : { - aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE; + aGradientStyle = drawinglayer::attribute::GradientStyle::Square; break; } default : // GradientStyle_RECT { - aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RECT; + aGradientStyle = drawinglayer::attribute::GradientStyle::Rect; break; } } diff --git a/drawinglayer/source/primitive3d/textureprimitive3d.cxx b/drawinglayer/source/primitive3d/textureprimitive3d.cxx index 61a888b4fd56..ee126a15c77e 100644 --- a/drawinglayer/source/primitive3d/textureprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/textureprimitive3d.cxx @@ -98,7 +98,7 @@ namespace drawinglayer { // create TransparenceTexturePrimitive3D with fixed transparence as replacement const basegfx::BColor aGray(getTransparence(), getTransparence(), getTransparence()); - const attribute::FillGradientAttribute aFillGradient(attribute::GRADIENTSTYLE_LINEAR, 0.0, 0.0, 0.0, 0.0, aGray, aGray, 1); + const attribute::FillGradientAttribute aFillGradient(attribute::GradientStyle::Linear, 0.0, 0.0, 0.0, 0.0, aGray, aGray, 1); const Primitive3DReference xRef(new TransparenceTexturePrimitive3D(aFillGradient, getChildren(), getTextureSize())); return { xRef }; } diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx index beed1caa8ec4..6d069d394ad0 100644 --- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx @@ -311,32 +311,32 @@ namespace drawinglayer switch(rFiGrAtt.getStyle()) { - default : // attribute::GRADIENTSTYLE_LINEAR : + default : // attribute::GradientStyle::Linear : { o_rVCLGradient.SetStyle(GradientStyle_LINEAR); break; } - case attribute::GRADIENTSTYLE_AXIAL : + case attribute::GradientStyle::Axial : { o_rVCLGradient.SetStyle(GradientStyle_AXIAL); break; } - case attribute::GRADIENTSTYLE_RADIAL : + case attribute::GradientStyle::Radial : { o_rVCLGradient.SetStyle(GradientStyle_RADIAL); break; } - case attribute::GRADIENTSTYLE_ELLIPTICAL : + case attribute::GradientStyle::Elliptical : { o_rVCLGradient.SetStyle(GradientStyle_ELLIPTICAL); break; } - case attribute::GRADIENTSTYLE_SQUARE : + case attribute::GradientStyle::Square : { o_rVCLGradient.SetStyle(GradientStyle_SQUARE); break; } - case attribute::GRADIENTSTYLE_RECT : + case attribute::GradientStyle::Rect : { o_rVCLGradient.SetStyle(GradientStyle_RECT); break; diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index f83eb1fe3daa..50830bae4275 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -87,7 +87,7 @@ namespace drawinglayer switch(aGradientStyle) { - case attribute::GRADIENTSTYLE_LINEAR: + case attribute::GradientStyle::Linear: { pNewTex.reset( new texture::GeoTexSvxGradientLinear( @@ -100,7 +100,7 @@ namespace drawinglayer rFillGradient.getAngle())); break; } - case attribute::GRADIENTSTYLE_AXIAL: + case attribute::GradientStyle::Axial: { pNewTex.reset( new texture::GeoTexSvxGradientAxial( @@ -113,7 +113,7 @@ namespace drawinglayer rFillGradient.getAngle())); break; } - case attribute::GRADIENTSTYLE_RADIAL: + case attribute::GradientStyle::Radial: { pNewTex.reset( new texture::GeoTexSvxGradientRadial( @@ -126,7 +126,7 @@ namespace drawinglayer rFillGradient.getOffsetY())); break; } - case attribute::GRADIENTSTYLE_ELLIPTICAL: + case attribute::GradientStyle::Elliptical: { pNewTex.reset( new texture::GeoTexSvxGradientElliptical( @@ -140,7 +140,7 @@ namespace drawinglayer rFillGradient.getAngle())); break; } - case attribute::GRADIENTSTYLE_SQUARE: + case attribute::GradientStyle::Square: { pNewTex.reset( new texture::GeoTexSvxGradientSquare( @@ -154,7 +154,7 @@ namespace drawinglayer rFillGradient.getAngle())); break; } - case attribute::GRADIENTSTYLE_RECT: + case attribute::GradientStyle::Rect: { pNewTex.reset( new texture::GeoTexSvxGradientRect( |