Get rid of GRADIENT_* defines, they conflict with Windows GDI types.

Change-Id: Ia0bc37f81b7213b20fc5093beb46d7a05b1ac931
This commit is contained in:
Jan Holesovsky 2012-06-11 16:41:34 +02:00
parent 99ced0bdae
commit 6d78c490b0
25 changed files with 73 additions and 103 deletions

View File

@ -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:

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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() );

View File

@ -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 )

View File

@ -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,

View File

@ -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);

View File

@ -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);

View File

@ -470,7 +470,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 );

View File

@ -835,7 +835,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);

View File

@ -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();

View File

@ -141,11 +141,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 );

View File

@ -140,14 +140,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()));
}

View File

@ -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 -
// ----------------

View File

@ -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

View File

@ -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 );
}

View File

@ -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();

View File

@ -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 );

View File

@ -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() )

View File

@ -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 );

View File

@ -408,7 +408,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 );

View File

@ -484,7 +484,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 ) );
}

View File

@ -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 );

View File

@ -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,