summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-09-02 10:53:14 +0200
committerNoel Grandin <noel@peralex.com>2016-09-05 08:21:46 +0200
commit12569802394fb0a9850fcdb0647a0845a803f1ff (patch)
tree9f5a626852adbf00378fc3dc80475ad896d957f8
parent933c0679d64a5585ebfd233180a1a818b493eec5 (diff)
convert GradientStyle to scoped enum
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx14
-rw-r--r--drawinglayer/source/primitive2d/metafileprimitive2d.cxx12
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx26
-rw-r--r--filter/source/flash/swfwriter1.cxx2
-rw-r--r--filter/source/flash/swfwriter2.cxx26
-rw-r--r--filter/source/msfilter/escherex.cxx2
-rw-r--r--filter/source/svg/svgwriter.cxx20
-rw-r--r--include/vcl/vclenum.hxx16
-rw-r--r--oox/source/export/drawingml.cxx12
-rw-r--r--reportdesign/source/ui/report/EndMarker.cxx2
-rw-r--r--reportdesign/source/ui/report/StartMarker.cxx2
-rw-r--r--sc/source/ui/cctrl/tbzoomsliderctrl.cxx2
-rw-r--r--sc/source/ui/view/output.cxx2
-rw-r--r--sd/source/ui/annotations/annotationwindow.cxx6
-rw-r--r--sfx2/source/sidebar/Theme.cxx4
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx2
-rw-r--r--svx/source/svdraw/svdfmtf.cxx18
-rw-r--r--sw/source/uibase/docvw/AnnotationMenuButton.cxx4
-rw-r--r--sw/source/uibase/docvw/SidebarTxtControl.cxx4
-rw-r--r--vcl/backendtest/VisualBackendTest.cxx2
-rw-r--r--vcl/backendtest/outputdevice/gradient.cxx4
-rw-r--r--vcl/opengl/gdiimpl.cxx12
-rw-r--r--vcl/source/gdi/gradient.cxx12
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx26
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx4
-rw-r--r--vcl/source/gdi/svmconverter.cxx2
-rw-r--r--vcl/source/gdi/wall.cxx2
-rw-r--r--vcl/source/outdev/gradient.cxx18
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/workben/outdevgrind.cxx2
-rw-r--r--vcl/workben/svptest.cxx2
-rw-r--r--vcl/workben/vcldemo.cxx12
33 files changed, 139 insertions, 139 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 04c85cd04296..6d7b165da0ca 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -552,7 +552,7 @@ namespace cppcanvas
uno::Sequence< uno::Sequence < double > > aColors(2);
uno::Sequence< double > aStops(2);
- if( rGradient.GetStyle() == GradientStyle_AXIAL )
+ if( rGradient.GetStyle() == GradientStyle::Axial )
{
aStops.realloc(3);
aColors.realloc(3);
@@ -589,7 +589,7 @@ namespace cppcanvas
OUString aGradientService;
switch( rGradient.GetStyle() )
{
- case GradientStyle_LINEAR:
+ case GradientStyle::Linear:
aGradInfo = basegfx::tools::createLinearODFGradientInfo(
aBounds,
nSteps,
@@ -601,7 +601,7 @@ namespace cppcanvas
aGradientService = "LinearGradient";
break;
- case GradientStyle_AXIAL:
+ case GradientStyle::Axial:
{
// Adapt the border so that it is suitable
// for the axial gradient. An axial
@@ -635,7 +635,7 @@ namespace cppcanvas
break;
}
- case GradientStyle_RADIAL:
+ case GradientStyle::Radial:
aGradInfo = basegfx::tools::createRadialODFGradientInfo(
aBounds,
aOffset,
@@ -644,7 +644,7 @@ namespace cppcanvas
aGradientService = "EllipticalGradient";
break;
- case GradientStyle_ELLIPTICAL:
+ case GradientStyle::Elliptical:
aGradInfo = basegfx::tools::createEllipticalODFGradientInfo(
aBounds,
aOffset,
@@ -654,7 +654,7 @@ namespace cppcanvas
aGradientService = "EllipticalGradient";
break;
- case GradientStyle_SQUARE:
+ case GradientStyle::Square:
aGradInfo = basegfx::tools::createSquareODFGradientInfo(
aBounds,
aOffset,
@@ -664,7 +664,7 @@ namespace cppcanvas
aGradientService = "RectangularGradient";
break;
- case GradientStyle_RECT:
+ case GradientStyle::Rect:
aGradInfo = basegfx::tools::createRectangularODFGradientInfo(
aBounds,
aOffset,
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 2c5b8d122d1c..a94549a93af1 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -852,32 +852,32 @@ namespace
switch(rGradient.GetStyle())
{
- case GradientStyle_LINEAR :
+ case GradientStyle::Linear :
{
aGradientStyle = drawinglayer::attribute::GradientStyle::Linear;
break;
}
- case GradientStyle_AXIAL :
+ case GradientStyle::Axial :
{
aGradientStyle = drawinglayer::attribute::GradientStyle::Axial;
break;
}
- case GradientStyle_RADIAL :
+ case GradientStyle::Radial :
{
aGradientStyle = drawinglayer::attribute::GradientStyle::Radial;
break;
}
- case GradientStyle_ELLIPTICAL :
+ case GradientStyle::Elliptical :
{
aGradientStyle = drawinglayer::attribute::GradientStyle::Elliptical;
break;
}
- case GradientStyle_SQUARE :
+ case GradientStyle::Square :
{
aGradientStyle = drawinglayer::attribute::GradientStyle::Square;
break;
}
- default : // GradientStyle_RECT
+ default : // GradientStyle::Rect
{
aGradientStyle = drawinglayer::attribute::GradientStyle::Rect;
break;
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index a42be99958e4..ce0c192c44d1 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -313,32 +313,32 @@ namespace drawinglayer
{
default : // attribute::GradientStyle::Linear :
{
- o_rVCLGradient.SetStyle(GradientStyle_LINEAR);
+ o_rVCLGradient.SetStyle(GradientStyle::Linear);
break;
}
case attribute::GradientStyle::Axial :
{
- o_rVCLGradient.SetStyle(GradientStyle_AXIAL);
+ o_rVCLGradient.SetStyle(GradientStyle::Axial);
break;
}
case attribute::GradientStyle::Radial :
{
- o_rVCLGradient.SetStyle(GradientStyle_RADIAL);
+ o_rVCLGradient.SetStyle(GradientStyle::Radial);
break;
}
case attribute::GradientStyle::Elliptical :
{
- o_rVCLGradient.SetStyle(GradientStyle_ELLIPTICAL);
+ o_rVCLGradient.SetStyle(GradientStyle::Elliptical);
break;
}
case attribute::GradientStyle::Square :
{
- o_rVCLGradient.SetStyle(GradientStyle_SQUARE);
+ o_rVCLGradient.SetStyle(GradientStyle::Square);
break;
}
case attribute::GradientStyle::Rect :
{
- o_rVCLGradient.SetStyle(GradientStyle_RECT);
+ o_rVCLGradient.SetStyle(GradientStyle::Rect);
break;
}
}
@@ -1625,16 +1625,16 @@ namespace drawinglayer
switch(aVCLGradient.GetStyle())
{
- default : // GradientStyle_LINEAR:
- case GradientStyle_AXIAL:
+ default : // GradientStyle::Linear:
+ case GradientStyle::Axial:
eGrad = SvtGraphicFill::gradientLinear;
break;
- case GradientStyle_RADIAL:
- case GradientStyle_ELLIPTICAL:
+ case GradientStyle::Radial:
+ case GradientStyle::Elliptical:
eGrad = SvtGraphicFill::gradientRadial;
break;
- case GradientStyle_SQUARE:
- case GradientStyle_RECT:
+ case GradientStyle::Square:
+ case GradientStyle::Rect:
eGrad = SvtGraphicFill::gradientRectangular;
break;
}
@@ -1925,7 +1925,7 @@ namespace drawinglayer
const sal_uInt8 nTransPercentVcl((sal_uInt8)basegfx::fround(rUniTransparenceCandidate.getTransparence() * 255.0));
const Color aTransColor(nTransPercentVcl, nTransPercentVcl, nTransPercentVcl);
- aVCLGradient.SetStyle(GradientStyle_LINEAR);
+ aVCLGradient.SetStyle(GradientStyle::Linear);
aVCLGradient.SetStartColor(aTransColor);
aVCLGradient.SetEndColor(aTransColor);
aVCLGradient.SetAngle(0);
diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx
index 05058d00c6c4..3db22ad9b8a6 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -316,7 +316,7 @@ void Writer::Impl_writeGradientEx( const tools::PolyPolygon& rPolyPoly, const Gr
tools::PolyPolygon aPolyPolygon( rPolyPoly );
map( aPolyPolygon );
- if( (rGradient.GetStyle() == GradientStyle_LINEAR && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle_RADIAL) )
+ if( (rGradient.GetStyle() == GradientStyle::Linear && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle::Radial) )
{
const Rectangle aBoundRect( aPolyPolygon.GetBoundRect() );
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index ca6dc1e318be..9c39a2cac3ac 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -495,13 +495,13 @@ FillStyle::FillStyleType Impl_getFillStyleType( const Gradient& rGradient )
{
switch( rGradient.GetStyle() )
{
- case GradientStyle_ELLIPTICAL:
- case GradientStyle_RADIAL:
+ case GradientStyle::Elliptical:
+ case GradientStyle::Radial:
return FillStyle::radial_gradient;
-// case GradientStyle_AXIAL:
-// case GradientStyle_SQUARE:
-// case GradientStyle_RECT:
-// case GradientStyle_LINEAR:
+// case GradientStyle::Axial:
+// case GradientStyle::Square:
+// case GradientStyle::Rect:
+// case GradientStyle::Linear:
default:
return FillStyle::linear_gradient;
}
@@ -555,8 +555,8 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
switch( maGradient.GetStyle() )
{
- case GradientStyle_ELLIPTICAL:
- case GradientStyle_RADIAL:
+ case GradientStyle::Elliptical:
+ case GradientStyle::Radial:
{
aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetEndColor() ) );
aGradientRecords.push_back( GradRecord( 0xff, maGradient.GetStartColor() ) );
@@ -589,7 +589,7 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
}
break;
- case GradientStyle_AXIAL:
+ case GradientStyle::Axial:
{
aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetEndColor() ) );
aGradientRecords.push_back( GradRecord( 0x80, maGradient.GetStartColor() ) );
@@ -603,9 +603,9 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
m.scale( scalex, scaley );
}
break;
- case GradientStyle_SQUARE:
- case GradientStyle_RECT:
- case GradientStyle_LINEAR:
+ case GradientStyle::Square:
+ case GradientStyle::Rect:
+ case GradientStyle::Linear:
{
aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetStartColor() ) );
aGradientRecords.push_back( GradRecord( 0xff, maGradient.GetEndColor() ) );
@@ -617,7 +617,7 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
m.translate( maBoundRect.GetWidth() / 2.0, maBoundRect.GetHeight() / 2.0 );
}
break;
- case GradientStyle_FORCE_EQUAL_SIZE: break;
+ case GradientStyle::FORCE_EQUAL_SIZE: break;
}
m.translate( maBoundRect.Left(), maBoundRect.Top() );
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 4bee4c1c9ffb..148b15854302 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -387,7 +387,7 @@ void EscherPropertyContainer::CreateGradientProperties(
nFillType = ESCHER_FillShadeScale;
nAngle = (rGradient.Angle * 0x10000) / 10;
nFillFocus = (sal::static_int_cast<int>(rGradient.Style) ==
- sal::static_int_cast<int>(GradientStyle_LINEAR)) ? 0 : 50;
+ sal::static_int_cast<int>(GradientStyle::Linear)) ? 0 : 50;
}
break;
case css::awt::GradientStyle_RADIAL :
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 0aaa3050f436..4e6bb1d71677 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -231,8 +231,8 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi
void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradient& rGradient, OUString& rGradientId )
{
if( rObjRect.GetWidth() && rObjRect.GetHeight() &&
- ( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL ||
- rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL ) )
+ ( rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial ||
+ rGradient.GetStyle() == GradientStyle::Radial || rGradient.GetStyle() == GradientStyle::Elliptical ) )
{
SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, true, true );
Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() );
@@ -260,7 +260,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
std::unique_ptr< SvXMLElementExport > apGradient;
OUString aColorStr;
- if( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
+ if( rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial )
{
tools::Polygon aLinePoly( 2 );
@@ -279,9 +279,9 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
// write stop values
double fBorder = static_cast< double >( rGradient.GetBorder() ) *
- ( ( rGradient.GetStyle() == GradientStyle_AXIAL ) ? 0.005 : 0.01 );
+ ( ( rGradient.GetStyle() == GradientStyle::Axial ) ? 0.005 : 0.01 );
- ImplGetColorStr( ( rGradient.GetStyle() == GradientStyle_AXIAL ) ? aEndColor : aStartColor, aColorStr );
+ ImplGetColorStr( ( rGradient.GetStyle() == GradientStyle::Axial ) ? aEndColor : aStartColor, aColorStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, OUString::number( fBorder ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr );
@@ -289,7 +289,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
SvXMLElementExport aDesc2( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, true, true );
}
- if( rGradient.GetStyle() == GradientStyle_AXIAL )
+ if( rGradient.GetStyle() == GradientStyle::Axial )
{
ImplGetColorStr( aStartColor, aColorStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, OUString::number( 0.5 ) );
@@ -300,7 +300,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
}
}
- if( rGradient.GetStyle() != GradientStyle_AXIAL )
+ if( rGradient.GetStyle() != GradientStyle::Axial )
fBorder = 0.0;
ImplGetColorStr( aEndColor, aColorStr );
@@ -2247,8 +2247,8 @@ void SVGActionWriter::ImplWritePattern( const tools::PolyPolygon& rPolyPoly,
void SVGActionWriter::ImplWriteGradientEx( const tools::PolyPolygon& rPolyPoly, const Gradient& rGradient,
sal_uInt32 nWriteFlags)
{
- if ( rGradient.GetStyle() == GradientStyle_LINEAR ||
- rGradient.GetStyle() == GradientStyle_AXIAL )
+ if ( rGradient.GetStyle() == GradientStyle::Linear ||
+ rGradient.GetStyle() == GradientStyle::Axial )
{
ImplWriteGradientLinear( rPolyPoly, rGradient );
}
@@ -2306,7 +2306,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const tools::PolyPolygon& rPolyPo
const Color aEndColor = ImplGetColorWithIntensity( rGradient.GetEndColor(), rGradient.GetEndIntensity() );
double fBorderOffset = rGradient.GetBorder() / 100.0;
const sal_uInt16 nSteps = rGradient.GetSteps();
- if( rGradient.GetStyle() == GradientStyle_LINEAR )
+ if( rGradient.GetStyle() == GradientStyle::Linear )
{
// Emulate non-smooth gradient
if( 0 < nSteps && nSteps < 100 )
diff --git a/include/vcl/vclenum.hxx b/include/vcl/vclenum.hxx
index dc3e8d772755..6581365859f7 100644
--- a/include/vcl/vclenum.hxx
+++ b/include/vcl/vclenum.hxx
@@ -34,15 +34,15 @@ enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF
XTDATEF_SHORT_DDMMYYYY, XTDATEF_SHORT_MMDDYYYY, XTDATEF_SHORT_YYYYMMDD,
XTDATEF_SHORT_YYMMDD_DIN5008, XTDATEF_SHORT_YYYYMMDD_DIN5008, ExtDateFieldFormat_FORCE_EQUAL_SIZE=SAL_MAX_ENUM };
-enum GradientStyle
+enum class GradientStyle
{
- GradientStyle_LINEAR = 0,
- GradientStyle_AXIAL = 1,
- GradientStyle_RADIAL = 2,
- GradientStyle_ELLIPTICAL = 3,
- GradientStyle_SQUARE = 4,
- GradientStyle_RECT = 5,
- GradientStyle_FORCE_EQUAL_SIZE = SAL_MAX_ENUM
+ Linear = 0,
+ Axial = 1,
+ Radial = 2,
+ Elliptical = 3,
+ Square = 4,
+ Rect = 5,
+ FORCE_EQUAL_SIZE = SAL_MAX_ENUM
};
enum class HatchStyle
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index b93962ec2e63..41b0eea28cca 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -446,7 +446,7 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
switch( rGradient.Style )
{
default:
- case GradientStyle_LINEAR:
+ case awt::GradientStyle_LINEAR:
mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
WriteGradientStop( 0, ColorWithIntensity( rGradient.StartColor, rGradient.StartIntensity ) );
WriteGradientStop( 100, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
@@ -456,7 +456,7 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
FSEND );
break;
- case GradientStyle_AXIAL:
+ case awt::GradientStyle_AXIAL:
mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
WriteGradientStop( 0, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
WriteGradientStop( 50, ColorWithIntensity( rGradient.StartColor, rGradient.StartIntensity ) );
@@ -470,10 +470,10 @@ void DrawingML::WriteGradientFill( awt::Gradient rGradient )
/* I don't see how to apply transformation to gradients, so
* elliptical will end as radial and square as
* rectangular. also position offsets are not applied */
- case GradientStyle_RADIAL:
- case GradientStyle_ELLIPTICAL:
- case GradientStyle_RECT:
- case GradientStyle_SQUARE:
+ case awt::GradientStyle_RADIAL:
+ case awt::GradientStyle_ELLIPTICAL:
+ case awt::GradientStyle_RECT:
+ case awt::GradientStyle_SQUARE:
mpFS->startElementNS( XML_a, XML_gsLst, FSEND );
WriteGradientStop( 0, ColorWithIntensity( rGradient.EndColor, rGradient.EndIntensity ) );
WriteGradientStop( 100, ColorWithIntensity( rGradient.StartColor, rGradient.StartIntensity ) );
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index ee75fcec5e6b..fc59eb96d5d5 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -62,7 +62,7 @@ void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*rR
aStartColor.RGBtoHSB(nHue, nSat, nBri);
nSat += 40;
Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri));
- Gradient aGradient(GradientStyle_LINEAR, aStartColor, aEndColor);
+ Gradient aGradient(GradientStyle::Linear, aStartColor, aEndColor);
aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height()));
rRenderContext.DrawGradient(PixelToLogic(aPoly), aGradient);
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 70b134e74413..7bbf48877a58 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -134,7 +134,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const Rectangle& /*
aStartColor.RGBtoHSB(nHue, nSat, nBri);
nSat += 40;
Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri));
- Gradient aGradient(GradientStyle_LINEAR,aStartColor,aEndColor);
+ Gradient aGradient(GradientStyle::Linear,aStartColor,aEndColor);
aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height()));
rRenderContext.DrawGradient(PixelToLogic(aPoly) ,aGradient);
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index bc8319424c55..71a4a94af0e0 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -424,7 +424,7 @@ void ScZoomSliderWnd::DoPaint(vcl::RenderContext& rRenderContext, const Rectangl
Gradient aGradient;
aGradient.SetAngle(0);
- aGradient.SetStyle(GradientStyle_LINEAR);
+ aGradient.SetStyle(GradientStyle::Linear);
aGradient.SetStartColor(aStartColor);
aGradient.SetEndColor(aEndColor);
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 064bfa858caf..aa0a6bdb1188 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -839,7 +839,7 @@ void drawDataBars(vcl::RenderContext& rRenderContext, const ScDataBarInfo* pOldD
if(pOldDataBarInfo->mbGradient)
{
rRenderContext.SetLineColor(pOldDataBarInfo->maColor);
- Gradient aGradient(GradientStyle_LINEAR, pOldDataBarInfo->maColor, COL_TRANSPARENT);
+ Gradient aGradient(GradientStyle::Linear, pOldDataBarInfo->maColor, COL_TRANSPARENT);
if(pOldDataBarInfo->mnLength < 0)
aGradient.SetAngle(2700);
diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx
index d0b1aa4be26a..0d29d3d820ac 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -132,7 +132,7 @@ void AnnotationTextWindow::Paint( vcl::RenderContext& /*rRenderContext*/, const
if ( !bHighContrast )
{
DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
- Gradient(GradientStyle_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
+ Gradient(GradientStyle::Linear,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
}
if( mpOutlinerView )
@@ -659,9 +659,9 @@ void AnnotationWindow::Paint(vcl::RenderContext& rRenderContext, const Rectangle
//draw button
Gradient aGradient;
if (mbMouseOverButton)
- aGradient = Gradient(GradientStyle_LINEAR,ColorFromAlphaColor(80,maColorDark,maColor),ColorFromAlphaColor(15,maColorDark,maColor));
+ aGradient = Gradient(GradientStyle::Linear,ColorFromAlphaColor(80,maColorDark,maColor),ColorFromAlphaColor(15,maColorDark,maColor));
else
- aGradient = Gradient(GradientStyle_LINEAR,ColorFromAlphaColor(15,maColorDark,maColor),ColorFromAlphaColor(80,maColorDark,maColor));
+ aGradient = Gradient(GradientStyle::Linear,ColorFromAlphaColor(15,maColorDark,maColor),ColorFromAlphaColor(80,maColorDark,maColor));
DrawGradient(maRectMetaButton,aGradient);
//draw rect around button
SetFillColor();
diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx
index 0d760796dc3c..68586272f408 100644
--- a/sfx2/source/sidebar/Theme.cxx
+++ b/sfx2/source/sidebar/Theme.cxx
@@ -205,7 +205,7 @@ void Theme::UpdateTheme()
setPropertyValue(
maPropertyIdToNameMap[Paint_PanelTitleBarBackground],
Any(Tools::VclToAwtGradient(Gradient(
- GradientStyle_LINEAR,
+ GradientStyle::Linear,
aSecondColor.GetRGBColor(),
aBaseBackgroundColor.GetRGBColor()
))));
@@ -337,7 +337,7 @@ void Theme::UpdateTheme()
setPropertyValue(
maPropertyIdToNameMap[Paint_ToolBoxBackground],
Any(Tools::VclToAwtGradient(Gradient(
- GradientStyle_LINEAR,
+ GradientStyle::Linear,
aBaseBackgroundColor.GetRGBColor(),
aGradientStop2.GetRGBColor()
))));
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index a96ea76afc36..c9a0a072d431 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -1220,7 +1220,7 @@ void AreaPropertyPanelBase::Update()
mpLbFillGradTo->SelectEntry(aGradient.GetEndColor());
}
mpGradientStyle->SelectEntryPos(sal::static_int_cast< sal_Int32 >( aGradient.GetGradientStyle() ));
- if(mpGradientStyle->GetSelectEntryPos() == GradientStyle_RADIAL)
+ if(mpGradientStyle->GetSelectEntryPos() == (sal_Int32)GradientStyle::Radial)
mpMTRAngle->Disable();
else
mpMTRAngle->SetValue( aGradient.GetAngle() /10 );
diff --git a/svx/source/svdraw/svdfmtf.cxx b/svx/source/svdraw/svdfmtf.cxx
index aad00cae4399..a19a53422688 100644
--- a/svx/source/svdraw/svdfmtf.cxx
+++ b/svx/source/svdraw/svdfmtf.cxx
@@ -1357,18 +1357,18 @@ namespace
switch(rGradientStyle)
{
- case GradientStyle_LINEAR: aXGradientStyle = css::awt::GradientStyle_LINEAR; break;
- case GradientStyle_AXIAL: aXGradientStyle = css::awt::GradientStyle_AXIAL; break;
- case GradientStyle_RADIAL: aXGradientStyle = css::awt::GradientStyle_RADIAL; break;
- case GradientStyle_ELLIPTICAL: aXGradientStyle = css::awt::GradientStyle_ELLIPTICAL; break;
- case GradientStyle_SQUARE: aXGradientStyle = css::awt::GradientStyle_SQUARE; break;
- case GradientStyle_RECT: aXGradientStyle = css::awt::GradientStyle_RECT; break;
-
- // Needed due to GradientStyle_FORCE_EQUAL_SIZE; this again is needed
+ case GradientStyle::Linear: aXGradientStyle = css::awt::GradientStyle_LINEAR; break;
+ case GradientStyle::Axial: aXGradientStyle = css::awt::GradientStyle_AXIAL; break;
+ case GradientStyle::Radial: aXGradientStyle = css::awt::GradientStyle_RADIAL; break;
+ case GradientStyle::Elliptical: aXGradientStyle = css::awt::GradientStyle_ELLIPTICAL; break;
+ case GradientStyle::Square: aXGradientStyle = css::awt::GradientStyle_SQUARE; break;
+ case GradientStyle::Rect: aXGradientStyle = css::awt::GradientStyle_RECT; break;
+
+ // Needed due to GradientStyle::FORCE_EQUAL_SIZE; this again is needed
// to force the enum defines in VCL to a defined size for the compilers,
// so despite it is never used it cannot be removed (would break the
// API implementation probably).
- case GradientStyle_FORCE_EQUAL_SIZE: break;
+ case GradientStyle::FORCE_EQUAL_SIZE: break;
default:
break;
}
diff --git a/sw/source/uibase/docvw/AnnotationMenuButton.cxx b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
index 876531c46cf2..ddaae9d1b8e2 100644
--- a/sw/source/uibase/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/uibase/docvw/AnnotationMenuButton.cxx
@@ -141,11 +141,11 @@ void AnnotationMenuButton::Paint(vcl::RenderContext& rRenderContext, const Recta
//draw button
Gradient aGradient;
if (IsMouseOver())
- aGradient = Gradient(GradientStyle_LINEAR,
+ aGradient = Gradient(GradientStyle::Linear,
ColorFromAlphaColor(80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark()),
ColorFromAlphaColor(15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark()));
else
- aGradient = Gradient(GradientStyle_LINEAR,
+ aGradient = Gradient(GradientStyle::Linear,
ColorFromAlphaColor(15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark()),
ColorFromAlphaColor(80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark()));
rRenderContext.DrawGradient(aRect, aGradient);
diff --git a/sw/source/uibase/docvw/SidebarTxtControl.cxx b/sw/source/uibase/docvw/SidebarTxtControl.cxx
index 9737b0691c73..77a49e0ae506 100644
--- a/sw/source/uibase/docvw/SidebarTxtControl.cxx
+++ b/sw/source/uibase/docvw/SidebarTxtControl.cxx
@@ -161,12 +161,12 @@ void SidebarTextControl::Paint(vcl::RenderContext& rRenderContext, const Rectang
if (mrSidebarWin.IsMouseOverSidebarWin() || HasFocus())
{
rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())),
- Gradient(GradientStyle_LINEAR, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark()));
+ Gradient(GradientStyle::Linear, mrSidebarWin.ColorDark(), mrSidebarWin.ColorDark()));
}
else
{
rRenderContext.DrawGradient(Rectangle(Point(0,0), rRenderContext.PixelToLogic(GetSizePixel())),
- Gradient(GradientStyle_LINEAR, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark()));
+ Gradient(GradientStyle::Linear, mrSidebarWin.ColorLight(), mrSidebarWin.ColorDark()));
}
}
diff --git a/vcl/backendtest/VisualBackendTest.cxx b/vcl/backendtest/VisualBackendTest.cxx
index c944eecdffec..42114886ff25 100644
--- a/vcl/backendtest/VisualBackendTest.cxx
+++ b/vcl/backendtest/VisualBackendTest.cxx
@@ -434,7 +434,7 @@ public:
mpVDev->DrawPolyPolygon(polyPolygon);
Rectangle aGradientRect(Point(200, 200), Size(200 + fTime * 300, 200 + fTime * 300));
- mpVDev->DrawGradient(aGradientRect, Gradient(GradientStyle_LINEAR, COL_YELLOW, COL_BLUE));
+ mpVDev->DrawGradient(aGradientRect, Gradient(GradientStyle::Linear, COL_YELLOW, COL_BLUE));
rRenderContext.DrawOutDev(Point(), mpVDev->GetOutputSizePixel(),
Point(), mpVDev->GetOutputSizePixel(),
diff --git a/vcl/backendtest/outputdevice/gradient.cxx b/vcl/backendtest/outputdevice/gradient.cxx
index f686e3270c80..83d45bf8cf4d 100644
--- a/vcl/backendtest/outputdevice/gradient.cxx
+++ b/vcl/backendtest/outputdevice/gradient.cxx
@@ -17,7 +17,7 @@ Bitmap OutputDeviceTestGradient::setupLinearGradient()
{
initialSetup(12, 12, constBackgroundColor);
- Gradient aGradient(GradientStyle_LINEAR, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
+ Gradient aGradient(GradientStyle::Linear, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
aGradient.SetAngle(900);
Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
@@ -30,7 +30,7 @@ Bitmap OutputDeviceTestGradient::setupRadialGradient()
{
initialSetup(12, 12, constBackgroundColor);
- Gradient aGradient(GradientStyle_RADIAL, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
+ Gradient aGradient(GradientStyle::Radial, Color(0xFF, 0xFF, 0xFF), Color(0x00, 0x00, 0x00));
Rectangle aDrawRect(maVDRectangle.Left() + 1, maVDRectangle.Top() + 1,
maVDRectangle.Right() - 1, maVDRectangle.Bottom() - 1);
mpVirtualDevice->DrawGradient(aDrawRect, aGradient);
diff --git a/vcl/opengl/gdiimpl.cxx b/vcl/opengl/gdiimpl.cxx
index 10e2764bcb36..32d25fd924c0 100644
--- a/vcl/opengl/gdiimpl.cxx
+++ b/vcl/opengl/gdiimpl.cxx
@@ -1957,9 +1957,9 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
return true;
}
- if (rGradient.GetStyle() != GradientStyle_LINEAR &&
- rGradient.GetStyle() != GradientStyle_AXIAL &&
- rGradient.GetStyle() != GradientStyle_RADIAL )
+ if (rGradient.GetStyle() != GradientStyle::Linear &&
+ rGradient.GetStyle() != GradientStyle::Axial &&
+ rGradient.GetStyle() != GradientStyle::Radial )
{
VCL_GL_INFO("::drawGradient unsupported gradient type");
return false;
@@ -2005,17 +2005,17 @@ bool OpenGLSalGraphicsImpl::drawGradient(const tools::PolyPolygon& rPolyPoly,
DrawRect(aBoundRect);
}
}
- else if (rGradient.GetStyle() == GradientStyle_LINEAR)
+ else if (rGradient.GetStyle() == GradientStyle::Linear)
{
VCL_GL_INFO("::drawGradient -> DrawLinearGradient");
DrawLinearGradient(rGradient, aBoundRect);
}
- else if (rGradient.GetStyle() == GradientStyle_AXIAL)
+ else if (rGradient.GetStyle() == GradientStyle::Axial)
{
VCL_GL_INFO("::drawGradient -> DrawAxialGradient");
DrawAxialGradient(rGradient, aBoundRect);
}
- else if (rGradient.GetStyle() == GradientStyle_RADIAL)
+ else if (rGradient.GetStyle() == GradientStyle::Radial)
{
VCL_GL_INFO("::drawGradient -> DrawRadialGradient");
DrawRadialGradient(rGradient, aBoundRect);
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index 2c7170e3b715..69ac7b7f9339 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -27,7 +27,7 @@ Impl_Gradient::Impl_Gradient() :
maStartColor( COL_BLACK ),
maEndColor( COL_WHITE )
{
- meStyle = GradientStyle_LINEAR;
+ meStyle = GradientStyle::Linear;
mnAngle = 0;
mnBorder = 0;
mnOfsX = 50;
@@ -150,7 +150,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
Rectangle aRect( rRect );
sal_uInt16 nAngle = GetAngle() % 3600;
- if( GetStyle() == GradientStyle_LINEAR || GetStyle() == GradientStyle_AXIAL )
+ if( GetStyle() == GradientStyle::Linear || GetStyle() == GradientStyle::Axial )
{
const double fAngle = nAngle * F_PI1800;
const double fWidth = aRect.GetWidth();
@@ -171,7 +171,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
}
else
{
- if( GetStyle() == GradientStyle_SQUARE || GetStyle() == GradientStyle_RECT )
+ if( GetStyle() == GradientStyle::Square || GetStyle() == GradientStyle::Rect )
{
const double fAngle = nAngle * F_PI1800;
const double fWidth = aRect.GetWidth();
@@ -190,13 +190,13 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
Size aSize( aRect.GetSize() );
- if( GetStyle() == GradientStyle_RADIAL )
+ if( GetStyle() == GradientStyle::Radial )
{
// Calculation of radii for circle
aSize.Width() = (long)(0.5 + sqrt((double)aSize.Width()*(double)aSize.Width() + (double)aSize.Height()*(double)aSize.Height()));
aSize.Height() = aSize.Width();
}
- else if( GetStyle() == GradientStyle_ELLIPTICAL )
+ else if( GetStyle() == GradientStyle::Elliptical )
{
// Calculation of radii for ellipse
aSize.Width() = (long)( 0.5 + (double) aSize.Width() * 1.4142 );
@@ -265,7 +265,7 @@ SvStream& WriteGradient( SvStream& rOStm, const Gradient& rGradient )
{
VersionCompat aCompat( rOStm, StreamMode::WRITE, 1 );
- rOStm.WriteUInt16( rGradient.mpImplGradient->meStyle );
+ rOStm.WriteUInt16( (sal_uInt16)rGradient.mpImplGradient->meStyle );
WriteColor( rOStm, rGradient.mpImplGradient->maStartColor );
WriteColor( rOStm, rGradient.mpImplGradient->maEndColor );
rOStm.WriteUInt16( rGradient.mpImplGradient->mnAngle )
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 5f232b1f688d..28d195df3a85 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -10784,9 +10784,9 @@ void PDFWriterImpl::writeTransparentObject( TransparencyEmit& rObject )
bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
{
// LO internal gradient -> PDF shading type:
- // * GradientStyle_LINEAR: axial shading, using sampled-function with 2 samples
+ // * GradientStyle::Linear: axial shading, using sampled-function with 2 samples
// [t=0:colorStart, t=1:colorEnd]
- // * GradientStyle_AXIAL: axial shading, using sampled-function with 3 samples
+ // * GradientStyle::Axial: axial shading, using sampled-function with 3 samples
// [t=0:colorEnd, t=0.5:colorStart, t=1:colorEnd]
// * other styles: function shading with aSize.Width() * aSize.Height() samples
sal_Int32 nFunctionObject = createObject();
@@ -10816,8 +10816,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
"<</FunctionType 0\n");
switch (rObject.m_aGradient.GetStyle())
{
- case GradientStyle_LINEAR:
- case GradientStyle_AXIAL:
+ case GradientStyle::Linear:
+ case GradientStyle::Axial:
aLine.append("/Domain[ 0 1]\n");
break;
default:
@@ -10826,10 +10826,10 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
aLine.append("/Size[ " );
switch (rObject.m_aGradient.GetStyle())
{
- case GradientStyle_LINEAR:
+ case GradientStyle::Linear:
aLine.append('2');
break;
- case GradientStyle_AXIAL:
+ case GradientStyle::Axial:
aLine.append('3');
break;
default:
@@ -10859,13 +10859,13 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
sal_uInt8 aCol[3];
switch (rObject.m_aGradient.GetStyle())
{
- case GradientStyle_AXIAL:
+ case GradientStyle::Axial:
aCol[0] = rObject.m_aGradient.GetEndColor().GetRed();
aCol[1] = rObject.m_aGradient.GetEndColor().GetGreen();
aCol[2] = rObject.m_aGradient.GetEndColor().GetBlue();
CHECK_RETURN( writeBuffer( aCol, 3 ) );
SAL_FALLTHROUGH;
- case GradientStyle_LINEAR:
+ case GradientStyle::Linear:
{
aCol[0] = rObject.m_aGradient.GetStartColor().GetRed();
aCol[1] = rObject.m_aGradient.GetStartColor().GetGreen();
@@ -10916,8 +10916,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
aLine.append( " 0 obj\n");
switch (rObject.m_aGradient.GetStyle())
{
- case GradientStyle_LINEAR:
- case GradientStyle_AXIAL:
+ case GradientStyle::Linear:
+ case GradientStyle::Axial:
aLine.append("<</ShadingType 2\n");
break;
default:
@@ -10938,7 +10938,7 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
sal_uInt16 nAngle = rObject.m_aGradient.GetAngle() % 3600;
rObject.m_aGradient.GetBoundRect( aRect, aBoundRect, aCenter );
- const bool bLinear = (rObject.m_aGradient.GetStyle() == GradientStyle_LINEAR);
+ const bool bLinear = (rObject.m_aGradient.GetStyle() == GradientStyle::Linear);
double fBorder = aBoundRect.GetHeight() * rObject.m_aGradient.GetBorder() / 100.0;
if ( !bLinear )
{
@@ -10953,8 +10953,8 @@ bool PDFWriterImpl::writeGradientFunction( GradientEmit& rObject )
switch (rObject.m_aGradient.GetStyle())
{
- case GradientStyle_LINEAR:
- case GradientStyle_AXIAL:
+ case GradientStyle::Linear:
+ case GradientStyle::Axial:
{
aLine.append("/Domain[ 0 1 ]\n"
"/Coords[ " );
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index d714f5d8a4ca..8ececab361a8 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -2043,8 +2043,8 @@ void PDFWriterImpl::writeG4Stream( BitmapReadAccess* i_pBitmap )
static bool lcl_canUsePDFAxialShading(const Gradient& rGradient) {
switch (rGradient.GetStyle())
{
- case GradientStyle_LINEAR:
- case GradientStyle_AXIAL:
+ case GradientStyle::Linear:
+ case GradientStyle::Axial:
break;
default:
return false;
diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx
index e25df3127dcc..ea21233cc115 100644
--- a/vcl/source/gdi/svmconverter.cxx
+++ b/vcl/source/gdi/svmconverter.cxx
@@ -1898,7 +1898,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf,
rOStm.WriteInt16( GDI_GRADIENT_ACTION );
rOStm.WriteInt32( 46 );
ImplWriteRect( rOStm, pAct->GetRect() );
- rOStm.WriteInt16( rGrad.GetStyle() );
+ rOStm.WriteInt16( (sal_Int16)rGrad.GetStyle() );
ImplWriteColor( rOStm, rGrad.GetStartColor() );
ImplWriteColor( rOStm, rGrad.GetEndColor() );
rOStm.WriteInt16( rGrad.GetAngle() );
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 8d336b2f0ef1..291e9fef470c 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -329,7 +329,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() const
{
Gradient g;
g.SetAngle( 900 );
- g.SetStyle( GradientStyle_LINEAR );
+ g.SetStyle( GradientStyle::Linear );
g.SetStartColor( Application::GetSettings().GetStyleSettings().GetFaceColor() );
// no 'extreme' gradient when high contrast
if( Application::GetSettings().GetStyleSettings().GetHighContrastMode() )
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index 696cc6ac90ac..7c14e0a7b149 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -138,7 +138,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly,
// if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the
// polypolygon, so pass in a NULL for the clipping parameter
- if( aGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
+ if( aGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial )
DrawLinearGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly );
else
DrawComplexGradient( aRect, aGradient, aClixPolyPoly.IsRect() ? nullptr : &aClixPolyPoly );
@@ -235,7 +235,7 @@ void OutputDevice::DrawGradientToMetafile ( const tools::PolyPolygon& rPolyPoly,
// if the clipping polypolygon is a rectangle, then it's the same size as the bounding of the
// polypolygon, so pass in a NULL for the clipping parameter
- if( aGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
+ if( aGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() == GradientStyle::Axial )
DrawLinearGradientToMetafile( aRect, aGradient );
else
DrawComplexGradientToMetafile( aRect, aGradient );
@@ -271,7 +271,7 @@ void OutputDevice::DrawLinearGradient( const Rectangle& rRect,
rGradient.GetBoundRect( rRect, aRect, aCenter );
- bool bLinear = (rGradient.GetStyle() == GradientStyle_LINEAR);
+ bool bLinear = (rGradient.GetStyle() == GradientStyle::Linear);
double fBorder = rGradient.GetBorder() * aRect.GetHeight() / 100.0;
if ( !bLinear )
{
@@ -509,7 +509,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
// all gradients are rendered as nested rectangles which shrink
// equally in each dimension - except for 'square' gradients
// which shrink to a central vertex but are not per-se square.
- if( rGradient.GetStyle() != GradientStyle_SQUARE )
+ if( rGradient.GetStyle() != GradientStyle::Square )
{
fScanIncY = std::min( fScanIncY, fScanIncX );
fScanIncX = fScanIncY;
@@ -549,7 +549,7 @@ void OutputDevice::DrawComplexGradient( const Rectangle& rRect,
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
- if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
+ if( rGradient.GetStyle() == GradientStyle::Radial || rGradient.GetStyle() == GradientStyle::Elliptical )
aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
aPoly = tools::Polygon( aRect );
@@ -625,7 +625,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const Rectangle& rRect,
rGradient.GetBoundRect( rRect, aRect, aCenter );
- bool bLinear = (rGradient.GetStyle() == GradientStyle_LINEAR);
+ bool bLinear = (rGradient.GetStyle() == GradientStyle::Linear);
double fBorder = rGradient.GetBorder() * aRect.GetHeight() / 100.0;
if ( !bLinear )
{
@@ -853,7 +853,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
// all gradients are rendered as nested rectangles which shrink
// equally in each dimension - except for 'square' gradients
// which shrink to a central vertex but are not per-se square.
- if( rGradient.GetStyle() != GradientStyle_SQUARE )
+ if( rGradient.GetStyle() != GradientStyle::Square )
{
fScanIncY = std::min( fScanIncY, fScanIncX );
fScanIncX = fScanIncY;
@@ -878,7 +878,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const Rectangle& rRect,
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
- if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
+ if( rGradient.GetStyle() == GradientStyle::Radial || rGradient.GetStyle() == GradientStyle::Elliptical )
aPoly = tools::Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
aPoly = tools::Polygon( aRect );
@@ -1043,7 +1043,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
- if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL )
+ if( aGradient.GetStyle() == GradientStyle::Linear || aGradient.GetStyle() == GradientStyle::Axial )
DrawLinearGradientToMetafile( aRect, aGradient );
else
DrawComplexGradientToMetafile( aRect, aGradient );
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index ee20cecb62c1..b185a16f40e3 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2118,7 +2118,7 @@ void Menu::ImplPaint(vcl::RenderContext& rRenderContext,
Rectangle aRect(Point(), Point(aLogoSz.Width() - 1, aOutSz.Height()));
if (rRenderContext.GetColorCount() >= 256)
{
- Gradient aGrad(GradientStyle_LINEAR, pLogo->aStartColor, pLogo->aEndColor);
+ Gradient aGrad(GradientStyle::Linear, pLogo->aStartColor, pLogo->aEndColor);
aGrad.SetAngle(1800);
aGrad.SetBorder(15);
rRenderContext.DrawGradient(aRect, aGrad);
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index d50b3bf61901..4bdca1b3a41a 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -336,7 +336,7 @@ void ToolBox::ImplDrawGradientBackground(vcl::RenderContext& rRenderContext, Imp
Gradient g;
g.SetAngle(mbHorz ? 0 : 900);
- g.SetStyle(GradientStyle_LINEAR);
+ g.SetStyle(GradientStyle::Linear);
g.SetStartColor(startCol);
g.SetEndColor(endCol);
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 805ef46d21ba..562f4d1f27d3 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -139,7 +139,7 @@ void setupMethodStubs( functor_vector_type& res )
const BitmapEx aBitmapExAlphaAlien( aBitmapAlien, aBitmapAlien );
const Image aImage( aBitmapEx );
- const Gradient aGradient(GradientStyle_ELLIPTICAL,aBlackColor,aWhiteColor);
+ const Gradient aGradient(GradientStyle::Elliptical,aBlackColor,aWhiteColor);
const Hatch aHatch(HatchStyle::Triple,aBlackColor,4,450);
const Wallpaper aWallpaper( aWhiteColor );
diff --git a/vcl/workben/svptest.cxx b/vcl/workben/svptest.cxx
index 357a56b8dea8..0d67499f8149 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -293,7 +293,7 @@ void MyWin::Paint(vcl::RenderContext& rRenderContext, const Rectangle& rRect)
Color aLightGreen(0, 0xff, 0);
Color aDarkGreen(0, 0x40, 0);
- Gradient aGradient(GradientStyle_LINEAR, aBlack, aWhite);
+ Gradient aGradient(GradientStyle::Linear, aBlack, aWhite);
aGradient.SetAngle(900);
rRenderContext.DrawGradient(Rectangle(Point(1000, 4500),
Size(aPaperSize.Width() - 2000, 500)),
diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx
index c301bd75b71f..e6cb4c432d4c 100644
--- a/vcl/workben/vcldemo.cxx
+++ b/vcl/workben/vcldemo.cxx
@@ -234,7 +234,7 @@ public:
Gradient aGradient;
aGradient.SetStartColor(COL_BLUE);
aGradient.SetEndColor(COL_GREEN);
- aGradient.SetStyle(GradientStyle_LINEAR);
+ aGradient.SetStyle(GradientStyle::Linear);
rDev.DrawGradient(r, aGradient);
}
@@ -791,10 +791,10 @@ public:
COL_BLUE, COL_BLUE, COL_BLUE, COL_CYAN, COL_CYAN
};
GradientStyle eStyles[] = {
- GradientStyle_LINEAR, GradientStyle_AXIAL, GradientStyle_RADIAL, GradientStyle_ELLIPTICAL, GradientStyle_SQUARE,
- GradientStyle_RECT, GradientStyle_FORCE_EQUAL_SIZE, GradientStyle_LINEAR, GradientStyle_RADIAL, GradientStyle_LINEAR,
- GradientStyle_LINEAR, GradientStyle_AXIAL, GradientStyle_RADIAL, GradientStyle_ELLIPTICAL, GradientStyle_SQUARE,
- GradientStyle_RECT, GradientStyle_FORCE_EQUAL_SIZE, GradientStyle_LINEAR, GradientStyle_RADIAL, GradientStyle_LINEAR
+ GradientStyle::Linear, GradientStyle::Axial, GradientStyle::Radial, GradientStyle::Elliptical, GradientStyle::Square,
+ GradientStyle::Rect, GradientStyle::FORCE_EQUAL_SIZE, GradientStyle::Linear, GradientStyle::Radial, GradientStyle::Linear,
+ GradientStyle::Linear, GradientStyle::Axial, GradientStyle::Radial, GradientStyle::Elliptical, GradientStyle::Square,
+ GradientStyle::Rect, GradientStyle::FORCE_EQUAL_SIZE, GradientStyle::Linear, GradientStyle::Radial, GradientStyle::Linear
};
sal_uInt16 nAngles[] = {
0, 0, 0, 0, 0,
@@ -832,7 +832,7 @@ public:
Gradient aGradient;
aGradient.SetStartColor(COL_YELLOW);
aGradient.SetEndColor(COL_RED);
- aGradient.SetStyle(GradientStyle_RECT);
+ aGradient.SetStyle(GradientStyle::Rect);
aGradient.SetBorder(r.GetSize().Width()/20);
rDev.DrawGradient(r, aGradient);
}