summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--canvas/source/cairo/cairo_canvashelper.cxx4
-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/svg/svgwriter.cxx20
-rw-r--r--padmin/source/padialog.cxx2
-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--sw/source/ui/docvw/AnnotationMenuButton.cxx4
-rw-r--r--sw/source/ui/docvw/SidebarTxtControl.cxx4
-rw-r--r--vcl/inc/vcl/gradient.hxx12
-rw-r--r--vcl/inc/vcl/vclenum.hxx26
-rw-r--r--vcl/source/app/settings.cxx2
-rw-r--r--vcl/source/gdi/gradient.cxx12
-rw-r--r--vcl/source/gdi/outdev4.cxx10
-rw-r--r--vcl/source/gdi/wall.cxx2
-rw-r--r--vcl/source/window/menu.cxx2
-rw-r--r--vcl/source/window/toolbox.cxx2
-rw-r--r--vcl/source/window/window.cxx2
-rw-r--r--vcl/workben/outdevgrind.cxx2
-rw-r--r--vcl/workben/svptest.cxx2
25 files changed, 73 insertions, 103 deletions
diff --git a/canvas/source/cairo/cairo_canvashelper.cxx b/canvas/source/cairo/cairo_canvashelper.cxx
index b75efda876fc..924e6f8eb4c4 100644
--- a/canvas/source/cairo/cairo_canvashelper.cxx
+++ b/canvas/source/cairo/cairo_canvashelper.cxx
@@ -711,10 +711,6 @@ namespace cairocanvas
const ::canvas::ParametricPolyPolygon::Values aValues = rPolygon.getValues();
double x0, x1, y0, y1, cx, cy, r0, r1;
-// undef macros from vclenum.hxx which conflicts with GradientType enum values
-#undef GRADIENT_LINEAR
-#undef GRADIENT_ELLIPTICAL
-
switch( aValues.meType )
{
case ::canvas::ParametricPolyPolygon::GRADIENT_LINEAR:
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx
index 1b0f8cd5bfcf..028aa0c7d33c 100644
--- a/cppcanvas/source/mtfrenderer/implrenderer.cxx
+++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx
@@ -634,7 +634,7 @@ namespace cppcanvas
uno::Sequence< uno::Sequence < double > > aColors(2);
uno::Sequence< double > aStops(2);
- if( rGradient.GetStyle() == GRADIENT_AXIAL )
+ if( rGradient.GetStyle() == GradientStyle_AXIAL )
{
aStops.realloc(3);
aColors.realloc(3);
@@ -671,7 +671,7 @@ namespace cppcanvas
rtl::OUString aGradientService;
switch( rGradient.GetStyle() )
{
- case GRADIENT_LINEAR:
+ case GradientStyle_LINEAR:
basegfx::tools::createLinearODFGradientInfo(aGradInfo,
aBounds,
nSteps,
@@ -683,7 +683,7 @@ namespace cppcanvas
aGradientService = "LinearGradient";
break;
- case GRADIENT_AXIAL:
+ case GradientStyle_AXIAL:
{
// Adapt the border so that it is suitable
// for the axial gradient. An axial
@@ -717,7 +717,7 @@ namespace cppcanvas
break;
}
- case GRADIENT_RADIAL:
+ case GradientStyle_RADIAL:
basegfx::tools::createRadialODFGradientInfo(aGradInfo,
aBounds,
aOffset,
@@ -726,7 +726,7 @@ namespace cppcanvas
aGradientService = "EllipticalGradient";
break;
- case GRADIENT_ELLIPTICAL:
+ case GradientStyle_ELLIPTICAL:
basegfx::tools::createEllipticalODFGradientInfo(aGradInfo,
aBounds,
aOffset,
@@ -736,7 +736,7 @@ namespace cppcanvas
aGradientService = "EllipticalGradient";
break;
- case GRADIENT_SQUARE:
+ case GradientStyle_SQUARE:
basegfx::tools::createSquareODFGradientInfo(aGradInfo,
aBounds,
aOffset,
@@ -746,7 +746,7 @@ namespace cppcanvas
aGradientService = "RectangularGradient";
break;
- case GRADIENT_RECT:
+ case GradientStyle_RECT:
basegfx::tools::createRectangularODFGradientInfo(aGradInfo,
aBounds,
aOffset,
diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
index 448ae143a493..fa5b1ae1a9f0 100644
--- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx
@@ -892,32 +892,32 @@ namespace
switch(rGradient.GetStyle())
{
- case GRADIENT_LINEAR :
+ case GradientStyle_LINEAR :
{
aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_LINEAR;
break;
}
- case GRADIENT_AXIAL :
+ case GradientStyle_AXIAL :
{
aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_AXIAL;
break;
}
- case GRADIENT_RADIAL :
+ case GradientStyle_RADIAL :
{
aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_RADIAL;
break;
}
- case GRADIENT_ELLIPTICAL :
+ case GradientStyle_ELLIPTICAL :
{
aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_ELLIPTICAL;
break;
}
- case GRADIENT_SQUARE :
+ case GradientStyle_SQUARE :
{
aGradientStyle = drawinglayer::attribute::GRADIENTSTYLE_SQUARE;
break;
}
- default : // GRADIENT_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 7387700edaa1..3cad086529f6 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -340,32 +340,32 @@ namespace drawinglayer
{
default : // attribute::GRADIENTSTYLE_LINEAR :
{
- o_rVCLGradient.SetStyle(GRADIENT_LINEAR);
+ o_rVCLGradient.SetStyle(GradientStyle_LINEAR);
break;
}
case attribute::GRADIENTSTYLE_AXIAL :
{
- o_rVCLGradient.SetStyle(GRADIENT_AXIAL);
+ o_rVCLGradient.SetStyle(GradientStyle_AXIAL);
break;
}
case attribute::GRADIENTSTYLE_RADIAL :
{
- o_rVCLGradient.SetStyle(GRADIENT_RADIAL);
+ o_rVCLGradient.SetStyle(GradientStyle_RADIAL);
break;
}
case attribute::GRADIENTSTYLE_ELLIPTICAL :
{
- o_rVCLGradient.SetStyle(GRADIENT_ELLIPTICAL);
+ o_rVCLGradient.SetStyle(GradientStyle_ELLIPTICAL);
break;
}
case attribute::GRADIENTSTYLE_SQUARE :
{
- o_rVCLGradient.SetStyle(GRADIENT_SQUARE);
+ o_rVCLGradient.SetStyle(GradientStyle_SQUARE);
break;
}
case attribute::GRADIENTSTYLE_RECT :
{
- o_rVCLGradient.SetStyle(GRADIENT_RECT);
+ o_rVCLGradient.SetStyle(GradientStyle_RECT);
break;
}
}
@@ -1542,16 +1542,16 @@ namespace drawinglayer
switch(aVCLGradient.GetStyle())
{
- default : // GRADIENT_LINEAR:
- case GRADIENT_AXIAL:
+ default : // GradientStyle_LINEAR:
+ case GradientStyle_AXIAL:
eGrad = SvtGraphicFill::gradientLinear;
break;
- case GRADIENT_RADIAL:
- case GRADIENT_ELLIPTICAL:
+ case GradientStyle_RADIAL:
+ case GradientStyle_ELLIPTICAL:
eGrad = SvtGraphicFill::gradientRadial;
break;
- case GRADIENT_SQUARE:
- case GRADIENT_RECT:
+ case GradientStyle_SQUARE:
+ case GradientStyle_RECT:
eGrad = SvtGraphicFill::gradientRectangular;
break;
}
@@ -1828,7 +1828,7 @@ namespace drawinglayer
const sal_uInt8 nTransPercentVcl((sal_uInt8)basegfx::fround(rUniTransparenceCandidate.getTransparence() * 255.0));
const Color aTransColor(nTransPercentVcl, nTransPercentVcl, nTransPercentVcl);
- aVCLGradient.SetStyle(GRADIENT_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 d43569e8e9a5..dfc7edf05b93 100644
--- a/filter/source/flash/swfwriter1.cxx
+++ b/filter/source/flash/swfwriter1.cxx
@@ -352,7 +352,7 @@ void Writer::Impl_writeGradientEx( const PolyPolygon& rPolyPoly, const Gradient&
PolyPolygon aPolyPolygon( rPolyPoly );
map( aPolyPolygon );
- if( (rGradient.GetStyle() == GRADIENT_LINEAR && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GRADIENT_RADIAL) )
+ if( (rGradient.GetStyle() == GradientStyle_LINEAR && rGradient.GetAngle() == 900) || (rGradient.GetStyle() == GradientStyle_RADIAL) )
{
const Rectangle aBoundRect( aPolyPolygon.GetBoundRect() );
diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx
index 1106eaf3474e..a74e17522110 100644
--- a/filter/source/svg/svgwriter.cxx
+++ b/filter/source/svg/svgwriter.cxx
@@ -191,8 +191,8 @@ void SVGAttributeWriter::AddPaintAttr( const Color& rLineColor, const Color& rFi
void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradient& rGradient, ::rtl::OUString& rGradientId )
{
if( rObjRect.GetWidth() && rObjRect.GetHeight() &&
- ( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL ||
- rGradient.GetStyle() == GRADIENT_RADIAL || rGradient.GetStyle() == GRADIENT_ELLIPTICAL ) )
+ ( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL ||
+ rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL ) )
{
SvXMLElementExport aDesc( mrExport, XML_NAMESPACE_NONE, aXMLElemDefs, sal_True, sal_True );
Color aStartColor( rGradient.GetStartColor() ), aEndColor( rGradient.GetEndColor() );
@@ -220,7 +220,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
::std::auto_ptr< SvXMLElementExport > apGradient;
::rtl::OUString aColorStr;
- if( rGradient.GetStyle() == GRADIENT_LINEAR || rGradient.GetStyle() == GRADIENT_AXIAL )
+ if( rGradient.GetStyle() == GradientStyle_LINEAR || rGradient.GetStyle() == GradientStyle_AXIAL )
{
Polygon aLinePoly( 2 );
@@ -239,9 +239,9 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
// write stop values
double fBorder = static_cast< double >( rGradient.GetBorder() ) *
- ( ( rGradient.GetStyle() == GRADIENT_AXIAL ) ? 0.005 : 0.01 );
+ ( ( rGradient.GetStyle() == GradientStyle_AXIAL ) ? 0.005 : 0.01 );
- ImplGetColorStr( ( rGradient.GetStyle() == GRADIENT_AXIAL ) ? aEndColor : aStartColor, aColorStr );
+ ImplGetColorStr( ( rGradient.GetStyle() == GradientStyle_AXIAL ) ? aEndColor : aStartColor, aColorStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( fBorder ) );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrStopColor, aColorStr );
@@ -249,7 +249,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
SvXMLElementExport aDesc2( mrExport, XML_NAMESPACE_NONE, aXMLElemStop, sal_True, sal_True );
}
- if( rGradient.GetStyle() == GRADIENT_AXIAL )
+ if( rGradient.GetStyle() == GradientStyle_AXIAL )
{
ImplGetColorStr( aStartColor, aColorStr );
mrExport.AddAttribute( XML_NAMESPACE_NONE, aXMLAttrOffset, ::rtl::OUString::valueOf( 0.5 ) );
@@ -260,7 +260,7 @@ void SVGAttributeWriter::AddGradientDef( const Rectangle& rObjRect, const Gradie
}
}
- if( rGradient.GetStyle() != GRADIENT_AXIAL )
+ if( rGradient.GetStyle() != GradientStyle_AXIAL )
fBorder = 0.0;
ImplGetColorStr( aEndColor, aColorStr );
@@ -770,8 +770,8 @@ void SVGActionWriter::ImplWriteGradientEx( const PolyPolygon& rPolyPoly, const G
else
aPolyPoly = rPolyPoly;
- if ( rGradient.GetStyle() == GRADIENT_LINEAR ||
- rGradient.GetStyle() == GRADIENT_AXIAL )
+ if ( rGradient.GetStyle() == GradientStyle_LINEAR ||
+ rGradient.GetStyle() == GradientStyle_AXIAL )
{
ImplWriteGradientLinear( aPolyPoly, rGradient );
}
@@ -832,7 +832,7 @@ void SVGActionWriter::ImplWriteGradientLinear( const PolyPolygon& rPolyPoly,
const Color aEndColor = ImplGetColorWithIntensity( rGradient.GetEndColor(), rGradient.GetEndIntensity() );
double fBorderOffset = rGradient.GetBorder() / 100.0;
const sal_uInt16 nSteps = rGradient.GetSteps();
- if( rGradient.GetStyle() == GRADIENT_LINEAR )
+ if( rGradient.GetStyle() == GradientStyle_LINEAR )
{
// Emulate non-smooth gradient
if( 0 < nSteps && nSteps < 100 )
diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx
index 3da1b5df4cb3..3bce4e59b995 100644
--- a/padmin/source/padialog.cxx
+++ b/padmin/source/padialog.cxx
@@ -501,7 +501,7 @@ void SpaPrinterController::printPage( int ) const
Color aLightGreen( 0, 0xff, 0 );
Color aDarkGreen( 0, 0x40, 0 );
- Gradient aGradient( GRADIENT_LINEAR, aBlack, aWhite );
+ Gradient aGradient( GradientStyle_LINEAR, aBlack, aWhite );
aGradient.SetAngle( 900 );
pPrinter->DrawGradient( Rectangle( Point( 1000, 5500 ),
Size( aPaperSize.Width() - 2000,
diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx
index 12f329c6f8a3..57ab90309fee 100644
--- a/reportdesign/source/ui/report/EndMarker.cxx
+++ b/reportdesign/source/ui/report/EndMarker.cxx
@@ -73,7 +73,7 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ )
aStartColor.RGBtoHSB(nHue, nSat, nBri);
nSat += 40;
Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri));
- Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor);
+ Gradient aGradient(GradientStyle_LINEAR,aStartColor,aEndColor);
aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height()));
DrawGradient(PixelToLogic(aPoly) ,aGradient);
diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx
index 98f6e0b8342a..8a191bae5ca5 100644
--- a/reportdesign/source/ui/report/StartMarker.cxx
+++ b/reportdesign/source/ui/report/StartMarker.cxx
@@ -138,7 +138,7 @@ void OStartMarker::Paint( const Rectangle& rRect )
aStartColor.RGBtoHSB(nHue, nSat, nBri);
nSat += 40;
Color aEndColor(Color::HSBtoRGB(nHue, nSat, nBri));
- Gradient aGradient(GRADIENT_LINEAR,aStartColor,aEndColor);
+ Gradient aGradient(GradientStyle_LINEAR,aStartColor,aEndColor);
aGradient.SetSteps(static_cast<sal_uInt16>(aSize.Height()));
DrawGradient(PixelToLogic(aPoly) ,aGradient);
diff --git a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
index e3e8700a5fce..7f067fe52d06 100644
--- a/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
+++ b/sc/source/ui/cctrl/tbzoomsliderctrl.cxx
@@ -469,7 +469,7 @@ void ScZoomSliderWnd::DoPaint( const Rectangle& /*rRect*/ )
Gradient g;
g.SetAngle( 0 );
- g.SetStyle( GRADIENT_LINEAR );
+ g.SetStyle( GradientStyle_LINEAR );
g.SetStartColor( aStartColor );
g.SetEndColor( aEndColor );
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 1ca09e666bf0..cd9c7a9b729f 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -838,7 +838,7 @@ void drawDataBars( const ScDataBarInfo* pOldDataBarInfo, OutputDevice* pDev, con
if(pOldDataBarInfo->mbGradient)
{
pDev->SetLineColor(pOldDataBarInfo->maColor);
- Gradient aGradient(GRADIENT_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 34950f9f299f..6d8a311edc71 100644
--- a/sd/source/ui/annotations/annotationwindow.cxx
+++ b/sd/source/ui/annotations/annotationwindow.cxx
@@ -137,7 +137,7 @@ void AnnotationTextWindow::Paint( const Rectangle& rRect)
if ( !bHighContrast )
{
DrawGradient(Rectangle(Point(0,0),PixelToLogic(GetSizePixel())),
- Gradient(GRADIENT_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
+ Gradient(GradientStyle_LINEAR,mpAnnotationWindow->maColorLight,mpAnnotationWindow->maColor));
}
if( mpOutlinerView )
@@ -693,9 +693,9 @@ void AnnotationWindow::Paint( const Rectangle& rRect)
//draw button
Gradient aGradient;
if (mbMouseOverButton)
- aGradient = Gradient(GRADIENT_LINEAR,ColorFromAlphaColor(80,maColorDark,maColor),ColorFromAlphaColor(15,maColorDark,maColor));
+ aGradient = Gradient(GradientStyle_LINEAR,ColorFromAlphaColor(80,maColorDark,maColor),ColorFromAlphaColor(15,maColorDark,maColor));
else
- aGradient = Gradient(GRADIENT_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/sw/source/ui/docvw/AnnotationMenuButton.cxx b/sw/source/ui/docvw/AnnotationMenuButton.cxx
index c1f4bf3d5868..67585833dd65 100644
--- a/sw/source/ui/docvw/AnnotationMenuButton.cxx
+++ b/sw/source/ui/docvw/AnnotationMenuButton.cxx
@@ -143,11 +143,11 @@ void AnnotationMenuButton::Paint( const Rectangle& /*rRect*/ )
//draw button
Gradient aGradient;
if ( IsMouseOver() )
- aGradient = Gradient( GRADIENT_LINEAR,
+ aGradient = Gradient( GradientStyle_LINEAR,
ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ),
ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ));
else
- aGradient = Gradient( GRADIENT_LINEAR,
+ aGradient = Gradient( GradientStyle_LINEAR,
ColorFromAlphaColor( 15, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ),
ColorFromAlphaColor( 80, mrSidebarWin.ColorAnchor(), mrSidebarWin.ColorDark() ));
DrawGradient( aRect, aGradient );
diff --git a/sw/source/ui/docvw/SidebarTxtControl.cxx b/sw/source/ui/docvw/SidebarTxtControl.cxx
index b26b1b39e503..75d00a1e6a00 100644
--- a/sw/source/ui/docvw/SidebarTxtControl.cxx
+++ b/sw/source/ui/docvw/SidebarTxtControl.cxx
@@ -142,14 +142,14 @@ void SidebarTxtControl::Paint( const Rectangle& rRect)
HasFocus() )
{
DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ),
- Gradient( GRADIENT_LINEAR,
+ Gradient( GradientStyle_LINEAR,
mrSidebarWin.ColorDark(),
mrSidebarWin.ColorDark() ) );
}
else
{
DrawGradient( Rectangle( Point(0,0), PixelToLogic(GetSizePixel()) ),
- Gradient( GRADIENT_LINEAR,
+ Gradient( GradientStyle_LINEAR,
mrSidebarWin.ColorLight(),
mrSidebarWin.ColorDark()));
}
diff --git a/vcl/inc/vcl/gradient.hxx b/vcl/inc/vcl/gradient.hxx
index 382b245e984a..150b79458913 100644
--- a/vcl/inc/vcl/gradient.hxx
+++ b/vcl/inc/vcl/gradient.hxx
@@ -35,18 +35,6 @@
#include <vcl/vclenum.hxx>
-// ------------------
-// - Gradient-Types -
-// ------------------
-
-/*
-#ifndef ENUM_GRADIENTSTYLE_DECLARED
-#define ENUM_GRADIENTSTYLE_DECLARED
-enum GradientStyle { GRADIENT_LINEAR, GRADIENT_AXIAL, GRADIENT_RADIAL,
- GRADIENT_ELLIPTICAL, GRADIENT_SQUARE, GRADIENT_RECT };
-#endif
-*/
-
// ----------------
// - Impl_Gradient -
// ----------------
diff --git a/vcl/inc/vcl/vclenum.hxx b/vcl/inc/vcl/vclenum.hxx
index dbc18302ce41..95510e8414f0 100644
--- a/vcl/inc/vcl/vclenum.hxx
+++ b/vcl/inc/vcl/vclenum.hxx
@@ -67,31 +67,17 @@ enum ExtDateFieldFormat { XTDATEF_SYSTEM_SHORT, XTDATEF_SYSTEM_SHORT_YY, XTDATEF
// ------------------------------------------------------------
-// to avoid conflicts with enum's declared otherwise
-#define GRADIENT_LINEAR GradientStyle_LINEAR
-#define GRADIENT_AXIAL GradientStyle_AXIAL
-#define GRADIENT_RADIAL GradientStyle_RADIAL
-#define GRADIENT_ELLIPTICAL GradientStyle_ELLIPTICAL
-#define GRADIENT_SQUARE GradientStyle_SQUARE
-#define GRADIENT_RECT GradientStyle_RECT
-#define GRADIENT_FORCE_EQUAL_SIZE GradientStyle_FORCE_EQUAL_SIZE
-
-#ifndef ENUM_GRADIENTSTYLE_DECLARED
-#define ENUM_GRADIENTSTYLE_DECLARED
-
enum GradientStyle
{
- GRADIENT_LINEAR = 0,
- GRADIENT_AXIAL = 1,
- GRADIENT_RADIAL = 2,
- GRADIENT_ELLIPTICAL = 3,
- GRADIENT_SQUARE = 4,
- GRADIENT_RECT = 5,
+ 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
};
-#endif
-
// ------------------------------------------------------------
// to avoid conflicts with enum's declared otherwise
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index f30ce5c282d6..02457d1791e5 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -428,7 +428,7 @@ void ImplStyleData::SetStandardStyles()
mbHideDisabledMenuItems = sal_False;
mnAcceleratorsInContextMenus = sal_True;
- Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
+ Gradient aGrad( GradientStyle_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
maWorkspaceGradient = Wallpaper( aGrad );
}
diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx
index af648a19d53f..61c005dfa8e1 100644
--- a/vcl/source/gdi/gradient.cxx
+++ b/vcl/source/gdi/gradient.cxx
@@ -42,7 +42,7 @@ Impl_Gradient::Impl_Gradient() :
maEndColor( COL_WHITE )
{
mnRefCount = 1;
- meStyle = GRADIENT_LINEAR;
+ meStyle = GradientStyle_LINEAR;
mnAngle = 0;
mnBorder = 0;
mnOfsX = 50;
@@ -238,7 +238,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
Rectangle aRect( rRect );
sal_uInt16 nAngle = GetAngle() % 3600;
- if( GetStyle() == GRADIENT_LINEAR || GetStyle() == GRADIENT_AXIAL )
+ if( GetStyle() == GradientStyle_LINEAR || GetStyle() == GradientStyle_AXIAL )
{
aRect.Left()--;
aRect.Top()--;
@@ -264,7 +264,7 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
}
else
{
- if( GetStyle() == GRADIENT_SQUARE || GetStyle() == GRADIENT_RECT )
+ if( GetStyle() == GradientStyle_SQUARE || GetStyle() == GradientStyle_RECT )
{
const double fAngle = nAngle * F_PI1800;
const double fWidth = aRect.GetWidth();
@@ -283,19 +283,19 @@ void Gradient::GetBoundRect( const Rectangle& rRect, Rectangle& rBoundRect, Poin
Size aSize( aRect.GetSize() );
- if( GetStyle() == GRADIENT_RADIAL )
+ if( GetStyle() == GradientStyle_RADIAL )
{
// Radien-Berechnung fuer Kreis
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() == GRADIENT_ELLIPTICAL )
+ else if( GetStyle() == GradientStyle_ELLIPTICAL )
{
// Radien-Berechnung fuer Ellipse
aSize.Width() = (long)( 0.5 + (double) aSize.Width() * 1.4142 );
aSize.Height() = (long)( 0.5 + (double) aSize.Height() * 1.4142 );
}
- else if( GetStyle() == GRADIENT_SQUARE )
+ else if( GetStyle() == GradientStyle_SQUARE )
{
if ( aSize.Width() > aSize.Height() )
aSize.Height() = aSize.Width();
diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx
index 735a85e6bdac..7b5c81955b26 100644
--- a/vcl/source/gdi/outdev4.cxx
+++ b/vcl/source/gdi/outdev4.cxx
@@ -185,7 +185,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect,
long nBorder = (long)rGradient.GetBorder() * aRect.GetHeight() / 100;
// Rand berechnen und Rechteck neu setzen fuer linearen Farbverlauf
- bool bLinear = (rGradient.GetStyle() == GRADIENT_LINEAR);
+ bool bLinear = (rGradient.GetStyle() == GradientStyle_LINEAR);
if ( bLinear )
{
aRect.Top() += nBorder;
@@ -529,7 +529,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect,
if( ( aRect.GetWidth() < 2 ) || ( aRect.GetHeight() < 2 ) )
break;
- if( rGradient.GetStyle() == GRADIENT_RADIAL || rGradient.GetStyle() == GRADIENT_ELLIPTICAL )
+ if( rGradient.GetStyle() == GradientStyle_RADIAL || rGradient.GetStyle() == GradientStyle_ELLIPTICAL )
aPoly = Polygon( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 );
else
aPoly = Polygon( aRect );
@@ -727,7 +727,7 @@ void OutputDevice::DrawGradient( const Rectangle& rRect,
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
- if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
+ if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL )
ImplDrawLinearGradient( aRect, aGradient, sal_False, NULL );
else
ImplDrawComplexGradient( aRect, aGradient, sal_False, NULL );
@@ -892,7 +892,7 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly,
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
- if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
+ if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL )
ImplDrawLinearGradient( aRect, aGradient, sal_False, &aClipPolyPoly );
else
ImplDrawComplexGradient( aRect, aGradient, sal_False, &aClipPolyPoly );
@@ -1001,7 +1001,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r
if ( !aGradient.GetSteps() )
aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT );
- if( aGradient.GetStyle() == GRADIENT_LINEAR || aGradient.GetStyle() == GRADIENT_AXIAL )
+ if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL )
ImplDrawLinearGradient( aRect, aGradient, sal_True, NULL );
else
ImplDrawComplexGradient( aRect, aGradient, sal_True, NULL );
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 98c7629789a3..51a70cc5a500 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -437,7 +437,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() const
{
Gradient g;
g.SetAngle( 900 );
- g.SetStyle( GRADIENT_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/window/menu.cxx b/vcl/source/window/menu.cxx
index 7c1751c72f03..935d5a9ec9ac 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2954,7 +2954,7 @@ void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemDa
Rectangle aRect( Point( 0, 0 ), Point( aLogoSz.Width()-1, aOutSz.Height() ) );
if ( pWin->GetColorCount() >= 256 )
{
- Gradient aGrad( GRADIENT_LINEAR, pLogo->aStartColor, pLogo->aEndColor );
+ Gradient aGrad( GradientStyle_LINEAR, pLogo->aStartColor, pLogo->aEndColor );
aGrad.SetAngle( 1800 );
aGrad.SetBorder( 15 );
pWin->DrawGradient( aRect, aGrad );
diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx
index c672c7aebead..8242ec9c9041 100644
--- a/vcl/source/window/toolbox.cxx
+++ b/vcl/source/window/toolbox.cxx
@@ -409,7 +409,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp
Gradient g;
g.SetAngle( pThis->mbHorz ? 0 : 900 );
- g.SetStyle( GRADIENT_LINEAR );
+ g.SetStyle( GradientStyle_LINEAR );
g.SetStartColor( startCol );
g.SetEndColor( endCol );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 04f10dfccc83..4d33be511c78 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -483,7 +483,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
aStyleSettings.SetWorkspaceGradient( Wallpaper( Color( COL_BLACK ) ) );
else
{
- Gradient aGrad( GRADIENT_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
+ Gradient aGrad( GradientStyle_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR );
aStyleSettings.SetWorkspaceGradient( Wallpaper( aGrad ) );
}
diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx
index 96b657236a14..323feee5d94f 100644
--- a/vcl/workben/outdevgrind.cxx
+++ b/vcl/workben/outdevgrind.cxx
@@ -145,7 +145,7 @@ void setupMethodStubs( functor_vector_type& res )
const BitmapEx aBitmapExAlphaAlien( aBitmapAlien, aBitmapAlien );
const Image aImage( aBitmapEx );
- const Gradient aGradient(GRADIENT_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 545c2aedf6ee..2c1dd59a8174 100644
--- a/vcl/workben/svptest.cxx
+++ b/vcl/workben/svptest.cxx
@@ -308,7 +308,7 @@ void MyWin::Paint( const Rectangle& rRect )
Color aLightGreen( 0, 0xff, 0 );
Color aDarkGreen( 0, 0x40, 0 );
- Gradient aGradient( GRADIENT_LINEAR, aBlack, aWhite );
+ Gradient aGradient( GradientStyle_LINEAR, aBlack, aWhite );
aGradient.SetAngle( 900 );
DrawGradient( Rectangle( Point( 1000, 4500 ),
Size( aPaperSize.Width() - 2000,