summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2016-05-22 12:54:26 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-22 17:54:17 +0000
commit7e55fbab6348c2a844fc7ecca8de61416db8fdae (patch)
tree8a40d272a5ae327ded06dab40804dc50e72c6fa6 /drawinglayer
parente66c1a6f32fa682c60be672020f4ee8890b96a11 (diff)
Convert SpreadMethod to scoped enum
Change-Id: I2a04247bd58ed6f2af8da7e109b31ff83d6d5e49 Reviewed-on: https://gerrit.libreoffice.org/25298 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/source/primitive2d/svggradientprimitive2d.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
index 23092b863f2f..4283610901b2 100644
--- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx
@@ -193,7 +193,7 @@ namespace drawinglayer
if(nCount)
{
const SvgGradientEntry& rStart = rEntries[0];
- const bool bCreateStartPad(fPos < 0.0 && Spread_pad == getSpreadMethod());
+ const bool bCreateStartPad(fPos < 0.0 && SpreadMethod::Pad == getSpreadMethod());
const bool bCreateStartFill(rStart.getOffset() > 0.0);
sal_uInt32 nIndex(0);
@@ -215,7 +215,7 @@ namespace drawinglayer
}
const SvgGradientEntry& rEnd = rEntries[nCount - 1];
- const bool bCreateEndPad(fPos < fMax && Spread_pad == getSpreadMethod());
+ const bool bCreateEndPad(fPos < fMax && SpreadMethod::Pad == getSpreadMethod());
const bool bCreateEndFill(rEnd.getOffset() < 1.0);
if(bCreateEndPad || bCreateEndFill)
@@ -463,12 +463,12 @@ namespace drawinglayer
aUnitGradientToObject = aUnitGradientToObject * aPreMultiply;
// create central run, may also already do all necessary when
- // Spread_pad is set as SpreadMethod and/or the range is smaller
+ // SpreadMethod::Pad is set as SpreadMethod and/or the range is smaller
double fPos(createRun(aTargetColor, aTargetOpacity, aUnitRange.getMinX(), aUnitRange.getMaxX(), getGradientEntries(), 0));
if(fPos < aUnitRange.getMaxX())
{
- // can only happen when SpreadMethod is Spread_reflect or Spread_repeat,
+ // can only happen when SpreadMethod is SpreadMethod::Reflect or SpreadMethod::Repeat,
// else the start and end pads are already created and fPos == aUnitRange.getMaxX().
// Its possible to express the repeated linear gradient by adding the
// transformed central run. Create it this way
@@ -497,7 +497,7 @@ namespace drawinglayer
nOffset++;
basegfx::B2DHomMatrix aTransform;
- const bool bMirror(Spread_reflect == getSpreadMethod() && (nOffset % 2));
+ const bool bMirror(SpreadMethod::Reflect == getSpreadMethod() && (nOffset % 2));
if(bMirror)
{
@@ -524,7 +524,7 @@ namespace drawinglayer
while(fPos < aUnitRange.getMaxX())
{
basegfx::B2DHomMatrix aTransform;
- const bool bMirror(Spread_reflect == getSpreadMethod() && (nOffset % 2));
+ const bool bMirror(SpreadMethod::Reflect == getSpreadMethod() && (nOffset % 2));
if(bMirror)
{
@@ -807,12 +807,12 @@ namespace drawinglayer
}
// create central run, may also already do all necessary when
- // Spread_pad is set as SpreadMethod and/or the range is smaller
+ // SpreadMethod::Pad is set as SpreadMethod and/or the range is smaller
double fPos(createRun(aTargetColor, aTargetOpacity, 0.0, fMax, getGradientEntries(), 0));
if(fPos < fMax)
{
- // can only happen when SpreadMethod is Spread_reflect or Spread_repeat,
+ // can only happen when SpreadMethod is SpreadMethod::Reflect or SpreadMethod::Repeat,
// else the start and end pads are already created and fPos == fMax.
// For radial there is no way to transform the already created
// central run, it needs to be created from 1.0 to fMax
@@ -820,7 +820,7 @@ namespace drawinglayer
while(fPos < fMax)
{
- const bool bMirror(Spread_reflect == getSpreadMethod() && (nOffset % 2));
+ const bool bMirror(SpreadMethod::Reflect == getSpreadMethod() && (nOffset % 2));
if(bMirror)
{