diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2016-05-29 13:00:07 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-30 06:39:19 +0000 |
commit | 92bad2a3d97586dc1127580e1d5a002679105149 (patch) | |
tree | 9861175585e5c1c4c37b93772e9d1e48b9e9b267 /vcl | |
parent | 6a5a2350c1c4924dd3fe92c8a3016c8c8ca1c275 (diff) |
Convert ImageSet to scoped enum
Change-Id: I9957435f769957d76e95248914a422e82019e22d
Reviewed-on: https://gerrit.libreoffice.org/25604
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/throbber.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index 0830774f654f..a2630932e01a 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -45,7 +45,7 @@ Throbber::Throbber( vcl::Window* i_parentWindow, WinBits i_style ) ,mbRepeat( true ) ,mnStepTime( 100 ) ,mnCurStep( 0 ) - ,meImageSet( IMAGES_AUTO ) + ,meImageSet( ImageSet::Auto ) { maWaitTimer.SetTimeout( mnStepTime ); maWaitTimer.SetTimeoutHdl( LINK( this, Throbber, TimeOutHdl ) ); @@ -70,7 +70,7 @@ namespace ::std::vector< Image > lcl_loadImageSet( const Throbber::ImageSet i_imageSet ) { ::std::vector< Image > aImages; - ENSURE_OR_RETURN( i_imageSet != Throbber::IMAGES_NONE, "lcl_loadImageSet: illegal image set", aImages ); + ENSURE_OR_RETURN( i_imageSet != Throbber::ImageSet::NONE, "lcl_loadImageSet: illegal image set", aImages ); const Reference< css::uno::XComponentContext > aContext( ::comphelper::getProcessComponentContext() ); const Reference< XGraphicProvider > xGraphicProvider( css::graphic::GraphicProvider::create(aContext) ); @@ -98,23 +98,23 @@ void Throbber::Resize() { ImageControl::Resize(); - if ( meImageSet == IMAGES_AUTO ) + if ( meImageSet == ImageSet::Auto ) initImages(); } void Throbber::initImages() { - if ( meImageSet == IMAGES_NONE ) + if ( meImageSet == ImageSet::NONE ) return; try { ::std::vector< ::std::vector< Image > > aImageSets; - if ( meImageSet == IMAGES_AUTO ) + if ( meImageSet == ImageSet::Auto ) { - aImageSets.push_back( lcl_loadImageSet( IMAGES_16_PX ) ); - aImageSets.push_back( lcl_loadImageSet( IMAGES_32_PX ) ); - aImageSets.push_back( lcl_loadImageSet( IMAGES_64_PX ) ); + aImageSets.push_back( lcl_loadImageSet( ImageSet::N16px ) ); + aImageSets.push_back( lcl_loadImageSet( ImageSet::N32px ) ); + aImageSets.push_back( lcl_loadImageSet( ImageSet::N64px ) ); } else { @@ -200,11 +200,11 @@ void Throbber::setImageList( ::std::vector< Image > const& i_images ) size_t index = 0; switch ( i_imageSet ) { - case IMAGES_16_PX: index = 0; break; - case IMAGES_32_PX: index = 1; break; - case IMAGES_64_PX: index = 2; break; - case IMAGES_NONE: - case IMAGES_AUTO: + case ImageSet::N16px: index = 0; break; + case ImageSet::N32px: index = 1; break; + case ImageSet::N64px: index = 2; break; + case ImageSet::NONE: + case ImageSet::Auto: OSL_ENSURE( false, "Throbber::getDefaultImageURLs: illegal image set!" ); return aImageURLs; } |