From 12489936578836a3a6a70c3c799dcfda310c46a5 Mon Sep 17 00:00:00 2001 From: Vladimir Glazunov Date: Fri, 26 Mar 2010 16:38:11 +0100 Subject: native0: #161580# make native intro progress optional - transplanted from 1070cbd32693@native0 --- desktop/source/splash/splash.cxx | 11 ++++++++++- desktop/source/splash/splash.hxx | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'desktop/source/splash') diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 5f6167fafd2c..5fee3028b4f6 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -60,6 +60,7 @@ SplashScreen::SplashScreen(const Reference< XMultiServiceFactory >& rSMgr) , _vdev(*((IntroWindow*)this)) , _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED)) , _cProgressBarColor(sal::static_int_cast< ColorData >(NOT_LOADED)) + , _bNativeProgress(true) , _iMax(100) , _iProgress(0) , _eBitmapMode(BM_DEFAULTMODE) @@ -297,6 +298,9 @@ void SplashScreen::loadConfig() OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressPosition" ) ) ); OUString sFullScreenSplash = implReadBootstrapKey( OUString( RTL_CONSTASCII_USTRINGPARAM( "FullScreenSplash" ) ) ); + OUString sNativeProgress = implReadBootstrapKey( + OUString( RTL_CONSTASCII_USTRINGPARAM( "NativeProgress" ) ) ); + // Determine full screen splash mode _bFullScreenSplash = (( sFullScreenSplash.getLength() > 0 ) && @@ -347,6 +351,11 @@ void SplashScreen::loadConfig() } } + if( sNativeProgress.getLength() ) + { + _bNativeProgress = sNativeProgress.toBoolean(); + } + if ( sSize.getLength() ) { sal_Int32 idx = 0; @@ -618,7 +627,7 @@ void SplashScreen::Paint( const Rectangle&) BOOL bNativeOK = FALSE; // in case of native controls we need to draw directly to the window - if( IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) ) + if( _bNativeProgress && IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) ) { DrawBitmapEx( Point(), _aIntroBmp ); diff --git a/desktop/source/splash/splash.hxx b/desktop/source/splash/splash.hxx index a01967d36c44..99677aa107f1 100644 --- a/desktop/source/splash/splash.hxx +++ b/desktop/source/splash/splash.hxx @@ -89,6 +89,7 @@ private: BitmapEx _aIntroBmp; Color _cProgressFrameColor; Color _cProgressBarColor; + bool _bNativeProgress; OUString _sAppName; std::vector< FullScreenProgressRatioValue > _sFullScreenProgressRatioValues; -- cgit