summaryrefslogtreecommitdiff
path: root/vcl
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 /vcl
parent933c0679d64a5585ebfd233180a1a818b493eec5 (diff)
convert GradientStyle to scoped enum
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
Diffstat (limited to 'vcl')
-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
14 files changed, 51 insertions, 51 deletions
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);
}