summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-03-30 12:11:39 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-03-30 13:06:54 +0000
commit0cd7ccb87e70982e416322587661cbfde01505ec (patch)
tree5fe3ac3907f1148ff0b37c2014fec908969569c1
parentda56de9ac4824eb365af20b351719395e725be39 (diff)
convert GradientType to scoped enum
Change-Id: Ie71ead122965e967796ed01270cc2824d35905ac Reviewed-on: https://gerrit.libreoffice.org/35900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx18
-rw-r--r--filter/source/svg/svgwriter.cxx4
-rw-r--r--include/vcl/graphictools.hxx2
-rw-r--r--vcl/source/filter/wmf/winmtf.cxx2
4 files changed, 13 insertions, 13 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index 0d386d80a265..b4d425d8a89b 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -1426,7 +1426,7 @@ namespace drawinglayer
rFillGraphicAttribute.getTiling(),
SvtGraphicFill::hatchSingle,
Color(),
- SvtGraphicFill::gradientLinear,
+ SvtGraphicFill::GradientType::Linear,
Color(),
Color(),
0,
@@ -1524,7 +1524,7 @@ namespace drawinglayer
false,
eHatch,
Color(rFillHatchAttribute.getColor()),
- SvtGraphicFill::gradientLinear,
+ SvtGraphicFill::GradientType::Linear,
Color(),
Color(),
0,
@@ -1621,22 +1621,22 @@ namespace drawinglayer
if(!mnSvtGraphicFillCount && aLocalPolyPolygon.count())
{
- // setup gradient stuff like in like in impgrfll
- SvtGraphicFill::GradientType eGrad(SvtGraphicFill::gradientLinear);
+ // setup gradient stuff like in impgrfll
+ SvtGraphicFill::GradientType eGrad(SvtGraphicFill::GradientType::Linear);
switch(aVCLGradient.GetStyle())
{
default : // GradientStyle::Linear:
case GradientStyle::Axial:
- eGrad = SvtGraphicFill::gradientLinear;
+ eGrad = SvtGraphicFill::GradientType::Linear;
break;
case GradientStyle::Radial:
case GradientStyle::Elliptical:
- eGrad = SvtGraphicFill::gradientRadial;
+ eGrad = SvtGraphicFill::GradientType::Radial;
break;
case GradientStyle::Square:
case GradientStyle::Rect:
- eGrad = SvtGraphicFill::gradientRectangular;
+ eGrad = SvtGraphicFill::GradientType::Rectangular;
break;
}
@@ -1698,7 +1698,7 @@ namespace drawinglayer
false,
SvtGraphicFill::hatchSingle,
Color(),
- SvtGraphicFill::gradientLinear,
+ SvtGraphicFill::GradientType::Linear,
Color(),
Color(),
0,
@@ -1876,7 +1876,7 @@ namespace drawinglayer
false,
SvtGraphicFill::hatchSingle,
Color(),
- SvtGraphicFill::gradientLinear,
+ SvtGraphicFill::GradientType::Linear,
Color(),
Color(),
0,
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 1efa2f50afb2..12cf98074131 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -3124,8 +3124,8 @@ void SVGActionWriter::ImplWriteActions( const GDIMetaFile& rMtf,
ReadSvtGraphicFill( aMemStm, aFill );
bool bGradient = SvtGraphicFill::fillGradient == aFill.getFillType() &&
- ( SvtGraphicFill::gradientLinear == aFill.getGradientType() ||
- SvtGraphicFill::gradientRadial == aFill.getGradientType() );
+ ( SvtGraphicFill::GradientType::Linear == aFill.getGradientType() ||
+ SvtGraphicFill::GradientType::Radial == aFill.getGradientType() );
bool bSkip = ( SvtGraphicFill::fillSolid == aFill.getFillType() || bGradient );
if( bSkip )
diff --git a/include/vcl/graphictools.hxx b/include/vcl/graphictools.hxx
index 6979e97e78e0..01f1e7ae8fda 100644
--- a/include/vcl/graphictools.hxx
+++ b/include/vcl/graphictools.hxx
@@ -248,7 +248,7 @@ public:
hatchTriple
};
/// Type of gradient used
- enum GradientType {gradientLinear=0, gradientRadial, gradientRectangular};
+ enum class GradientType {Linear, Radial, Rectangular};
/// Special values for gradient step count
enum { gradientStepsInfinite=0 };
/** Homogeneous 2D transformation matrix
diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx
index 4fe537dd64b8..cb53a11135d0 100644
--- a/vcl/source/filter/wmf/winmtf.cxx
+++ b/vcl/source/filter/wmf/winmtf.cxx
@@ -1263,7 +1263,7 @@ void WinMtfOutput::DrawPolygon( tools::Polygon& rPolygon, bool bRecordPath )
true,
SvtGraphicFill::hatchSingle,
Color(),
- SvtGraphicFill::gradientLinear,
+ SvtGraphicFill::GradientType::Linear,
Color(),
Color(),
0,