summaryrefslogtreecommitdiff
path: root/desktop/source/splash
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2007-10-09 14:23:34 +0000
committerKurt Zenker <kz@openoffice.org>2007-10-09 14:23:34 +0000
commit48bdbbaa0bc5ab9bf8cf04c89c9b2cbb75a9af3c (patch)
tree3e2bb9794b6ab7de3099f95715e074c2dd5d2184 /desktop/source/splash
parenta7e234a0a3303c170246a53951c1d9ee7861913e (diff)
INTEGRATION: CWS aquavcl03 (1.25.30); FILE MERGED
2007/10/02 09:11:24 pl 1.25.30.3: RESYNC: (1.26-1.27); FILE MERGED 2007/09/28 09:36:16 pl 1.25.30.2: #i80842# in case of native progress draw to window directly 2007/08/20 10:44:53 isma87 1.25.30.1: #i80842#: add call to native drawing functions for the progress bar of the splash screen
Diffstat (limited to 'desktop/source/splash')
-rw-r--r--desktop/source/splash/splash.cxx64
1 files changed, 32 insertions, 32 deletions
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 7acb6b9128..aa52e20d7f 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: splash.cxx,v $
*
- * $Revision: 1.27 $
+ * $Revision: 1.28 $
*
- * last change: $Author: vg $ $Date: 2007-09-20 15:37:12 $
+ * last change: $Author: kz $ $Date: 2007-10-09 15:23:34 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -619,6 +619,36 @@ void SplashScreen::Paint( const Rectangle&)
{
if(!_bVisible) return;
+ //native drawing
+ BOOL bNativeOK = FALSE;
+
+ // in case of native controls we need to draw directly to the window
+ if( IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) )
+ {
+ DrawBitmap( Point(), _aIntroBmp );
+
+ ImplControlValue aValue( _iProgress * _barwidth / _iMax);
+ Rectangle aDrawRect( Point(_tlx, _tly), Size( _barwidth, _barheight ) );
+ Region aControlRegion( aDrawRect );
+ Region aNativeControlRegion, aNativeContentRegion;
+
+ if( GetNativeControlRegion( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
+ CTRL_STATE_ENABLED, aValue, rtl::OUString(),
+ aNativeControlRegion, aNativeContentRegion ) )
+ {
+ long nProgressHeight = aNativeControlRegion.GetBoundRect().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 )
+ {
+ return;
+ }
+ }
+ //non native drawing
// draw bitmap
if (_bPaintBitmap)
_vdev.DrawBitmap( Point(), _aIntroBmp );
@@ -628,36 +658,6 @@ void SplashScreen::Paint( const Rectangle&)
long length = (_iProgress * _barwidth / _iMax) - (2 * _barspace);
if (length < 0) length = 0;
- //native drawing
- BOOL bNativeOK = FALSE;
-
- if( IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) )
- {
- //TO DO: add support for mbProgressNeedsErase
- //bool bNeedErase = ImplGetSVData()->maNWFData.mbProgressNeedsErase;
-
- ImplControlValue aValue( _iProgress * _barwidth / _iMax);
- Rectangle aDrawRect( Point(_tlx, _tly), Size( _barwidth, _barheight ) );
- Region aControlRegion( aDrawRect );
- Region aNativeControlRegion, aNativeContentRegion;
-
- if( GetNativeControlRegion( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
- CTRL_STATE_ENABLED, aValue, rtl::OUString(),
- aNativeControlRegion, aNativeContentRegion ) )
- {
- long nProgressHeight = aNativeControlRegion.GetBoundRect().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 )
- {
- return;
- }
- }
- //non native drawing
// border
_vdev.SetFillColor();
_vdev.SetLineColor( _cProgressFrameColor );