summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-23 12:43:02 +0200
committerNoel Grandin <noel@peralex.com>2015-07-24 09:52:08 +0200
commitdc7fc2074dd81f0960e6c112ead1cfe5bfd1bf4c (patch)
treeebbe8c4c405e651e0c9380f3fcc4bbf5288f7d32 /vcl/source/outdev
parent7bf70574e1e04f027c542733bee9d156e989fae6 (diff)
convert WALLPAPER constants to scoped enum
Change-Id: I3b4b4e8a94904e22823a263bd5446a2e1aa47661
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/outdevstate.cxx2
-rw-r--r--vcl/source/outdev/wallpaper.cxx26
2 files changed, 14 insertions, 14 deletions
diff --git a/vcl/source/outdev/outdevstate.cxx b/vcl/source/outdev/outdevstate.cxx
index e1c649807a6a..ad8e8aef9f1d 100644
--- a/vcl/source/outdev/outdevstate.cxx
+++ b/vcl/source/outdev/outdevstate.cxx
@@ -466,7 +466,7 @@ void OutputDevice::SetBackground( const Wallpaper& rBackground )
maBackground = rBackground;
- if( rBackground.GetStyle() == WALLPAPER_NULL )
+ if( rBackground.GetStyle() == WallpaperStyle::NONE )
mbBackground = false;
else
mbBackground = true;
diff --git a/vcl/source/outdev/wallpaper.cxx b/vcl/source/outdev/wallpaper.cxx
index adf935a57329..175f0d199eda 100644
--- a/vcl/source/outdev/wallpaper.cxx
+++ b/vcl/source/outdev/wallpaper.cxx
@@ -36,7 +36,7 @@ void OutputDevice::DrawWallpaper( const Rectangle& rRect,
if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() )
return;
- if ( rWallpaper.GetStyle() != WALLPAPER_NULL )
+ if ( rWallpaper.GetStyle() != WallpaperStyle::NONE )
{
Rectangle aRect = LogicToPixel( rRect );
aRect.Justify();
@@ -150,7 +150,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
bDrawColorBackground = true;
}
}
- else if( eStyle != WALLPAPER_TILE && eStyle != WALLPAPER_SCALE )
+ else if( eStyle != WallpaperStyle::Tile && eStyle != WallpaperStyle::Scale )
{
if( rWallpaper.IsGradient() )
bDrawGradientBackground = true;
@@ -187,7 +187,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
switch( eStyle )
{
- case( WALLPAPER_SCALE ):
+ case( WallpaperStyle::Scale ):
if( !pCached || ( pCached->GetSizePixel() != aSize ) )
{
if( pCached )
@@ -199,41 +199,41 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
}
break;
- case( WALLPAPER_TOPLEFT ):
+ case( WallpaperStyle::TopLeft ):
break;
- case( WALLPAPER_TOP ):
+ case( WallpaperStyle::Top ):
aPos.X() += ( aSize.Width() - nBmpWidth ) >> 1;
break;
- case( WALLPAPER_TOPRIGHT ):
+ case( WallpaperStyle::TopRight ):
aPos.X() += ( aSize.Width() - nBmpWidth );
break;
- case( WALLPAPER_LEFT ):
+ case( WallpaperStyle::Left ):
aPos.Y() += ( aSize.Height() - nBmpHeight ) >> 1;
break;
- case( WALLPAPER_CENTER ):
+ case( WallpaperStyle::Center ):
aPos.X() += ( aSize.Width() - nBmpWidth ) >> 1;
aPos.Y() += ( aSize.Height() - nBmpHeight ) >> 1;
break;
- case( WALLPAPER_RIGHT ):
+ case( WallpaperStyle::Right ):
aPos.X() += ( aSize.Width() - nBmpWidth );
aPos.Y() += ( aSize.Height() - nBmpHeight ) >> 1;
break;
- case( WALLPAPER_BOTTOMLEFT ):
+ case( WallpaperStyle::BottomLeft ):
aPos.Y() += ( aSize.Height() - nBmpHeight );
break;
- case( WALLPAPER_BOTTOM ):
+ case( WallpaperStyle::Bottom ):
aPos.X() += ( aSize.Width() - nBmpWidth ) >> 1;
aPos.Y() += ( aSize.Height() - nBmpHeight );
break;
- case( WALLPAPER_BOTTOMRIGHT ):
+ case( WallpaperStyle::BottomRight ):
aPos.X() += ( aSize.Width() - nBmpWidth );
aPos.Y() += ( aSize.Height() - nBmpHeight );
break;
@@ -245,7 +245,7 @@ void OutputDevice::DrawBitmapWallpaper( long nX, long nY,
long nFirstX;
long nFirstY;
- if( eStyle == WALLPAPER_TILE )
+ if( eStyle == WallpaperStyle::Tile )
{
nFirstX = aPos.X();
nFirstY = aPos.Y();