diff options
Diffstat (limited to 'desktop/source/splash')
-rw-r--r-- | desktop/source/splash/splash.cxx | 37 | ||||
-rw-r--r-- | desktop/source/splash/splash.hxx | 1 |
2 files changed, 21 insertions, 17 deletions
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 5fee3028b4f6..c6a185b8e54d 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -135,14 +135,21 @@ void SAL_CALL SplashScreen::reset() } } -void SAL_CALL SplashScreen::setText(const OUString&) +void SAL_CALL SplashScreen::setText(const OUString& rText) throw (RuntimeException) { - if (_bVisible && !_bProgressEnd) { - if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( TRUE ); - Show(); - Flush(); + ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + if ( _sProgressText != rText ) + { + _sProgressText = rText; + + if (_bVisible && !_bProgressEnd) + { + if ( _eBitmapMode == BM_FULLSCREEN ) + ShowFullScreenMode( TRUE ); + Show(); + updateStatus(); + } } } @@ -633,21 +640,19 @@ void SplashScreen::Paint( const Rectangle&) ImplControlValue aValue( _iProgress * _barwidth / _iMax); Rectangle aDrawRect( Point(_tlx, _tly), Size( _barwidth, _barheight ) ); - Region aControlRegion( aDrawRect ); - Region aNativeControlRegion, aNativeContentRegion; + Rectangle aNativeControlRegion, aNativeContentRegion; - if( GetNativeControlRegion( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aControlRegion, + if( GetNativeControlRegion( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, CTRL_STATE_ENABLED, aValue, rtl::OUString(), aNativeControlRegion, aNativeContentRegion ) ) { - long nProgressHeight = aNativeControlRegion.GetBoundRect().GetHeight(); + long nProgressHeight = aNativeControlRegion.GetHeight(); aDrawRect.Top() -= (nProgressHeight - _barheight)/2; aDrawRect.Bottom() += (nProgressHeight - _barheight)/2; - aControlRegion = Region( aDrawRect ); } - if( (bNativeOK = DrawNativeControl( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aControlRegion, - CTRL_STATE_ENABLED, aValue, rtl::OUString() )) != FALSE ) + if( (bNativeOK = DrawNativeControl( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect, + CTRL_STATE_ENABLED, aValue, _sProgressText )) != FALSE ) { return; } @@ -668,10 +673,8 @@ void SplashScreen::Paint( const Rectangle&) _vdev.DrawRect(Rectangle(_tlx, _tly, _tlx+_barwidth, _tly+_barheight)); _vdev.SetFillColor( _cProgressBarColor ); _vdev.SetLineColor(); - Rectangle aRect(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace); - _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, - _tlx+_barspace+length, _tly+_barheight-_barspace)); - + _vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace)); + _vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER ); } Size aSize = GetOutputSizePixel(); Size bSize = _vdev.GetOutputSizePixel(); diff --git a/desktop/source/splash/splash.hxx b/desktop/source/splash/splash.hxx index 99677aa107f1..8480ed3df9ae 100644 --- a/desktop/source/splash/splash.hxx +++ b/desktop/source/splash/splash.hxx @@ -91,6 +91,7 @@ private: Color _cProgressBarColor; bool _bNativeProgress; OUString _sAppName; + OUString _sProgressText; std::vector< FullScreenProgressRatioValue > _sFullScreenProgressRatioValues; sal_Int32 _iMax; |